Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Mentioning a name space in your web service  RSS feed

 
aravind kanganar
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What is meant by target name space( which we write in annotations,and and xml responses from web services)?

[
For eg. the following,
@WebService(
name="Calculator",
serviceName="CalculatorService",
targetNamespace="http://techtip.com/jaxws/sample" //how to know about target name space??
)
]

And what is the significance of writing them?

And how do I know to consider a name space in my programs?

-aravind
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
The target namespace in the @WebService annotation is used to specify the namespace that the <wsdl:portType> and associated elements belong to.
The namespace can be found in the WSDL document and is, usually, the target namespace of the WSDL document.
A namespace is a little like a Java package; creates a smaller space in which there cannot be any name collisions.
Example:
In one package, there can only be one class named Hello, but we can have two classes named Hello if they are located in different packages.
Best wishes!
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!