Highlighted

SOAP Requests

theNOCer

30-06-2008

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


quote:





Channel.Security.Error

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


quote:



InvokeFailed

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


quote:







<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="vertical">



<mx:Script>

<![CDATA[

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:Script>



<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/">

<iLONSystemService>


<UCPTsystemInfoType>SI_NETWORK</UCPTsystemInfoType>

</iLONSystemService>

</SystemService_Read_Info>

</mx:request>

</mx:operation>

</mx:WebService>



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

</mx:Application>







Replies

Highlighted

anirudhs

03-07-2008

Hi,



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="
http://63.139.189.187:8002/WSDL/v4.0/iLON100.wsdl"
fault="failed(event)" result="worked(event)"
showBusyCursor="true">
Highlighted

theNOCer

03-07-2008

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
Highlighted

anirudhs

03-07-2008

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.
Highlighted

theNOCer

04-07-2008

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





(mx.messaging.messages::HTTPRequestMessage)#0

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 = "
http://63.139.189.187:8002/WSDL/iLON100.wsdl"





[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)"





Highlighted

anirudhs

13-07-2008

I strongly suspect that the path to your WSDL is wrong. Is
your URL publicly accessible?



Hitting
http://63.139.189.187:8002/WSDL/iLON100.wsdl
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.