axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AXIS2-2757) problem with client execution in xmlbeans mode
Date Wed, 06 Jun 2007 18:41:26 GMT

     [ https://issues.apache.org/jira/browse/AXIS2-2757?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Davanum Srinivas resolved AXIS2-2757.
-------------------------------------

    Resolution: Fixed

> problem with client execution in xmlbeans mode
> ----------------------------------------------
>
>                 Key: AXIS2-2757
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2757
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.2
>            Reporter: Stephane Roy
>
> There is a problem to create a web service with the xmlbeans mode. I tried the following
scenario in Axis2.1.1.1 and Axis2.1.2 but I have the same error each time.
> 1) I generate the server part with the command:
>    $AXIS2_HOME/bin/wsdl2java.sh -uri myService.wsdl -p my.package -o /tmp/my/dir/server
-d xmlbeans -s -wv 1.1 -ss -sd
> 2) I compile and deploy the server in Tomcat
> 3) I generate the client part with the command:
>    $AXIS2_HOME/bin/wsdl2java.sh -uri myService.wsdl -p my.package -o /tmp/my/dir/client
-d xmlbeans -s
> 4) I compile and start the client and I got the following error as soon as the client
tries to call any method of the web service:
>     java.lang.NullPointerException
>         at com.ctc.wstx.sw.BaseNsStreamWriter.doWriteDefaultNs(BaseNsStreamWriter.java:529)
>         at com.ctc.wstx.sw.SimpleNsStreamWriter.writeDefaultNamespace(SimpleNsStreamWriter.java:113)
>         at com.ctc.wstx.sw.SimpleNsStreamWriter.writeNamespace(SimpleNsStreamWriter.java:121)
>         at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeNamespace(MTOMXMLStreamWriter.java:148)
>         at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeElement(StreamingOMSerializer.java:238)
>         at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(StreamingOMSerializer.java:71)
>         at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(StreamingOMSerializer.java:54)
>         at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMSerializerUtil.java:490)
>         at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:783)
>         at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:808)
>         at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:234)
>         at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:222)
>         at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:808)
>         at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:418)
>         at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:55)
>         at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
>         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:558)
>         at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:176)
>         at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:73)
>         at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:305)
>         at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:201)
>         at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:452)
>         at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:330)
>         at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
>         at my.package.myServiceStub.myMethod(myServiceStub.java:xxx)
> After analysis, I found a workaround to my problem. By analysing the web service example
of the Axis2 tutorial, I noticed that the WSDL included this definition:
> >>>
> elementFormDefault="qualified"
> >>>
> Since I didn't have it in my web service, I added this definition in my XSD and the NullPointerException
doesn't not occur anymore ! 
> If this definition is required in the XSD schema, Axis2 documentation should mention
it.
> Thanks in advance.
> PS: This problem has been submitted to the User mailing list:
> http://marc.info/?l=axis-user&m=117915717919750&w=2

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message