This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "namespace issue for doc/lit wrapped" Watch "namespace issue for doc/lit wrapped" New topic

namespace issue for doc/lit wrapped

Wei Hsu

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">
<element name="SalesOrderID" type="tns2:SalesOrderID"/>

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="" xmlns:xsi= xmlns:xsd="">
<createSalesOrder3 xmlns="http://creator">
<SalesOrderID id="5">12345</SalesOrderID>

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="" xmlns:xsd="" xmlns:xsi
<createSalesOrder3 xmlns="http://creator">
<ns1:SalesOrderID xmlns:ns1="xmlns/salesorderEntity">12345</ns1:SalesOrderID>

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!

I agree. Here's the link:
subject: namespace issue for doc/lit wrapped
It's not a secret anymore!