6 Replies Latest reply on Jul 13, 2008 9:57 PM by anirudhs

    SOAP Requests

      I am trying to get some data from something called and iLON via SOAP. I am currently doing this in some javascript code on another page and i want to do this in flex so i can take some charts I've already made and use this data.

      attached is my code.
      here is the error i am getting

      Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (wsdl address)

      I can visit http://--IP--/WSDL/v4.0/iLON100.wsdl and see the WSDL. in my javascript code the url is working as http://--IP--/WSDL/iLON100.wsdl (change: removed '/v4.0')

      i have also downloaded the WSDL and saved it into my project and referenced it from there. in those cases i get

      Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (../wsdl/iLON100.wsdl)

      due to the "attach code" button not being in this section? ill just put it in a quote

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

      import mx.rpc.events.*;

      private function worked(event:ResultEvent):void {
      myText.text = "IT WORKED";

      private function failed(event:FaultEvent):void {
      myText.text = event.fault.faultCode.toString() + "\n" + event.fault.faultDetail;
      // http://<IP>/WSDL/v4.0/iLON100.wsdl

      <mx:WebService id="soap" wsdl="../wsdl/iLON100.wsdl" fault="failed(event)" result="worked(event)" showBusyCursor="true">
      <mx:operation name="iLON100" fault="failed(event)" resultFormat="xml">
      <mx:request xmlns=" http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">
      <SystemService_Read_Info xmlns=" http://wsdl.echelon.com/web_services_ns/ilon100/v4.0/message/">

      <mx:TextArea id="myText" width="600" height="400"/>

        • 1. Re: SOAP Requests
          theNOCer Level 1
          • 2. Re: SOAP Requests
            anirudhs Level 2

            Are you running the HTML file for the Flex application from the place where the WSDL is?

            Otherwise try putting the full path to the WSDL in the WSDL property of mx:WebService like so:

            <mx:WebService d="soap" wsdl="" fault="failed(event)" result="worked(event)" showBusyCursor="true">
            • 3. Re: SOAP Requests
              theNOCer Level 1
              Im pretty sure i was running into some cross domain issues because im not running the software at that ip. So instead i got the wsdl and have it locally where the html is being run
              • 4. Re: SOAP Requests
                anirudhs Level 2
                If you're running the Flex application from Flex Builder, you shouldn't run into crossdomain issues. Flex Builder automatically trusts the swf file so that your development cycle is smooth.

                But if you host your swf at localhost or any server, you'll run into the crossdomain problem if your WSDL is at domain B and your swf is hosted at domain A.
                • 5. Re: SOAP Requests
                  theNOCer Level 1
                  I tried both running it locally and on the same domain and go the same error. so im pretty sure the problem is _not_ a crossdomain issue. i just dont know what it is.. here is some more details on the error

                  body = (Object)#1
                  clientId = (null)
                  contentType = "application/x-www-form-urlencoded"
                  destination = ""
                  headers = (Object)#2
                  httpHeaders = (Object)#3
                  messageId = "90AB8BE3-59A0-70C0-2B55-E9D0759171FB"
                  method = "GET"
                  recordHeaders = false
                  timestamp = 0
                  timeToLive = 0
                  url = ""

                  [RPC Fault faultString="[MessagingError message='Destination 'DefaultHTTP' either does not exist or the destination has no channels defined (and the application does not define any default channels.)']" faultCode="InvokeFailed" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL ( http://<IP>/WSDL/iLON100.wsdl)"

                  • 6. Re: SOAP Requests
                    anirudhs Level 2
                    I strongly suspect that the path to your WSDL is wrong. Is your URL publicly accessible?

                    Hitting gives me a 404 File not found error. Please confirm that you can see the XML of the WSDL by hitting the same URL in the browser.