Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need to put a SOAP address

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ??"

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic