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 eric zhou <er...@gmail.com> on 2007/03/16 20:27:22 UTC

question on wsdl2java generated client

Hi,

 

I met the following error while compiling client code generated from
wsdl2java, 

 

 [javac] \client\StopServiceStub.java:26070: getClass() in
cient.StopServiceStub.Class31 cannot override getClass() in
java.lang.Object; overridden method is final
[javac] public Class getClass(){
[javac] ^

 

 

It seems to be the same described in this post:

 

http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=next_topic
<http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=next_topic&f=51&
t=004144&go=older> &f=51&t=004144&go=older

 

 

Any suggestions are appreciated!

 

 

eric


RE: AXIS2 doWriteDefaultNs problem, please help

Posted by "Sampige, Srinivas" <SS...@DIRECTV.com>.
I found what the problem was. I was missing -   elementFormDefault="qualified"    in the xsd:schema tag.  Looks like this is a bug in AXIS2. Hope this helps others facing the same issue.

 

-Srinivas

 

________________________________

From: Sampige, Srinivas [mailto:SSampige@DIRECTV.com] 
Sent: Monday, March 19, 2007 5:27 PM
To: axis-user@ws.apache.org
Subject: RE: AXIS2 doWriteDefaultNs problem, please help

 

Okay,

 

Here is the input xml; unfortunately when I uncomment the line that sets the parameters it does not make it as far as sending anything on the wire so I cannot get the full xml on the TCP monitor.

 

 

<TestRequest xmlns="http://tempuri.org/">

  <inputParam xmlns="">hello</inputParam>

</TestRequest>

 

But, when I comment out the line that sets the parameter I can see the request on the TCP monitor -

 

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><TestRequest xmlns="http://tempuri.org/" /></soapenv:Body></soapenv:Envelope>

 

So, it seems to choking on the input parameter because of a namespace not being there. I have attached the WSDL and Test.java file once again. The line of code which I am commenting/ uncommenting is the 5th line in the following snippet (from attached Test.java)-

 

        String endPoint = "http://localhost:5280/ItxWebService/services/ScheduleServiceSoap";

        AsRunRetrievalServiceStub stub = new AsRunRetrievalServiceStub(endPoint);

        System.out.println("Connecting to .."+endPoint);

        TestRequest testRequest = TestRequest.Factory.newInstance();

        //testRequest.setInputParam("hello");  

        

        TestRequestDocument testRequestDocument = TestRequestDocument.Factory.newInstance();

        testRequestDocument.setTestRequest(testRequest);

        

        System.out.println("the xml is "+testRequestDocument);

        TestResponseDocument testResponseDocument =  stub.Test(testRequestDocument);

 

 

I wonder why it is working in AXIS1 and not in AXIS2.

 

Thanks in advance

-srinivas

 

________________________________

From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Monday, March 19, 2007 3:57 PM
To: axis-user@ws.apache.org
Subject: Re: AXIS2 doWriteDefaultNs problem, please help

 

Difficult to diagnose without seeing the input source xml


M--

--------------------------------------------------------------------------- 
This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.
--------------------------------------------------------------------------- 
Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire.

	----- Original Message ----- 

	From: Sampige, Srinivas <ma...@DIRECTV.com>  

	To: axis-user@ws.apache.org 

	Sent: Monday, March 19, 2007 6:20 PM

	Subject: AXIS2 doWriteDefaultNs problem, please help

	 

	I forgot to include more details in my previous post -

	 

	The same WSDL and works in AXIS1.  I am running Tomcat5.5.2

	 

	I generated an AXIS2 client, when I try to run the client I get the following exception. Any help is appreciated. I have attached the WSDL and the test source file.

	 

	   [java] Caused by: java.lang.NullPointerException

	   [java]     at com.ctc.wstx.sw.BaseNsStreamWriter.doWriteDefaultNs(BaseNsStreamWriter.java:528)

	   [java]     at com.ctc.wstx.sw.SimpleNsStreamWriter.writeDefaultNamespace(SimpleNsStreamWriter.java:111)

	   [java]     at com.ctc.wstx.sw.SimpleNsStreamWriter.writeNamespace(SimpleNsStreamWriter.java:119)

	   [java]     at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeNamespace(MTOMXMLStreamWriter.java:146)

	   [java]     at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeElement(StreamingOMSerializer.java:243)

	   [java]     at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(StreamingOMSerializer.java:76)

	   [java]     at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(StreamingOMSerializer.java:59)

	   [java]     at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMSerializerUtil.java:473)

	   [java]     at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:823)

	   [java]     at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:848)

	   [java]     at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:819)

	   [java]     at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:180)

	   [java]     at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:848)

	   [java]     at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:419)

	   [java]     at org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.handleOMOutput(SOAPOverHTTPSender.java:190)

	 

	   [java]     at org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.writeRequest(SOAPOverHTTPSender.java:232)

	   [java]     at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:495)

	   [java]     at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1973)

	   [java]     at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993)

	   [java]     at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)

	   [java]     at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)

	   [java]     at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)

	   [java]     at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)

	   [java]     at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:541)

	   [java]     at org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:119)

	   [java]     at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:3

	) 


RE: AXIS2 doWriteDefaultNs problem, please help

Posted by "Sampige, Srinivas" <SS...@DIRECTV.com>.
Okay,

 

Here is the input xml; unfortunately when I uncomment the line that sets the parameters it does not make it as far as sending anything on the wire so I cannot get the full xml on the TCP monitor.

 

 

<TestRequest xmlns="http://tempuri.org/">

  <inputParam xmlns="">hello</inputParam>

</TestRequest>

 

But, when I comment out the line that sets the parameter I can see the request on the TCP monitor -

 

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header /><soapenv:Body><TestRequest xmlns="http://tempuri.org/" /></soapenv:Body></soapenv:Envelope>

 

So, it seems to choking on the input parameter because of a namespace not being there. I have attached the WSDL and Test.java file once again. The line of code which I am commenting/ uncommenting is the 5th line in the following snippet (from attached Test.java)-

 

        String endPoint = "http://localhost:5280/ItxWebService/services/ScheduleServiceSoap";

        AsRunRetrievalServiceStub stub = new AsRunRetrievalServiceStub(endPoint);

        System.out.println("Connecting to .."+endPoint);

        TestRequest testRequest = TestRequest.Factory.newInstance();

        //testRequest.setInputParam("hello");  

        

        TestRequestDocument testRequestDocument = TestRequestDocument.Factory.newInstance();

        testRequestDocument.setTestRequest(testRequest);

        

        System.out.println("the xml is "+testRequestDocument);

        TestResponseDocument testResponseDocument =  stub.Test(testRequestDocument);

 

 

I wonder why it is working in AXIS1 and not in AXIS2.

 

Thanks in advance

-srinivas

 

________________________________

From: Martin Gainty [mailto:mgainty@hotmail.com] 
Sent: Monday, March 19, 2007 3:57 PM
To: axis-user@ws.apache.org
Subject: Re: AXIS2 doWriteDefaultNs problem, please help

 

Difficult to diagnose without seeing the input source xml


M--

--------------------------------------------------------------------------- 
This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.
--------------------------------------------------------------------------- 
Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire.

	----- Original Message ----- 

	From: Sampige, Srinivas <ma...@DIRECTV.com>  

	To: axis-user@ws.apache.org 

	Sent: Monday, March 19, 2007 6:20 PM

	Subject: AXIS2 doWriteDefaultNs problem, please help

	 

	I forgot to include more details in my previous post -

	 

	The same WSDL and works in AXIS1.  I am running Tomcat5.5.2

	 

	I generated an AXIS2 client, when I try to run the client I get the following exception. Any help is appreciated. I have attached the WSDL and the test source file.

	 

	   [java] Caused by: java.lang.NullPointerException

	   [java]     at com.ctc.wstx.sw.BaseNsStreamWriter.doWriteDefaultNs(BaseNsStreamWriter.java:528)

	   [java]     at com.ctc.wstx.sw.SimpleNsStreamWriter.writeDefaultNamespace(SimpleNsStreamWriter.java:111)

	   [java]     at com.ctc.wstx.sw.SimpleNsStreamWriter.writeNamespace(SimpleNsStreamWriter.java:119)

	   [java]     at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeNamespace(MTOMXMLStreamWriter.java:146)

	   [java]     at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeElement(StreamingOMSerializer.java:243)

	   [java]     at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(StreamingOMSerializer.java:76)

	   [java]     at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(StreamingOMSerializer.java:59)

	   [java]     at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMSerializerUtil.java:473)

	   [java]     at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:823)

	   [java]     at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:848)

	   [java]     at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:819)

	   [java]     at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:180)

	   [java]     at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:848)

	   [java]     at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:419)

	   [java]     at org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.handleOMOutput(SOAPOverHTTPSender.java:190)

	 

	   [java]     at org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.writeRequest(SOAPOverHTTPSender.java:232)

	   [java]     at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:495)

	   [java]     at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1973)

	   [java]     at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993)

	   [java]     at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)

	   [java]     at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)

	   [java]     at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)

	   [java]     at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)

	   [java]     at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:541)

	   [java]     at org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:119)

	   [java]     at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:3

	) 


Re: AXIS2 doWriteDefaultNs problem, please help

Posted by Martin Gainty <mg...@hotmail.com>.
Difficult to diagnose without seeing the input source xml

M--
--------------------------------------------------------------------------- 
This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited.
--------------------------------------------------------------------------- 
Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire.
  ----- Original Message ----- 
  From: Sampige, Srinivas 
  To: axis-user@ws.apache.org 
  Sent: Monday, March 19, 2007 6:20 PM
  Subject: AXIS2 doWriteDefaultNs problem, please help


  I forgot to include more details in my previous post -

   

  The same WSDL and works in AXIS1.  I am running Tomcat5.5.2

   

  I generated an AXIS2 client, when I try to run the client I get the following exception. Any help is appreciated. I have attached the WSDL and the test source file.

   

     [java] Caused by: java.lang.NullPointerException

     [java]     at com.ctc.wstx.sw.BaseNsStreamWriter.doWriteDefaultNs(BaseNsStreamWriter.java:528)

     [java]     at com.ctc.wstx.sw.SimpleNsStreamWriter.writeDefaultNamespace(SimpleNsStreamWriter.java:111)

     [java]     at com.ctc.wstx.sw.SimpleNsStreamWriter.writeNamespace(SimpleNsStreamWriter.java:119)

     [java]     at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeNamespace(MTOMXMLStreamWriter.java:146)

     [java]     at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeElement(StreamingOMSerializer.java:243)

     [java]     at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(StreamingOMSerializer.java:76)

     [java]     at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(StreamingOMSerializer.java:59)

     [java]     at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMSerializerUtil.java:473)

     [java]     at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:823)

     [java]     at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:848)

     [java]     at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:819)

     [java]     at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:180)

     [java]     at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:848)

     [java]     at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:419)

     [java]     at org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.handleOMOutput(SOAPOverHTTPSender.java:190)

   

     [java]     at org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.writeRequest(SOAPOverHTTPSender.java:232)

     [java]     at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:495)

     [java]     at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1973)

     [java]     at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993)

     [java]     at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)

     [java]     at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)

     [java]     at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)

     [java]     at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)

     [java]     at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:541)

     [java]     at org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:119)

     [java]     at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:3

  ) 

AXIS2 doWriteDefaultNs problem, please help

Posted by "Sampige, Srinivas" <SS...@DIRECTV.com>.
I forgot to include more details in my previous post -

 

The same WSDL and works in AXIS1.  I am running Tomcat5.5.2

 

I generated an AXIS2 client, when I try to run the client I get the
following exception. Any help is appreciated. I have attached the WSDL
and the test source file.

 

   [java] Caused by: java.lang.NullPointerException

   [java]     at
com.ctc.wstx.sw.BaseNsStreamWriter.doWriteDefaultNs(BaseNsStreamWriter.j
ava:528)

   [java]     at
com.ctc.wstx.sw.SimpleNsStreamWriter.writeDefaultNamespace(SimpleNsStrea
mWriter.java:111)

   [java]     at
com.ctc.wstx.sw.SimpleNsStreamWriter.writeNamespace(SimpleNsStreamWriter
.java:119)

   [java]     at
org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeNamespace(MTOMXMLStrea
mWriter.java:146)

   [java]     at
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeElemen
t(StreamingOMSerializer.java:243)

   [java]     at
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(S
treamingOMSerializer.java:76)

   [java]     at
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(Strea
mingOMSerializer.java:59)

   [java]     at
org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMS
erializerUtil.java:473)

   [java]     at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI
mpl.java:823)

   [java]     at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(
OMElementImpl.java:848)

   [java]     at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI
mpl.java:819)

   [java]     at
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPE
nvelopeImpl.java:180)

   [java]     at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(
OMElementImpl.java:848)

   [java]     at
org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.
java:419)

   [java]     at
org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity
.handleOMOutput(SOAPOverHTTPSender.java:190)

 

   [java]     at
org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity
.writeRequest(SOAPOverHTTPSender.java:232)

   [java]     at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequest
Body(EntityEnclosingMethod.java:495)

   [java]     at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase
.java:1973)

   [java]     at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java
:993)

   [java]     at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMe
thodDirector.java:397)

   [java]     at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho
dDirector.java:170)

   [java]     at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
96)

   [java]     at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
46)

   [java]     at
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(Abstrac
tHTTPSender.java:541)

   [java]     at
org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSend
er.java:119)

   [java]     at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW
ithCommons(CommonsHTTPTransportSender.java:3

) 


AXIS2 doWriteDefaultNs problem, please help

Posted by "Sampige, Srinivas" <SS...@DIRECTV.com>.
I generated an AXIS2 client, when I try to run the client I get the
following exception. Any help is appreciated. I have attached the WSDL
and the test source file.

 

   [java] Caused by: java.lang.NullPointerException

   [java]     at
com.ctc.wstx.sw.BaseNsStreamWriter.doWriteDefaultNs(BaseNsStreamWriter.j
ava:528)

   [java]     at
com.ctc.wstx.sw.SimpleNsStreamWriter.writeDefaultNamespace(SimpleNsStrea
mWriter.java:111)

   [java]     at
com.ctc.wstx.sw.SimpleNsStreamWriter.writeNamespace(SimpleNsStreamWriter
.java:119)

   [java]     at
org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeNamespace(MTOMXMLStrea
mWriter.java:146)

   [java]     at
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeElemen
t(StreamingOMSerializer.java:243)

   [java]     at
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(S
treamingOMSerializer.java:76)

   [java]     at
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(Strea
mingOMSerializer.java:59)

   [java]     at
org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMS
erializerUtil.java:473)

   [java]     at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI
mpl.java:823)

   [java]     at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(
OMElementImpl.java:848)

   [java]     at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI
mpl.java:819)

   [java]     at
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPE
nvelopeImpl.java:180)

   [java]     at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(
OMElementImpl.java:848)

   [java]     at
org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.
java:419)

   [java]     at
org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity
.handleOMOutput(SOAPOverHTTPSender.java:190)

 

   [java]     at
org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity
.writeRequest(SOAPOverHTTPSender.java:232)

   [java]     at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequest
Body(EntityEnclosingMethod.java:495)

   [java]     at
org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase
.java:1973)

   [java]     at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java
:993)

   [java]     at
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMe
thodDirector.java:397)

   [java]     at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho
dDirector.java:170)

   [java]     at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
96)

   [java]     at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
46)

   [java]     at
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(Abstrac
tHTTPSender.java:541)

   [java]     at
org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSend
er.java:119)

   [java]     at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW
ithCommons(CommonsHTTPTransportSender.java:3

) 


RE: question on wsdl2java generated client

Posted by eric zhou <er...@gmail.com>.
Amila,

 

Thanks for your reply.

No, I don't have any element Name named as "class" or "Class".

 

However, I did find that the error has something to do with defining an enum
type inside the service implementation class.

Because after I remove the enum type, and replace it with plain String,
everything works fine.

 

Is there some sample code on using custom data type in Axis2?

 

Thank you again,

 

eric

 

  _____  

From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com] 
Sent: Monday, March 19, 2007 3:19 AM
To: axis-user@ws.apache.org
Subject: Re: question on wsdl2java generated client

 

Are you using any element Name named as "class" or "Class"

On 3/17/07, eric zhou <ericzhouh@gmail.com  <ma...@gmail.com> >
wrote:

Hi,

 

I met the following error while compiling client code generated from
wsdl2java, 

 

 [javac] \client\StopServiceStub.java:26070: getClass() in
cient.StopServiceStub.Class31 cannot override getClass() in
java.lang.Object; overridden method is final
[javac] public Class getClass(){
[javac] ^

 

 

It seems to be the same described in this post:

 

http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=next_topic
<http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=next_topic&f=51&
t=004144&go=older> &f=51&t=004144&go=older

 

 

Any suggestions are appreciated!

 

 

eric




-- 
Amila Suriarachchi,
WSO2 Inc. 


Re: question on wsdl2java generated client

Posted by Amila Suriarachchi <am...@gmail.com>.
Are you using any element Name named as "class" or "Class"

On 3/17/07, eric zhou <er...@gmail.com> wrote:
>
>  Hi,
>
>
>
> I met the following error while compiling client code generated from
> wsdl2java,
>
>
>
>  [javac] \client\StopServiceStub.java:26070: getClass() in
> cient.StopServiceStub.Class31 cannot override getClass() in
> java.lang.Object; overridden method is final
> [javac] public Class getClass(){
> [javac] ^
>
>
>
>
>
> It seems to be the same described in this post:
>
>
>
>
> http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=next_topic&f=51&t=004144&go=older
>
>
>
>
>
> Any suggestions are appreciated!
>
>
>
>
>
> eric
>



-- 
Amila Suriarachchi,
WSO2 Inc.