aspose file tools*
The moose likes Web Services and the fly likes Need to put a SOAP address Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Need to put a SOAP address" Watch "Need to put a SOAP address" New topic
Author

Need to put a SOAP address

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi , a newbie to web services using JAX-RPC .


This is inside a wsdl file



Please tell me what is the address i need to put here.


Save India From Corruption - Anna Hazare.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
In the location attribute of the <soap:Address> element you are to provide the endpoint address, in the form of an URI.
Example: http://192.168.0.117:8080/JAX-WS_HelloWorldServlet/HelloWorldWSService

Some containers, e.g. GlassFish, will modify the contents of that attribute so you can enter anything you want and it will be replaced with the endpoint address once the service is deployed.
Best wishes!
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Thanks Ivan , it helped a lot.




In the above URL


URL JAX-WS_HelloWorldServlet is this the context root ??

and HelloWorldWSService is the Service Endpoint Interface Name ??
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
URL JAX-WS_HelloWorldServlet is this the context root ??

Right!

and HelloWorldWSService is the Service Endpoint Interface Name ??

Strictly speaking, this is the URL pattern to which the web service servlet that wraps the servlet endpoint implementation is mapped.
I suspect, but am not entirely sure, that this name is taken from the name attribute of the <wsdl:service> element in the WSDL:


Now, if you do Java-first web service development with annotations, where is the above name taken from?
The JAX-WS specification, section 3.11, says the following:

In mapping a @WebService-annotated class (see 3.3) to a wsdl:service, the serviceName element
of the WebService annotation are used to derive the service name. The value of the name attribute of
the wsdl:service element is computed according to the JSR-181 [14] specification. It is given by the
serviceName element of the WebService annotation, if present with a non-default value, otherwise the
name of the implementation class with the “Service”suffix appended to it.

So, your guess was a rather good one!
Best wishes!
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Thanks Ivan ,

Today i went to an interview , he asked me about writing clients for webservices .

I said i used a stub based client approach , in which i used JNDI lookup to call a Service End Point interface . Then he asked me have you used any tools for writing client ??


What does he actually mean by asking "have you used any tools for writing client ??"

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need to put a SOAP address