axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gainty" <>
Subject Re: Axis2: OMElement response message problem
Date Thu, 10 May 2007 14:41:59 GMT
Any reason why you are cannot xmit the entity with Attachment as in /sample/soapwithattachments/client/

This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.

  ----- Original Message ----- 
  From: Reneta Säll (HF/EBC) 
  Sent: Thursday, May 10, 2007 9:51 AM
  Subject: Axis2: OMElement response message problem

  Hi everybody,

  I'm having a problem with Axis2 web service that uploads txt file. The downloading works
  The file content is binary 64 type and is transfered as xml element in the Soap message.(not
as attachment!!!)
  The size of my txt file is 3 KB. When I minimized the file size to1 KB then the problem
does't exist.  

  The web service works fine with Axis 1.4. but not in Axis2?

  Is the max size of the OMElement in the response limited: firstChild, LastChild in some

  When I ran the client  it occured a wrong: java.lang.NullPointerException, then I debuged,
it shows that: com.sun.jdi.InvocationException - exception held inside the result.

  I am using autogenerated wsdl2java Stub:

  public View( param18) throws




          org.apache.axis2.client.OperationClient _operationClient = _serviceClient.




                      // create SOAP envelope with that payload

          org.apache.axiom.soap.SOAPEnvelope env = null;

          //Style is Doc.

          env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),param18,optimizeContent(new

          //adding SOAP headers


          // create message context with that soap envelope

          org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();


          // add the message contxt to the operation client


          //execute the operation client


          org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext

          org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();

 omElement = _returnEnv.getBody().getFirstElement();

          java.lang.Object object = fromOM( _returnEnv.getBody().getFirstElement(),,
getEnvelopeNamespaces    (_returnEnv));


          return ( object;


  When I debug this (autogenerated) piece of code with a breakpoint on the return statement,
the debugger says "com.sun.jdi.InvocationException occurred invoking method" and I get cin
the client  java.lang.NullPointerException.

  I hope this is enough information. Please help me out with this.

  Best regards, Reneta

View raw message