• Post Reply Bookmark Topic Watch Topic
  • New Topic

JAX-RPC  RSS feed

 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JAX-RPC has 3 types of clients i.e. static stubs, dynaimc proxy and DII. Can some one tell me when to use each type of clients?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Static stubs are the defacto standard because mostly the web service being called is assumed to be pretty static and it's easy to generate the stubs from a WSDL in any modern IDE. Further benefits are that the static nature makes for better performance (although the difference may be insignificant in many cases).
I'm still a bit unclear as to the differences between DII and dynamic proxies. Both allow you to decide at runtime where the service endpoint is located etc. I think I've seen a document at IBM developerWorks which explained the differences but I don't have it bookmarked.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sun's web services tutorial also has some code examples of each type of client:
http://java.sun.com/webservices/docs/1.3/tutorial/doc/JAXRPC5.html#wp79960
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I find that the code for static stub contains proprietary classes and this make it difficult to port?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pradeep Bhat:
I find that the code for static stub contains proprietary classes and this make it difficult to port?

True, the static stubs are proprietary to the implementation but practically all current implementations (well, the same wsdl2java is used by everyone...) generate a similar class hierarchy so porting should not be too difficult.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
What is wsdl2java?
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How many servers implement JAX-RPC?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pradeep Bhat:
What is wsdl2java?

It's a tool for generatic Java classes (service and/or client) based on a given WSDL document.
Take a look at the Axis User Guide and the Axis Reference Guide for details.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lasse Koskela:

I'm still a bit unclear as to the differences between DII and dynamic proxies.


I think that Dynamic invocation interface (DII) requires the understanding of WSDL
:roll:
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pradeep Bhat:
How many servers implement JAX-RPC?

That's difficult to say; practically all servers who support web services in some way. If you look at the JCP Expert Group, you'll see that both the big players and the smaller ones have representation...
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

.
At runtime, the endpoint address is passed to HelloClient in args[0] as
a command-line parameter, which ant gets from the endpoint.address
property in the build.properties file


The above is a line of code for static stub. I dont understand why we need to pass the endpoint URL. When the stub is generated we do specify the WSDL location
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When the stub is generated we do specify the WSDL location
Ah, the endpoint address can indeed be set at runtime but the available operations such as "calculateTax" or "getAuthorsByIsbn" are hardcoded as methods in the service stub. My bad.
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In most implementations that's optional. The endpoint location from the build-time WSDL is usually stored in a static variable and will be used if you don't provide one.
Providing a new location is useful if you want to use a proxy for tracing your SOAP messages, or if you're looking up the endpoint from a UDDI repository.
Kyle
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!