Found the problem, needed to insert a _returnEnv.build() prior to the return.

Trying to do a toString() on the object, outside of the 'skeleton' class
failed because objects that where used to build the object had been garbage
collected.



lyall wrote:
> 
> 
> ...snip...
> public  org.apache.axiom.soap.SOAPEnvelope  process(
>        org.apache.axiom.soap.SOAPEnvelope  theEnvelope)
>         throws java.rmi.RemoteException
>     {
>         org.apache.axis2.context.MessageContext _messageContext = null;
>         try {
>             org.apache.axis2.client.OperationClient _operationClient = 
>                 _serviceClient.createClient(_operations[0].getName());
>             _operationClient.getOptions().setAction("process");
>            
> _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
> 
>             addPropertyToOperationClient(_operationClient, 
>                                         
> org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
>  
>                                          "&");
>             // create a message context
>             _messageContext = new
> org.apache.axis2.context.MessageContext();
> 
>             //adding SOAP soap_headers
>             _serviceClient.addHeadersToEnvelope(theEnvelope);
>             // set the message context with that soap envelope
>             _messageContext.setEnvelope(theEnvelope);
> 
>             // add the message contxt to the operation client
>             _operationClient.addMessageContext(_messageContext);
> 
>             //execute the operation client
>             _operationClient.execute(true);
>             org.apache.axis2.context.MessageContext _returnMessageContext
> = 
>                
> _operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
>             org.apache.axiom.soap.SOAPEnvelope _returnEnv =
> _returnMessageContext.getEnvelope();
>             return _returnEnv;
>         } catch (org.apache.axis2.AxisFault f) {
> ...snip...
> }
> 
> 

-- 
View this message in context: 
http://www.nabble.com/AXIS2-Client-beginner...-Exception-converting-to-string.-tp25530980p25676552.html
Sent from the Axis - User mailing list archive at Nabble.com.

Reply via email to