• Post Reply Bookmark Topic Watch Topic
  • New Topic

Top Down Web Service - can we do name space mapping ?

 
Surender Suri
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi,

We have developed a webservice in top-down approach by writing the XSD's and WSDL manually based on our client's xml message which the client calls to push the data in our system. So now the problem is, the client wants to use their namespace and since we are hosting the service and we want to maintain our package structure .. we want to have our own namespace.

Usually the name space is like the package structure in java. So when we generate java bean skeleton classes, then all the classes will be generated in package structure defined in namespace.

For example, if the name space is http://tempui.com/Service .. then the package structure will be com.tempui.Service.

So is there any way, we can do mapping of namespaces in WSDD or anywhere else ?? like the client can still sent their namespace and we can map that to our namespace ?

Thanks,
Suri
 
Lingan Rajan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Suri
The only think I can think of is to have a handler , identify the client and apply some sort of JAXB or XSLT or Regex transformation to the incoming soap request.

Lingan.
 
Sergey Baranov
Greenhorn
Posts: 18
C++ Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're using Apache AXIS you can simply use --package option when generating java classes from WSDL.

java org.apache.axis.wsdl.WSDL2Java [options] WSDL-URI
-p, --package <argument>
override all namespace to package mappings, use this package
name instead


 
Surender Suri
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Sergey, that works
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!