ResultEvent is always null


hi

i aplogise if has been asked before i've looked answer , couldn't find anytthing.

 

<mx:script>

<![cdata[

import mx.messaging.channels.streamingamfchannel;

import flash.net.sendtourl;

import mx.controls.alert;

import mx.rpc.soap.soapfault;

import mx.rpc.events.resultevent;

import mx.rpc.events.faultevent;

 

private function handlefault(event:faultevent) : void

{

alert.show(event.fault.faultdetail, event.fault.faultstring);

}

 

private function handleresult(event:resultevent) : void

{

 

if(event != null){

if(event.result != null){

lbldisplayjava.text = event.result.tostring();

}

else{

alert.show("event result null", "webservice result");

}

}

else{

alert.show("event result null", "webservice result");

}

}

 

private function invokewebservice() : void

{

javatestwebservice.sayhelloworldfrom.send(txtname.text);

}

 

private function invokehelloworld() : void

{

dotnetservice.helloworld.send(txtname.text);

}

]]>

</mx:script>

<mx:webservice id="javatestwebservice" wsdl="http://localhost:8080/services/helloworld?wsdl"

showbusycursor="true" useproxy="false"

fault="handlefault(event)" result="handleresult(event)">

<mx:operation name="sayhelloworldfrom">

<mx:request>

<from>{txtname.text}</from>

</mx:request>

</mx:operation>

</mx:webservice>

<mx:panel x="0" layout="vertical">

<mx:hbox>

<mx:label id="lblname" text="type in name:" />

<mx:textinput id="txtname" width="300" />

<mx:button id="btnrequestjava" click="invokewebservice()" label="salute java"/>

</mx:hbox>

<mx:hbox>

<mx:label id="lbldisplayjava" text="this should result"/>

</mx:hbox>

</mx:panel>

 

this invoking simple java code

 

  public string sayhelloworldfrom(string from) {

    //string result = "hello, world " + from;

    system.out.println("service invoked");

    return "hello world wilson edgar";

  }

everytime run event.result null.

the webservice being invoked , seems okay, except result. i've run same code calling .net webservice , works fine. unfortunately have develop project in java appreciated.

thanks in advance time

wilson edgar

hi edgar, curiosity have try invoking web service web page?



More discussions in LiveCycle Data Services


adobe

Comments

Popular posts from this blog

Flip address is out of range arduino uno r3

Arduino Uno not uploading

Indesign and MathType fonts