hi all,
i am using a web service to retrieve city names by country
but it is not working
it throws an error - Error opening URL
"http://www.webservicex.net/globalweather.asmx"
Unable to connect to endpoint:
http://www.webservicex.net/globalweather.asmx
can anyone help me ???????????
i had already read the documentation given in macromedia
and i had also seen the older forums
they had not explained clearly--
here is the code
--------------------------------------------------------------------
import mx.services.*;
result_btn.onPress = function() {
var weatherservice = new
WebService("http://www.webservicex.net/globalweather.asmx?wsdl");
weatherservice._name = 'GlobalWeather';
weatherservice._portName = 'GlobalWeatherSoap';
stockResultObj = weatherservice.GetCitiesByCountry('india');
weatherservice.onLoad = trace("loading");
stockResultObj.onResult = function(result) {
trace(result);
};
stockResultObj.onFault = function(fault) {
trace(fault.faultCode + "," + fault.faultstring);
};
};
--------------------------------------------------------------------------------
----------------------------
can anyone please help me ????????
perry - 14 Jun 2005 14:05 GMT
use
http://www.webservicex.net/globalweather.asmx?WSDL
perry
> hi all,
> i am using a web service to retrieve city names by country
[quoted text clipped - 30 lines]
>
> can anyone please help me ????????
steeban - 15 Jun 2005 05:09 GMT
allo perry
its not working,
can u suggest some other points
perry - 15 Jun 2005 10:48 GMT
well, this webservice somteimes is offline, i noticed.
i used the webservice connector in flash mx 2004 pro, so i can´t tell if
your script is ok
perry
> allo perry
> its not working,
> can u suggest some other points
steeban - 16 Jun 2005 10:08 GMT
allo perry,
i am also using flash mx 2004 pro....
I used the webservice connector, it is not working
so that only i used script to connect the webservice, but that is also not
working
but i checked the webservices connecting through vb.net, it worked fine,
but when i used flash, it is not working,
i also given the script
ill-d - 18 Jan 2006 16:02 GMT
Steeban,
I was just curious if you had discovered anything regarding the error you were
receiving. I have a web service that I had wrote in .NET (C#) and for some
reason only one of the functions within it is presenting that error back to
Flash, and yet it works fine when referencing it from C#.
I am not sure if it's the way that Flash is passing the parameters to the
service, but for some reason is says that there is an Error opening the URL ...
Any help or direction on this would really be appreciated.
Thanks,
Ryan
ill-d - 18 Jan 2006 19:24 GMT
Steeban,
I am not sure if this will help you, but I figured out the reason why I was
receiving the error. Apparently the parameters that I was a passing to the web
service was slightly malformed, and resulted in the web wervice not knowing how
to reply to my request. Hence, "Error opening URL...".
- Ryan
mossdude - 20 Jan 2006 17:02 GMT
When a web service throws an exception, as is probably the case here, it
returns a 505 HTTP response. Flash doesn't respond properly to these packets
(other than saying, "Error opening URL"). Hopefully someone at
Adobe/Macromedia recognizes the need for web service client developers to be
able to have access to the exception messages that appear in these replies.
Until then, a TCP snoop or monitor program is helpful to capture the SOAP
requests and replies so you can determine the cause of these types of errors.