all groups > flash actionscript > september 2007 >
You're in the

flash actionscript

group:

Problem accessing web service


Problem accessing web service
9/4/2007 10:51:34 PM
flash actionscript:
Hi

I am writing a small flash application that calls a webservice and
obtains a result. When I try readng the result, it says it is
undefined.

The webservice is written in Java. I have used the Websphere
environment to convert a java class and implement it as a webservice
and it can be looked up here:
http://131.251.128.72:9080/ClinicalHubServices/services/RetrieveData/wsdl/RetrieveData.wsdl

Here is the java method that I invoke from the flash actionscript:

public String getLatestWeightReading(){
String result = "test";
System.out.println("test");
return result;
}

I have written another java progran that calls the webservice and it
returns the value and I can read it as well.

Here is the actionscript I have written:

trace("i am here");
var myservice1 = new WebService("http://131.251.128.72:9080/
ClinicalHubServices/services/RetrieveData/wsdl/RetrieveData.wsdl");
var res1:PendingCall = myservice1.getLatestWeightReading();
res1.onResult = function(result) {
trace("result = " + result);
}

When I run this code, I can verify that the web service is being
called. But the trace command is displaying undefined. I am not able
to read the result or get the result.

Could someone please help me out?

Thanks
Mahesh
Re: Problem accessing web service
9/5/2007 12:00:00 AM
any pointers please??? help....
AddThis Social Bookmark Button