If your schema specifies elementFormDefault="unqualified", or does not
specify the elementFormDefault attribute at all, then Axis is doing the
correct thing.

Try adding elementFormDefault="qualified" to your schema.


Best regards,

Robert Lowe
http://RMLowe.com/



-----Original Message-----
From: Wei Hsu [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 14, 2004 3:11 AM
To: [EMAIL PROTECTED]
Subject: problem using WSDL2Java on RPC/Literal


Hi all,

I've been trying to run WSDL2Java on my RPC/Literal WSDL, but I keep running
into a seemingly simple problem.  In the WSDL, I've created a
createSalesOrderRequest message as the following:

<wsdl:message name="createSalesOrderRequest">
        <wsdl:part name="SalesOrder" type="n1:SalesOrderWrap"/>
</wsdl:message>

Here, assume n1 belongs to namespace my.example.com and the namespace of the
WSDL is "urn:SalesCreator".

But when I generate the stubs and make call with them, I found out that the
namespace for SalesOrder isn't picked up.  So the body of the SOAP message
becomes

<createSalesOrder xmlns="urn:SalesCreator">
   <SalesOrder xmlns="">

Instead of setting the xmlns for SalesOrder to that of SalesOrderWrap or
even that of the WSDL, WSDL2Java sets it to empty the namespace.  Any idea
why that's the case?

My question is, is there any thing I can add to the WSDL so that the
generated stubs will set the xmlns to something other than the empty ""?  I
know I can manually modify the stubs to insert a value.  However, that
doesn't solve my problem, since I am writing these WSDL files to be used by
other testing tools that also take advantage of axis' WSDL2Java.

Thanks so much!

Wei


Reply via email to