• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Working of JAX-WS based web service

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Does anybody know working of JAX-WS based web service? Does it use JAVA RMI or something else? Any link which describes its working will be of great HELP!

Thanks
Ashwin

 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
Theoretically you can use (almost) any transport type for web services, like email, JMS, FTP, HTTP or pidgeon, but I think that HTTP is the only one officially supported at the moment.
If you look at the JAX-WS web page https://jax-ws.dev.java.net/ there is a link to JAX-WS over JMS.
The best place to look for information is the JAX-WS standards document: http://jcp.org/en/jsr/detail?id=224
Best wishes!
 
Ash Kondhalkar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ivan for the reply. I had a look at the links, they are not providing the information which I seeking. I want to know does JAX-WS web service, uses Java RMI or JAVA RPC feature or something else.

Regards
Ashwin
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

uses Java RMI or JAVA RPC feature or something else.


No and no. JAX-WS uses the SAAJ API underneath, which in turns sends SOAP (i.e., XML) over HTTP.
 
Ash Kondhalkar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ulf. Ok I would frame my question as, How is client running in another JVM able to locate the remote service, which is running inside another JVM?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HTTP URLs (which web services use) have host names and port numbers; that's sufficient.
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ash

Further to Ulf's explanation, to answer your specific question, Web Services can publish their services (and methods / contracts) using UDDI. This contains information like the Organization hosting the services, the service names, method names, description of services and the WSDL URLs. The clients who want to access this have to query the UDDI registry (clients of course do need to have knowledge of the registry itself) and get to the required service.
That said, this is not at all compulsory. Many time, what happens is that once the service is found out (by physically locating it OR by sharing it across teams) clients stubs are generated and the method calls are given - All that matters then is the WSDL / URL to the WSDL.

Hope I have answered your question there.

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, no it does not use RMI. The previous standard JAX-RPC used it.
In rmi you do a lookup and the concept is somewhat similar in JAX-WS, i.e. to locate a service, in your code you use specific objects that work with the information in the wsdl which specifies where each service is located. Once the url is found you just call the functions in the local stubs and the framework takes care of the rest. The wsdl, you either know where to find it or you do a more formal look up as specified by Shailesh
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jim Akmer wrote:...it does not use RMI. The previous standard JAX-RPC used it.


No, it did not. One of the main points of web services was and is to be compatible with other systems, so a Java-only technology like RMI wouldn't have done.
 
Jim Akmer
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes Ulf is right in making this comment. I meant that the code in Jax RPC calls was very similar alike to rmi calls.
 
I found some pretty shells, some sea glass and this lovely tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic