aspose file tools*
The moose likes Web Services and the fly likes namespace issue for doc/lit wrapped Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "namespace issue for doc/lit wrapped" Watch "namespace issue for doc/lit wrapped" New topic
Author

namespace issue for doc/lit wrapped

Wei Hsu
Greenhorn

Joined: Feb 23, 2004
Posts: 11
Hi all,

I'm running into a namespace issue when I try to use doc/lit wrapped on AXIS 1.2 beta. I just wanted to confirm if this is a bug or if I'm doing something wrong.

My java signature is as follows:

SalesOrderID createSalesOrder3(SalesOrderID soid)

I have declared a type mapping for SalesOrderID, which maps to http://xmlns/salesorderEntity. Then when I use AXIS to generate the wsdl, I get something along the following element created in "http//creator" namespace:

<element name="createSalesOrder3">
<complexType>
<sequence>
<element name="SalesOrderID" type="tns2:SalesOrderID"/>
</sequence>
</complexType>
</element>

So far so good, or so I thought. But if I try to actually run wsdl2java and invoke the stubs, I get the following message created:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<createSalesOrder3 xmlns="http://creator">
<SalesOrderID id="5">12345</SalesOrderID>
</createSalesOrder3>
</soap:Body>
</soap:Envelope>

Here the SalesOrderID element belongs to createSalesOrder3's http://creator namespace, instead of http://xmlns/salesorderEntity that i had expected. The end result is, axis server cannot find the corresponding method. What am I doing wrong? However, the service works fine if I modify the stubs so that it produces the following:


<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi
<soapenv:Body>
<createSalesOrder3 xmlns="http://creator">
<ns1:SalesOrderID xmlns:ns1="xmlns/salesorderEntity">12345</ns1:SalesOrderID>
</createSalesOrder3>
</soapenv:Body>
</soapenv:Envelope>

I know .NET also generates the message such that the SalesOrderID is part of the same namespace as createSalesOrder3. But I can't get AXIS server to accept the default message generated by either the AXIS stubs or .NET stubs. Does anyone have any suggestions on what I can do?

Thanks for any help you can give!

-Wei
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: namespace issue for doc/lit wrapped