Note that there are some explanatory texts on larger screens.

plurals
  1. POJava Webservice unmarshal issue
    primarykey
    data
    text
    <p>I am sending a request to webservice and am receiving correct response from web service in xml format with the correct value populated in the response element tags. Now I tried to unmarshal but the response object is being populated with null instead of the value I see in XML response.</p> <p>Here is my code:</p> <pre><code>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(); java.lang.Object object = fromOM( _returnEnv.getBody().getFirstElement(), com.siebel.asi.QueryByExample1Output.class, getEnvelopeNamespaces(_returnEnv)); </code></pre> <p>and following method :</p> <pre><code>try { javax.xml.bind.JAXBContext context = wsContext; javax.xml.bind.Unmarshaller unmarshaller = context.createUnmarshaller(); return unmarshaller.unmarshal( param.getXMLStreamReaderWithoutCaching(), type).getValue(); } catch (javax.xml.bind.JAXBException bex) { </code></pre> <p>The response object is becoming null even though I can see output response in XML format. This is how I am setting up wscontext : </p> <pre><code>private static final javax.xml.bind.JAXBContext wsContext; static { javax.xml.bind.JAXBContext jc; jc = null; try { jc = javax.xml.bind.JAXBContext.newInstance( com.siebel.asi.QueryByExample1Input.class, com.siebel.asi.QueryByExample1Output.class, com.siebel.asi.QueryById1Input.class, com.siebel.asi.QueryById1Output.class ); } catch ( javax.xml.bind.JAXBException ex ) { System.err.println("Unable to create JAXBContext: " + ex.getMessage()); ex.printStackTrace(System.err); Runtime.getRuntime().exit(-1); } finally { wsContext = jc; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload