Hello!

I am trying to call web service created in OFBiz framework(it uses
axis java web services).
I am having two problems

1)      Here is my flex client code
<mx:WebService  id="ws"
wsdl="http://localhost:8080/webtools/control/SOAPService/getOrderInformation?wsdl";
showBusyCursor="true" > 
                <mx:operation name="getOrderInformation" 
result="controller.resultHandlerGetOrderInformation(event)">
                        <mx:request format="xml">  
                                <getOrderInformation>   
                                        
<orderId>{myDataGrid.selectedItem}</orderId>                                    
                                </getOrderInformation>                  
                        </mx:request>                           
                </mx:operation>
        </mx:WebService>

And then I do
Application.application.ws.getOrderInformation.send();
      In soap message body my argument orderId equals to null. But if
I pass hard coded string instead of {myDataGrid.selectedItem}. It
works perfectly fine

2)      I tried to pass arguments thru Action Script code and I did the
following
      <mx:WebService  id="ws"
wsdl="http://localhost:8080/webtools/control/SOAPService/getOrderInformation?wsdl";
showBusyCursor="true" />

       And in Action Script
       var selectedOrderId:string =
Application.application.myDataGrid.selectedItem.value;
       Application.application.ws.getOrderInformation(selectedOrderId);
       
        I also tried
<mx:WebService  id="ws"
wsdl="http://localhost:8080/webtools/control/SOAPService/getOrderInformation?wsdl";
showBusyCursor="true" >         <mx:operation name="getOrderInformation" 
result="controller.resultHandlerGetOrderInformation(event)"/>
</mx:WebService>

  And in Action Script
        var selectedOrderId:string =
Application.application.myDataGrid.selectedItem.value;
       
Application.application.ws.getOrderInformation.send(selectedOrderId);
     
When I look in the soap message body it doesn't have the wrapper for
the name of the operation, it contains only argument with its value
and flex gives me an error

[RPC Fault faultString="Error #1009: Cannot access a property or
method of a null object reference." faultCode="DecodingError"
faultDetail="null"]
        at
mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::processResult()
        at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()
        at mx.rpc::Responder/result()
        at mx.rpc::AsyncRequest/acknowledge()
        at ::DirectHTTPMessageResponder/completeHandler()
        at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flash.net::URLLoader/flash.net:URLLoader::onComplete()

Please Help!! Can't seem to figure out what is going on. In adobe docs
it says that flex supports both type of mappings RPC and Document. 
Also I can't figure out why variable for the argument is read as null?
If I could resolve the first problem it would resolve my issue.

Thanks a lot for your time
Marina




Reply via email to