Details
Description
I use the Axis2 wsdl2java generator with the following options: -uri MyTest.wsdl -o Test -d xmlbeans -s -u -sn Test_Service -pn Test_Port -ns2p
In the generated stub the toOM(RequestDocument param) function creates XmlOptions to serialize the message:
org.apache.xmlbeans.XmlOptions xmlOptions = new org.apache.xmlbeans.XmlOptions();
param.save(outputStream, xmlOptions.setSaveNoXmlDecl());
As a consequence XmlOption used while instantiating the param element are not taken into account. In particular if we specify the use of default namespace as follows:
org.apache.xmlbeans.XmlOptions xmlOptions = new org.apache.xmlbeans.XmlOptions();
xmlOptions.setUseDefaultNamespace();
RequestDocument query = RequestDocument .Factory.newInstance(xmlOptions);
Would it be possible to
- either keep the XmlOptions as an attribute of the XmlObject (or XmlTokenSource)
- or provide a method to pass XmlOptions to the client stub for reuse while serializing the messages.