I am trying to figure out how to identify if a specific web service is implemented in JAX-RPC or JAX-WS.
All i have is a wsdl.
Also, i would like to know if it matters at all from consumer perspective if it is JAX-RPC or JAX-WS based?
Thanks,
AA
Tim Moores
Rancher
Joined: Sep 21, 2011
Posts: 2407
posted
1
No, you can't know, and no, it doesn't matter. That's the whole point of WS, after all - that for the client it does not matter how the server is implemented as long as the standards are adhered to.
If you have a WSDL, that is enough for a client to build a set of generated classes from which requests can be marshalled to XML and sent to the service.
The underlying implementation of the web service should be of no concern to a client.
H Paul,
Yes i have gone thru the whole series of those articles.
It does explain the difference in terms of implementation and the underlying technology/transport and the specs support.
But i was not able to figure out how can we identify the implementation thru WSDL.
It does make sense when WSDL abstracts out the impl details as that is what an interface contract should be.
I just wanted to make sure i am not missing something big....
Thanks,
AA
H Paul
Ranch Hand
Joined: Jul 26, 2011
Posts: 299
posted
1
In theory, theory and practice are the same. In practice, they are not.
How I do my little way:
1. Look at the WSDL schema data type: JAX-RPC and JAX-WS have some common data type. JAX-WS also support new data type which is
not supported by JAX-RPC. 1 of the link mentioned it.
2. Just do it by Nike:
I just take the wsdl and use JAX-RPC soap engine to generate the client side to see if it complain or not.
if it complain, then provider use something NON JAX-RPC.
I just take the wsdl and use JAX-WS soap engine to generate the client side to see if it complain or not.
if it complain, then provider use something NON JAX-WS.
This exercise is to validate the point 1.
Alpha Omega
Greenhorn
Joined: Jan 09, 2011
Posts: 7
posted
0
H Paul,
Yes, what you are suggesting makes sense but only if the producer is using JAX-RPC or newer JAX-WS data types.
If the response is in simple data types, i guess it might not complain in any of the way you try to generate the client code.
I will give it a try and post the outcome sometime soon...
Here is the result for wsimport
[ERROR] undefined simple or complex type 'soapenc:Array'
It kinda proves your point. The WSDL is JAX-RPC based and it gives error when JAX-WS based wsimport tool
What it means is JAX-RPC based ws using complex data types will not work with JAX-WS generated clients... Kinda confusing...
Cheers,
AA
H Paul wrote:
In theory, theory and practice are the same. In practice, they are not.
How I do my little way:
1. Look at the WSDL schema data type: JAX-RPC and JAX-WS have some common data type. JAX-WS also support new data type which is
not supported by JAX-RPC. 1 of the link mentioned it.
2. Just do it by Nike:
I just take the wsdl and use JAX-RPC soap engine to generate the client side to see if it complain or not.
if it complain, then provider use something NON JAX-RPC.
I just take the wsdl and use JAX-WS soap engine to generate the client side to see if it complain or not.
if it complain, then provider use something NON JAX-WS.
This exercise is to validate the point 1.
H Paul
Ranch Hand
Joined: Jul 26, 2011
Posts: 299
posted
0
1. If I have any thing by looking at the wsdl alone, I'll post it.
2. Here is a quick request to play with:
Alpha Omega
Greenhorn
Joined: Jan 09, 2011
Posts: 7
posted
0
H Paul
Here is the result for wsimport
[ERROR] undefined simple or complex type 'soapenc:Array'
It kinda proves your point. The WSDL is JAX-RPC based and it gives error when JAX-WS based wsimport tool
What it means is JAX-RPC based ws using complex data types will not work with JAX-WS generated clients... Kinda confusing...
Cheers,
AA
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.