You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Stephane Roy <st...@alcatel-lucent.fr> on 2007/05/14 17:39:05 UTC
[Axis2] problem with client execution in xmlbeans mode
Hi,
I have difficulties 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)
I would like to know if someone had this kind of problem before.
What did I do wrong ?
Thanks in advance.
Stephane Roy
Alcatel-Lucent
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2] problem with client execution in xmlbeans mode
Posted by Stephane Roy <st...@alcatel-lucent.fr>.
Hi Davanum,
It appears that I found the solution 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 occurr anymore !
Hope this info will be useful to the community.
Stephane Roy
Alcatel-Lucent
Davanum Srinivas wrote:
> Stephane,
>
> We've multiple reports of this now..with no JIRA's. Could you please
> create a new issue and upload your wsdl/xsd and sample code?
>
> thanks,
> dims
>
> On 5/14/07, Stephane Roy <st...@alcatel-lucent.fr> wrote:
>> Hi,
>>
>> I have difficulties 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)
>>
>>
>> I would like to know if someone had this kind of problem before.
>> What did I do wrong ?
>>
>> Thanks in advance.
>>
>> Stephane Roy
>> Alcatel-Lucent
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2] problem with client execution in xmlbeans mode
Posted by Davanum Srinivas <da...@gmail.com>.
Stephane,
We've multiple reports of this now..with no JIRA's. Could you please
create a new issue and upload your wsdl/xsd and sample code?
thanks,
dims
On 5/14/07, Stephane Roy <st...@alcatel-lucent.fr> wrote:
> Hi,
>
> I have difficulties 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)
>
>
> I would like to know if someone had this kind of problem before.
> What did I do wrong ?
>
> Thanks in advance.
>
> Stephane Roy
> Alcatel-Lucent
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Davanum Srinivas :: http://davanum.wordpress.com
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org