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 "Chisholm, Paul" <Pa...@AirservicesAustralia.com> on 2009/02/27 05:06:03 UTC
How to remove namespaces
Hi,
I have an Axis2 web service that was running for some time without any
namespaces. Just recently I found out that at some point a few months
ago namespaces started appearing in the response. Since I only just got
a report its difficult to recall what changed. I am certain my service
and the version of Axis (1.4) did not change, though I did upgrade from
Java 5 to java 6.
Could changes to the XML libraries have caused the addition of the
namespaces?
Given the namespaces are included, is there any way I can configure
Axis2/XMLBeans/Java to just not include namespaces in the response.
Here is an example request
<put-chart source="MIS" requestor="MIS" xmlns="http://asa/met">
<descriptor xmlns="">
<code>IDQ60010</code>
<source>BoM</source>
<format>Text</format>
<resolution>LO</resolution>
</descriptor>
<content xmlns="">cGF1bCB0ZXN0Mg==</content>
</put-chart>
And the response is
<met:put-chart-rsp status="SUCCESS" xmlns:met="http://asa/met"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/>
The XML above was generated with the toString method on the the
Axis2/XMLBeans generated classes.
Note I start with XSD and generate everything from there. Originally I
started with elementFormDefault="qualified". I tried changing it to
elementFormDefault="unqualified" but still got the namespace
decorations.
Thanks,
Paul