aspose file tools*
The moose likes Web Services and the fly likes wsdl2java and namespace declarations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "wsdl2java and namespace declarations" Watch "wsdl2java and namespace declarations" New topic
Author

wsdl2java and namespace declarations

Wei Hsu
Greenhorn

Joined: Feb 23, 2004
Posts: 11
Hi all,
I am currently trying to create a wsdl file for an existing web service so that clients can use wsdl2java to generate client side code. I have a few questions concerning namespaces generated for RPC/Literal style SOAP.
Currently when I try to use the wsdl2java stubs, my SOAP messages have following form:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<createSalesOrder xmlns="Creator">
<ns1:SalesOrder xmlns:ns1="salesorder">
<ns2:Goods xmlns:ns2="goods"/>
</ns1:SalesOrder>
</soapenv:Body>
</soapenv:Envelope>
The namespace prefix ns1 and ns2 are automatically generated and named by the stubs - is there any way to set the values or that? I would like to know if you can change "ns1" to "ba", for instance, either through modifying the stubs or wsdl/schema.
Secondly, is there any way to add namespace declaration to an element in the SOAP calls? For instance, I want to add xmlns:big="big" to createSalesOrder so that when I make the SOAP call, it would show <createSalesOrder xmlns="Creator" xmlns:big="big">.
Thanks for any help in advance!

Wei Hsu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: wsdl2java and namespace declarations