I have a WSDL that defines a namespace like:
<wsdl:definitions
...
xmlns:mytype="urn:/some/types"
...
>
and then later targets that namespace like:
<xs:schema elementFormDefault="qualified" targetNamespace="urn:/some/types"
>
<xs:element name="MyFunction">
<xs:complexType>
<xs:sequence>
<xs:element name="element" minOccurs="1" maxOccurs="1"
type="xs:NMTOKEN"
/>
<xs:element name="name" minOccurs="1" maxOccurs="1" type="xs:NMTOKEN" />
</xs:sequence>
</xs:complexType>
</xs:element>
JAXWS then generates the following XML with auto-generated prefixes:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body><ns2:MyFunction xmlns:ns2="urn:/some/types" ... >
<ns2:element>form</ns2:element>
<ns2:name>simple</ns2:name>
</ns2:MyFunction></S:Body>
</S:Envelope>
I'm working with a server that needs the XML to use the exact prefix that was contained in the wsdl like:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body><mytype:MyFunction xmlns:mytype="urn:/some/types" ... >
<mytype:element>form</mytype:element>
<mytype:name>simple</mytype:name>
</mytype:MyFunction></S:Body>
</S:Envelope>
Is there some way I can generate this expected XML just by editing the WSDL? I know I can annotate package-info.java, but I need this done through the WSDL if possible.