Hello,
I have seen a few posts on this but without a result, so trying again in case there has been some progress. First of all I ran the UsWeather example, imported the webservices etc. and this works. I then tried the same for my web service, jax-ws create via netbeans and this doesn't work. It is a simple calc function that should accept two integer, i and j and return the sum. From what I can make out it is because the parameters are somehow wrapped and are not visible via the creates action scripts
So when I run this sort of thing:
private var calc:CalcWSService = new CalcWSService;
var req:Add_request = new Add_request();
req.i = 2;
req.j = 3;
calc.add_request_var = req;
// Invoke the method
calc.add_send();
I get the error message
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Test/getMyCalc2()[Y:\FlexWorkspaces\TestWorkSpace\Test\src\Test.mxml:64]
at Test/___Test_Button4_click()[Y:\FlexWorkspaces\TestWorkSpace\Test\src\Test.mxml:92]
If I reference my web service as follows
<mx:WebService id="webService" wsdl="http://localhost:8080/CalcWSProject/CalcWSService?wsdl" >
<mx:operation name="add" resultFormat="object" result="display(event);">
<mx:request xmlns="" >
<i>2</i>
<j>4</j>
</mx:request>
</mx:operation>
</mx:WebService>
and run
webService.add.send();
then it works
The generated CalcWSService.as add function looks like this(i.e.the parameters appear to be hidden
public function add(add:Add):AsyncToken
{
var _internal_token:AsyncToken = _baseService.add(add);
_internal_token.addEventListener("result",_add_populate_results);
_internal_token.addEventListener("fault",throwFault);
return _internal_token;
}
Any way to get around the problem when importing the web services via the wizard?
Views
Replies
Total Likes