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:[EMAIL PROTECTED] 
Sent: Monday, March 19, 2007 5:27 PM
To: [email protected]
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:[EMAIL PROTECTED] 
Sent: Monday, March 19, 2007 3:57 PM
To: [email protected]
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 <mailto:[EMAIL PROTECTED]>  

        To: [email protected] 

        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

        ) 

Reply via email to