Null Pointer Exception in Service STUB class at  
_operationClient.execute(true); line for AXIS2 1.1.1
-----------------------------------------------------------------------------------------------------

                 Key: AXIS2-1964
                 URL: https://issues.apache.org/jira/browse/AXIS2-1964
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: codegen
    Affects Versions: 1.1.1
         Environment: WINDOWS, JAVA1.4, RAD IDE
            Reporter: Vivek Gawande


The recently released version 1.1.1 gives following NPE. It works fine with 
AXIS2 (1 and 1.1) versions though. The WorkflowServiceAdapterServiceStub is my 
service stub class. 

java.lang.NullPointerException
        at 
com.ctc.wstx.sw.BaseNsStreamWriter.doWriteDefaultNs(BaseNsStreamWriter.java:528)
        at 
com.ctc.wstx.sw.SimpleNsStreamWriter.writeDefaultNamespace(SimpleNsStreamWriter.java:111)
        at 
com.ctc.wstx.sw.SimpleNsStreamWriter.writeNamespace(SimpleNsStreamWriter.java:119)
        at 
org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeNamespace(MTOMXMLStreamWriter.java:146)
        at 
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeElement(StreamingOMSerializer.java:243)
        at 
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(StreamingOMSerializer.java:76)
        at 
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(StreamingOMSerializer.java:59)
        at 
org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMSerializerUtil.java:473)
        at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:823)
        at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:848)
        at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:819)
        at 
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:180)
        at 
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:848)
        at 
org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:419)
        at 
org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.handleOMOutput(SOAPOverHTTPSender.java:190)
        at 
org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.writeRequest(SOAPOverHTTPSender.java:232)
        at 
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:495)
        at 
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1973)
        at 
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993)
        at 
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
        at 
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
        at 
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
        at 
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
        at 
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:541)
        at 
org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:119)
        at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:335)
        at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:204)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:674)
        at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:237)
        at 
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
        at 
com.gnw.eprocess.svc.wf.WorkflowServiceAdapterServiceStub.createWorkItem(WorkflowServiceAdapterServiceStub.java:240)
        at 
com.gnw.eprocess.svc.wf.test.WorkflowServiceAdapterServiceStubTest.testCreateWorkItem(WorkflowServiceAdapterServiceStubTest.java:85)

I compared the files generated for 1.1.1 with 1.1 and there is mismatch on the 
line where it sets Action attribute
1.1 Generated Code: _operationClient.getOptions().setAction("");
1.1.1 Generated Code: 
_operationClient.getOptions().setAction("http://wf.svc.eprocess.gnw.com/WorkflowServiceAdapter/createWorkItemRequest";);
 
We were actually looking for the fix of Bug 1856  in 1.1.1 as our IBM 
Webservice WSDL contains Abstract element, which is causing problems writing 
handlers on our service side on the SOAP Request after deserialization. But now 
the client stopped creating SOAP Request because of above NPE. I am not sure 
whether the Bug 1856 and above problem is related.





-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to