• Post Reply Bookmark Topic Watch Topic
  • New Topic

differnce between -p and -ns2p options while using wsdl2java

 
yekkala krishna
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to know the difference between -p and -ns2p options in wsdl2java command.

With Regards,
Rama
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Axis2 1.4: Code Generator Tool Guide for Command Line; Option Reference
-p <package name>
The target package name. If omitted, a default package (formed using the target namespace of the WSDL) will be used.

-ns2p
Specifies a comma separated list of namespaces and packages where the given package will be used in the place of the auto generated package for the relevant namespace. The list will be the format of ns1=pkg1,ns2=pkg2.


Therefore -p <package name> only specifies the package name for the generated artifacts originating from the "targetNamespace" specified in the WSDL. The WSDL can import/reference any number of XML Schemas which in turn can reference other XML Schemas. Each XML Schema can declare its own "targetNamespace". If you want to control the package name for generated artifacts originating from those other namespaces, you have to use -ns2p and specify a namespaceUri=packageName pair for each namespace that you want to direct to a specific package.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!