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 Ahmad Siddiqi <mu...@gmail.com> on 2011/07/08 21:09:04 UTC
Suppress namespace prefix in SOAP request using JiBX
Hi,
I am using Axis2 1.6.0 with JiBX 1.2.3.
I have a web service client that sends out SOAP messages. I need to remove
the namespace prefixes from those messages. So far I have tried two
approaches:
1. Using the -sp option, which doesn't work. So, probably it's meant for ADB
only.
2. Setting default="none" in the binding/namespace element of the JiBX
binding.xml file, e.g.
<namespace uri="http://webservices.abc.com/Customer/2.0"
default="none" prefix="tns"/>
Option 2 works in JiBX generated code itself. If I use the
IMarshallingContext class's marshalDocument() method, the generated XML
doesn't have any namespace prefix. However, now WSDL2Java fails with an
exception e.g.
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: No mapping defined for element {
http://webservices.abc.com/Customer/2.0}UpdateCustomer
Is there any way to suppress namespaces in SOAP requests while using JiBX ?
Thanks !
Ahmad