axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sampige, Srinivas" <>
Subject RE: AXIS2 doWriteDefaultNs problem, please help
Date Tue, 20 Mar 2007 17:13:06 GMT
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.





From: Sampige, Srinivas [] 
Sent: Monday, March 19, 2007 5:27 PM
Subject: RE: AXIS2 doWriteDefaultNs problem, please help




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="">

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



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=""><soapenv:Header
/><soapenv:Body><TestRequest xmlns="" /></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 file once again. The line of code which I am commenting/ uncommenting
is the 5th line in the following snippet (from attached


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

        AsRunRetrievalServiceStub stub = new AsRunRetrievalServiceStub(endPoint);

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

        TestRequest testRequest = TestRequest.Factory.newInstance();



        TestRequestDocument testRequestDocument = TestRequestDocument.Factory.newInstance();



        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




From: Martin Gainty [] 
Sent: Monday, March 19, 2007 3:57 PM
Subject: Re: AXIS2 doWriteDefaultNs problem, please help


Difficult to diagnose without seeing the input source xml


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
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 <>  


	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(

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

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

	   [java]     at

	   [java]     at

	   [java]     at

	   [java]     at

	   [java]     at

	   [java]     at

	   [java]     at

	   [java]     at

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

	   [java]     at

	   [java]     at

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


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

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

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

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

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

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

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

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

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

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

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


View raw message