Problems with the Web Service using XML in Flex

Hello

I use a ColdFusion CFC, which is configured to generate an XML string. It runs on ColdFusion MX 6.1 and is configured as a remote web service. I tested the call and it returns the string XML fine when it is called from another method of Flex unfounded. My problem is this simple Flex application to call the same function via a service web, I wrote below. I cannot get to the exit results, keeps showing as NULL. I can't use the HTTP of Flex appeal for remote access because I'm not under MX7. Does anyone know what is wrong with my code? BTW, I would do the work of cross - domain.xml file to call the cfc, let me know if you want to test and I can add your domain name. Thank you!

<? XML version = "1.0" encoding = "utf-8"? >
"" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml ' layout = "absolute" >

<! - set Web Service to get the XML data of course catalog - >
< mx:WebService
ID = "cd".
"WSDL =" http://training.wonderware.com/components/courses.cfc?wsdl "
Load = "CD.getCourseCatalogXML.Send ()" "
showBusyCursor = "true" fault = "Alert.show (event.fault.message), 'Error' ' result =" cdResult (event) ">"
< mx:operation name = "getCourseCatalogXML" resultFormat = "e4x" >
< mx:request >
< IDCalendrier > 3 < / IDCalendrier >
< / mx:request >
< / mx:operation >
< / mx:WebService >

< mx:Script >
<! [CDATA]
Import mx.controls.Alert;
Import mx.rpc.events.ResultEvent;
Import mx.rpc.events.FaultEvent;

[Bindable]
public var outputString:String

public void cdResult(event:ResultEvent):void
{
outputString = event.result as String
}
[]] >
< / mx:Script >

< mx:Canvas horizontalScrollPolicy = "off" verticalScrollPolicy = "off" >
< mx:Text width = '100% ' paddingLeft = "4" paddingRight = paddingTop "4" = "4" >
< mx:text > OUTPUT: {outputString} < / mx:text >
< / mx:Text >
< / mx:Canvas >

< / mx:Application >

Thank you very much! I do not have the notion that the HTTPService is indded just an HTTP call. So yes that it a much simpler way to call just ColdFusion to return the XML string to the application. No reason to use Flash Remoting or CFCS etc... and certainly not a web server. This made the turn that I called a HTTPService now what charges by coldfusion page that returns XML and bam, works well with e4x result etc... Thanks tracy!

Tags: Flex

Similar Questions

  • Problem of DH handshake with the web service using ColdFusion 7 and 8 after java update 8

    ColdFusion 7 and 8 are provided with a variant of JRE1.6.

    I have a script that has consumed a web service for years with success.  Last week, the web service provider updated their version of Apache and Java on the server java 1.8 (or java-8).

    I could no longer consume the web service once the web service provider updated to Apache and Java and would be the following error DH keypair every time that I try to consume the service:

    -----------------

    AxisFault

    faultCode: {http://schemas.xmlsoap.org/soap/envelope/} Server.userException

    faultSubcode:

    faultString: javax.net.ssl.SSLException: java.lang.RuntimeException: could not generate keypairs DH

    faultActor:

    faultNode:

    faultDetail:

    {}http://xml.apache.org/axis/} stackTrace:javax .net .ssl .SSLException: java.lang.RuntimeException: could not generate keypairs DH

    at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:190)

    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1591)

    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1554)

    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1537)

    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1130)

    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1107)

    at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186)

    to org.apache.axis.transport.http.HTTPSender.getSocket (HTT... ''

    -----------------

    I asked the service provider web, why it would stop working and how we can solve this problem.  They suggested that upgrade to the latest version of Java on my server running ColdFusion.  I did some research and found the problem to be with the amount of memory allocated to the variable containing the encryption key.

    The big problem is when I tried to update java on this particular server (Windows Server 2003), the installation has returned a messaged stating that he could not run on the older operating system and I need to update my OS to install java.

    Does anyone have a workaround in ColdFusion 7 or 8 that you can establish the DH handshake using Java 1.6 on your local server while consuming a web service on a server using Java 1.8?

    Hi, frank000000,

    I know that we had a serious problem with any Java 7 after update 25.  They are off a lot of network permissions and other things, for safety, that used to be available in versions prior to the update 25.  But it's while we were in CF Server 9.

    Since we switched to CF Server 10 (making sure that we got the CF Installer provided with Java 8), we had very few issues related to Java.

    It seems strange to me that the upgrade to 1.8 host while your server is 1.6 would cause problems.  It could very well be something else.  I would like to ask the host for documentation describing exactly how/why their 1.8 may cause interference with your 1.6.

    HTH,

    ^_^

  • Problem with the web service call

    I use ajax with json to call webservice but its not working with the localhost url in the emulator of the ripple. If I use an ip address or external url does not call the webservice.

    I also tried with BlackBerry, webservice does not.

    can someone guide me how to call the Web service?

    Thank you

    Sundaram

    Your file config.xml needs the ip address or the url in the "whitelist".  Use the access for that tag.  for example:

    
    

    The piece above is not secure because it whitelists ALL------* areas.  You can put your url in the uri.

  • Update Windows problem with the Bits Service and error 0 x 80070057

    The service status: problem with the Bits Service

    Error 0 x 80070057

    Original title: Windows Update problems

    Hi Dexter,

    Can I know the KB # the update fails?

    What is the question pertaining to a specific or all update updates?

    What antivirus software you use on your computer?

    To resolve this problem, see the following article:

    Difficulty errors Windows Update corruption as 0 x 80070002 and 0 x 80070057

    Hope the helps of information. Get back to us with more information to help.

  • Another possibility to communicate with the web service other than the SOAPS in Adobe Reader

    Hi team

    It is another alternative method to communicate with the web service other than the SOAPS using Java script in Adobe Reader.

    Thank you

    Bala

    Yes, you can use FDF/XFDF to send data to the server and report information in the document. Take a look at the Doc.submitForm () method using the FDF/XFDF parameter: DC-Acrobat SDK Documentation - Doc.submitForm () you'll need fields for send/receive form data, but these can be hidden.

  • A problem with the web by launching the EAS console - Urgent!

    Hello Experts,

    One of my clients has a problem with the web by launching the Regional service console. When tried to start, was inviting to install a .jnlp file. Customers already have Java 2 Platform SE Version 1.5.0 (build 1.5.0_13 - b05) installed on the computer. Make it necessary to install more than that?

    Version: 11.1.1.1.00

    Please notify. Thanks in advance

    Kind regards
    Jingle

    Published by: 637223 on January 14, 2009 03:09

    Hello

    They should be able to execute it, it took Java Web Start, which was part of the installation of the JRE from version 1.4
    If you go into control panel - java then java Control Panel click the java tab, under the JNLP section click the button show, if everything is correctly installed, it should show the versions and whether they are enabled or not.

    If they are enabled, then JNLP should work automatically, you may need to reinstall the JRE.

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • error message "there is a communication problem with the web server."

    I'm trying to connect to three rivers FCU website www.3riversfcu.org and I get the message error "there is a communication problem with the web server." I am running Windows 7 on Toshiba laptop. No idea how to solve this problem? Something in the settings?

    Hi, Mayhem15,

    See if this troubleshooting help.  It was written for Windows XP, but in many cases, these documents still apply for more recent versions of Windows.

    How to troubleshoot possible causes of Internet connection problems in Windows XP

    http://support.Microsoft.com/kb/314095

  • Problems with the WEB BROWSER blackBerry Smartphones, use not wifi network to open some Web sites

    Hello I'm owner of BB BOLD 9900 OS 7.1... for the last two days I am facing a pretty annoying problem with the BB browser.

    It means not affects the device... it just annoys me.

    When I TURN ON my WiFi on my BB with the network carrier Sim already homepage active who has a Active on it and open the web browser BB, according to the website on which I open the web browser chooses between the internet Wi - fi OR internet BIS carrier which is weird. BECAUSE a default if the wifi is enabled, then the web browser MUST use internet wifi network carrier for navigation. YOU TUBE, FB and TWITTER.com all use my carrier netwrok to open bt soon I open BBC.com or CNN or any other site the wifi symbol appears on the right side and so it uses the wifi network... and disappears when I opened THE 3 SITES you tube FB n twitter.

    My knowledge is that when you activate THE wifi network, the WEB browser is intended to USE the wireless internet, NOT the internet carrier

    The next time I switchd off the the carrier signal, and then Turned ON one internet WI - FI and then opened the web browser of BB. so now all the opend website with wifi internet bt as soon as I open YOU TUBE or FB or TWITTER.com it post a comment... .that cannot visit the web page when the carrier is off. Please turn on the radio n try again... I mean IT SHOULD OPEN with internet wifi? WHY do network carrier sim to open the web page?

    I have checkd my browser settings and they are default and also my wifi settings I have reset the... the problem still persists?

    any idea wats going on?

    Please help is needed I'm annoyed about this problem...

    Thank you

    MR. KIWI... Good news... .i went to my carrier service center... Solvedo Problemo!

    Go to your service books and remove directories of service WAP browser in all directories of service WAP 3 I don't know the exact name, but all are related to the browser... WAP config something like dat... Just remove dem... .and HARD restart your fone... and try to use only wifi on your device with your carrier network off...

    mine worked... Let me know on urs... so now, the browser uses my wifi instead of my network provider when both are running...

  • How to transfer data from oracle to the web service using ODI with axis2 tech

    Hi all

    Can someone cause a document or markets about 'How to transfer data from oracle to the web service with the help of ODI with AXIS2 technology'
    If any person with a document or markets, please share it with me

    Thank you
    Phani

    I can give you a few examples of web services in ODI, perhaps that you find them useful?
    Try: -.
    http://John-Goodwin.blogspot.com/2009/04/ODI-series-Web-services.html
    http://John-Goodwin.blogspot.com/2009/05/ODI-series-Web-services-part-3.html
    http://John-Goodwin.blogspot.com/2009/05/ODI-series-Web-services-part-4.html

    See you soon

    John
    http://John-Goodwin.blogspot.com/

  • Problem running the report with the Web Service and BI Publisher

    Hello

    In fact, I'm trying to run a report of Bi Publisher via the Web Service.
    I use the following documents:
    -http://download.oracle.com/docs/cd/E10415_01/doc/bi.1013/e10416/bip_webservice_101331.htm
    -"How to integrate Oracle BI Publisher via Web Services in the form of Oracke.

    Everything works fine. But when I try to copy the file on the local computer is 0 length. I use the method of "getReportBytes".
    Here's the code I tried with:

    String userName = "Administrator";
    String password = "Administrator";

    System.out.println ("calling" + myPort.getEndpoint ());
    System.out.println (myPort.validateLogin (username, Password));

    ReportRequest repReq = new ReportRequest();
    RepRes ReportResponse = new ReportResponse();

    repReq.setAttributeFormat ("pdf");
    repReq.setAttributeLocale("en-US");
    repReq.setAttributeTemplate ("sales world");
    repReq.setReportAbsolutePath ("/ Sales Manager/World Sales/World Sales.xdo");

    repRes = myPort.runReport (repReq, userName, passWord);
    System.out.println (repRes.getReportContentType ());

    Byte [] binaryBytes = repRes.getReportBytes ();
    OutputStream out = new FileOutputStream ("D:
    out.pdf");
    out. Write (binaryBytes);
    out. Close();
    System.out.println ("success for performance report');

    Thanks in advance.

    Hello

    I assume you are using 10.1.3.4. Otherwise, my index is not relevant to you...

    There is a new parameter in the web service API to set the size of the segment. HéLas is by default not so, the behavior is as in versions (not size segment... the entire document at once). If you set the size of segment-1, you should get your document. So, try adding
    repRequest.setSizeOfDataChunkDownload(-1);

    concerning
    Rainer

  • Problem with creating Web Service Client using Oracle JDeveloper

    Hi all

    I am trying to create a Web Service Client using Oracle JDeveloper. The property of the compiler of the project I updated JRE 1.4

    When I run the web service client, he gives me a lot of errors saying:
    ' Error (32.2): annotations are not supported in - source 1.4'

    I wonder why JDeveloper uses annotations even after that I set the compiler property to 1.4

    I'm following this link to create the Web service client:
    http://www.Oracle.com/technetwork/developer-tools/forms/WebServices-forms-11g-094111.html

    Any help in this regard would be greatly appreciated.

    Thank you
    Scott.

    Scott, when you run the proxy Web service in JDeveloper, you will see a bunch of jars listed in the classpath in the Journal JDeveloper window.
    All of these classes must be in the classpath of your server when the class is deployed there.
    Note that by default, I don't think they are going to be included in the JAR that you build for the proxy when you deploy.

  • two-way communication with the web service

    I need help with a problem with web services on 8.6.  I do not know if this is possible.

    I have a web service that works very well.  At this point all it defines a Boolean value.

    For the test, I'm just using IE to see the data.  This works.  I can see the Boolean value change each time I send a 0 or 1 value through the URL.

    My problem is this: when I change the Boolean value, I can't read the value of another application of IE.  In other words, I want to be able to open IE twice in two different windows.  When I change a value of an Internet Explorer session, I want to see the value changes in the other session of IE (after refresh).  From now on, it seems that each session of Internet Explorer is a separate instance of the web service.  How can I edit a Boolean value, and read this variation by another IE session?

    My cause is hopeless?  Are web services 'read only '?  Any help would be appreciated.

    Bad form for the double post but the forum wouldn't let me edit my post:

    This VI is a good example of a global LabVIEW 2 style. The registry value at offset uninitialized loop will be persist appealed to the other of this VI. So when the game is true the value of data is stored in the shift register. When all is false the value of the shift register is returned unchanged. Make sure you have 'Keep VI in memory' checked in the configuration of your web service.

    You could do the same thing without parameters selected using two screws separated

  • Widget to the Web service, parsing XML

    I worked on the communication with my web services and back to my widget.

    By using the code below, I was able to perform a GET and repay the XML, but I can't find data where I expect it to be node-wise when parsing XML. I return an object with 3 variables attached to it. I expect to be child nodes 1, 2, and 3. They proved to be 1, 3 and 5 nodes.

    Any ideas on why or how? I feel I'm missing just a simple thing in all of this.

    XML response

    
    - http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
      1000
      Test Station
      105.285
      
    

    The widget code

    //****************** Ajax Logic ******************
    var xmlHttp;
    function getStationUpdate() {
    
        alert("in station update");
        xmlHttp = new XMLHttpRequest();
    
        var Posturl = "http://MachineIPGoesHERE:51107/Service1.asmx/HelloWorld2?";
        alert("after post url");
        xmlHttp.onreadystatechange = updateData;
        alert("after onReadyStateChange");
        xmlHttp.open("GET", Posturl, true);
        alert("after GET");
    
        xmlHttp.send(null);
    }
    
    function updateData() {
        if (xmlHttp.readyState == 4) {
            alert(xmlHttp.responseText);
            parser = new DOMParser();
            var xmlDoc = parser.parseFromString(xmlHttp.responseText, "text/xml");
    
            alert(xmlDoc.documentElement.childNodes[1].tagName + " " + xmlDoc.documentElement.childNodes[1].childNodes[0].nodeValue);
            //alert(xmlDoc.documentElement.childNodes[1].childNodes.length);
            //alert(xmlDoc.documentElement.childNodes[1].hasChildNodes());
            //alert(xmlDoc.documentElement.childNodes[2].hasChildNodes());
            //alert(xmlDoc.documentElement.childNodes[2].tagName + " " + xmlDoc.documentElement.childNodes[2].childNodes[0].nodeValue);
            alert(xmlDoc.documentElement.childNodes[3].tagName + " " + xmlDoc.documentElement.childNodes[3].childNodes[0].nodeValue);
            alert(xmlDoc.documentElement.childNodes[5].tagName + " " + xmlDoc.documentElement.childNodes[5].childNodes[0].nodeValue);
    
            alert(xmlDoc.documentElement.childNodes.length);
        }
    

    Web service

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.Services;
    using System.Xml.Serialization;
    
    namespace WebService1
    {
        /// 
        /// Summary description for Service1
        /// 
        [WebService(Namespace = "http://tempuri.org/")]
        [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
        [System.ComponentModel.ToolboxItem(false)]
        // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
         [System.Web.Script.Services.ScriptService]
        public class Service1 : System.Web.Services.WebService
        {
    
            [WebMethod]
            public string HelloWorld()
            {
                return "Hello World";
            }
    
            [WebMethod]
            public myTestObj HelloWorld2()
            {
                myTestObj test = new myTestObj();
                return test;
            }
        }
    
        [Serializable]
        public class myTestObj
        {
            private int _StationID;
            private string _StationName;
            private double _Volume;
    
            [XmlElementAttribute(Order = 0)]
            public int StationID
            {
                get
                {
                    return this._StationID;
                }
                set
                {
                    this._StationID = value;
                }
            }
    
            [XmlElementAttribute(Order = 1)]
            public string StationName
            {
                get
                {
                    return this._StationName;
                }
                set
                {
                    this._StationName = value;
                }
            }
    
            [XmlElementAttribute(Order = 2)]
            public double Volume
            {
                get
                {
                    return this._Volume;
                }
                set
                {
                    this._Volume = value;
                }
            }
    
            public myTestObj()
            {
                StationID = 1000;
                StationName = "Test Station";
                Volume = 105.285;
            }
        }
    }
    

    > Any ideas on why or how? I feel I'm missing just a simple thing in all of this.

    White space nodes?

  • Creative sync cloud app. problem with the web application

    Hello

    I have some problems with the synchronization of files in the creative Cloud Files folder on my computer (I use a Mac) and the Creative Cloud Web App. practically the files I have on my computer folder do not appear on the web (and I can't create links of sharing for them) and vice versa. We have a team account and we can exchange files between us, but nothing appears on the web application. The problem applies to all members of the team.

    There is a problem with the service or it could be a local problem?

    Thank you

    Florin

    @ursuss - what you see in the creative Cloud Files folder on your computer must match what you see on the site Active CC to https://assets.adobe.com/files.

    Use the collector for the Adobe Log tool to https://helpx.adobe.com/creative-cloud/kb/cc-log-collector.html and newspapers as well as the explanation of the problem by e-mail at [email protected]. Please provide additional information indicated by Warner Harress in this Adobe forum post https://forums.adobe.com/message/8385752#8385752.

  • Problems with the web interface of connection vcenter 5.1

    Guys,

    What don't understand me, I've set up a new virtual appliance version of vcenter test 5.1, I can connect just fine using vsphere client and console, but the web interface refuses to agree with the same identifiers. What is happening with this single sign? I really do not understand.

    You guys could help me please?

    I stumbled upon this same question.  5.1 with the search service is completely different than 5.0, this is why the others are not working.

    Here's what I did to solve the problem.  I turned on the regeneration of SSL certificate:

    1. Navigate to https://[IP]: 5480 and connect
    2. Go to the Admin tab and press the button "Toggle the setting of certification" until activated regeneration 'certificate' displays Yes
    3. Go to the network tab and change the host name.  This will trigger a regeneration of SSL (or you can change the ip address).  I don't know if change 'localhost' to something else helped, but it can't hurt.
    4. Restart the box (restart System tab button.)

    At this point, you can look at the start-up of the machine of vcenter console messages.  You will notice some messages about detection of a new hostname or IP and regenerate a new certificate.  You will see all the services to import it again SSL ceritifcates so.

    At the end of the reset, I was able to connect to the web client to vCenter!

    HTH

Maybe you are looking for