Hi Peter,
I had the same problem.
It seems to be that WSDL2Java generates wrong Skeleton and Stubs.
If you have a closer look into these files you will see namespace declarations with
empty strings ("").
Modify these with your namespace and you will get the correct message
Regards
Oliver
____________________________________________________________________
Oliver Adler, Senior Consultant
SYRACOM Systems AG - "The IT-Architects"
Otto-von-Guericke-Ring 15
D-65205 Wiesbaden
Tel +49 6122-9176-0
Fax +49 6122-9176-11
Mobil +49 175-1853998
E-Mail: [EMAIL PROTECTED]
www.SYRACOM.de
Ein Unternehmen der SYRACOM Gruppe - "The Business- & IT-Architects"
____________________________________________________________________
Der Inhalt dieser E-Mail ist ausschlie�lich f�r den/die in der E-Mail bezeichneten
Empf�nger
bestimmt. Wir d�rfen Sie bitten, sofern Sie nicht dem Empf�ngerkreis angeh�ren, uns
durch die
R�cksendung dieser E-Mail von deren irrt�mlichen Versand an Sie in Kenntnis zu setzen.
This e-mail may only be read by those persons to whom it is addressed. If you have
received this
e-mail message in error, please notify us immediately by returning this e-mail to the
sender and
delete this message.
-----Urspr�ngliche Nachricht-----
Von: Peter Klotz [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 14. M�rz 2003 14:31
An: [EMAIL PROTECTED]
Betreff: Namespace issue
Hi,
I'm having a document-oriented WSDL file with a schema declaration using
a namespace. The required SOAP request must look like this for example
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope">
<soapenv:Body>
<getRootObject xmlns="urn:omi-org:api"/>
</soapenv:Body>
</soapenv:Envelope>
But what is sent over the wire (captured with tcpmon) is
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope">
<soapenv:Body>
<getRootObject xmlns=""/>
</soapenv:Body>
</soapenv:Envelope>
So it leaves out the namespace for some reaons. I have tried all
combinations of getting the namespace in there without any luck. I'm using Axis 1.1RC
BTW.
Some snipplets from the WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<definitions name="OMI" targetNamespace="urn:omi-org:api"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="urn:omi-org:api"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:omi="urn:omi-org:api">
<types>
<xsd:schema targetNamespace="urn:omi-org:api"
xmlns="urn:omi-org:api"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xsd:complexType name="getRootObject" content="empty"/>
...
</xsd:schema>
</types>
<message name="GetRootObjectInput">
<part name="body" type="omi:getRootObject"/>
</message>
<message name="GetRootObjectOutput">
<part name="body" type="omi:objectName"/>
</message>
<portType name="OMIPortType">
<operation name="GetRootObject">
<input message="tns:GetRootObjectInput"/>
<output message="tns:GetRootObjectOutput"/>
<fault name="error" message="tns:OmiErrorMsg"/>
</operation>
...
</portType>
<binding name="OMISoapBinding" type="tns:OMIPortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="GetRootObject">
<soap:operation soapAction="OMI"/>
<input>
<soap:body use="literal" parts="body"
namespace="urn:omi-org:api"/>
<soap:header use="literal" element="omi:omiHeader"/>
</input>
<output>
<soap:body use="literal" parts="body"
namespace="urn:omi-org:api"/>
</output>
<fault name="error">
<soap:fault use="literal" namespace="urn:omi-org:api"/>
</fault>
</operation>
...
</binding>
...
</definitions>
When using elementFormDefault="qualified" I see in the generated Code
that all QNames for the meta data are created with the namespace URN
"urn:omi-org:api".
Has anybody an exmplanation for this or a tip where one has to changes a
namespace to make it appear???
Thanks a lot, Peter