| Author |
difference between web services clients results in one error(AXIS) in one success(JAXWS)
|
Meir Yan
Ranch Hand
Joined: Apr 27, 2006
Posts: 597
|
|
difference between web services clients results in one error in one success I have web service I build using JAXWS 2.2 on tomcat , based on wsdl .
Based on this wsdl I created client that works great .
But when I getting web services from external client im getting errors on server , I sniffed the network , and I saw there are differences But I don’t know how critical they are mostly namespaces , as I see from sniffin the external request I see they used AXIS to build the client .
For the tomcat exception im getting , I know according to the logs on the server side it gets to the service but fails in one of the stubs methods Here is my client service that works:
and now this is the request from external client that doesn't work:
the exception im getting from the tomcat looks like this :
and the tomcat returns : HTTP/1.1 500 Internal Server Error
i notice that in the header some parameters are missing between them but after reading some info i don't thing its the reason. beacose the request do get to the service in tomcat
here is where i thing im getting the exception , i can't debug only scatter logs here is how my service class looks like :
i notice that in the header the some parameters are missing between them but after reading some info i don't thing its the reason. beacose the request do get to the service in tomcat
here is where i thing im getting the exception , i can't debug only scatter logs here is how my service class looks like :
i know that the NP_MESSAGE is null but why i can see it get data when it comes from the client
Thanks
|
 |
H Paul
Ranch Hand
Joined: Jul 26, 2011
Posts: 299
|
|
Without looking into the detail.
I would guess there is some issue of data type compatibility.
Your webservice is based on JAX-WS specification and the client JAX-WS worked because they both
have the same data mapping java-to-xml and vice-versa.
See User-Agent: JAX-WS RI 2.2.5-b01
The external client axis 1.4 is based on the JAX-RPC specification ( the older version of web service, JAX-WS is the newer), it
does not have the same data mapping as JAX-WS. That's why there is some issue of data type compatibility
See User-Agent: Axis/1.4
Have a look at http://www.ibm.com/developerworks/webservices/library/ws-tip-jaxwsrpc2/index.html
|
 |
Meir Yan
Ranch Hand
Joined: Apr 27, 2006
Posts: 597
|
|
Thanks for your time to answer me .
i was reading the link you gave me and it says that there is 2 methods .. wow great .. why !!!??
dosn't every WS framework suppose to always create stubs from wsdl that can talk no mater what did it , like contract like CORBA. never mine ..
any way how do i fix it , i don't have option to work with AXIS . can't i just tell JAXWS to work with the axis protocol ?
|
 |
H Paul
Ranch Hand
Joined: Jul 26, 2011
Posts: 299
|
|
Briefly by analogy simplified
1. JAX-RPC - web service version 1
2. JAX-WS - web service version 2 - better version than 1
do not support JAX-RPC.
For enligtenment
check this http://www.coderanch.com/how-to/java/WebServicesFaq
For JAX-WS spec, you have different implementation/provider like Metro, Apache CXF, AXIS 2, JBoss etc...
Just like Honda, BMW, Mercedes they all have Car spec.
|
 |
Meir Yan
Ranch Hand
Joined: Apr 27, 2006
Posts: 597
|
|
Ok i understand .
but now i have no chose then using jax-rpc that is Axis 1 in my server , right ?
i have another question how can i know when i just have wsdl from customer .
that says this is my wsdl use it in your server .
how can i know from this wsdl which method to use jax-rpc .. jax-ws
and no the customer doesn't know he not technical he only have wsdl .
|
 |
H Paul
Ranch Hand
Joined: Jul 26, 2011
Posts: 299
|
|
1. Either you downgrade and use Axis (JAX-RPC) or your client upgrade (JAX-WS).
Otherwise, for simple case where data type is common on both end, it might work. It's called software plumbing. Have a good laugh.
2. Now suppose, you are asked to maintain a JAX-RPC web services
and develop new JAX-WS web service, then consider looking below links:
http://www.ibm.com/developerworks/webservices/library/ws-tip-jaxwsrpc/index.html
http://www.ibm.com/developerworks/webservices/library/ws-tip-jaxwsrpc2/index.html
http://www.ibm.com/developerworks/webservices/library/ws-tip-jaxwsrpc3/
http://www.ibm.com/developerworks/webservices/library/ws-tip-jaxwsrpc4/
http://www.ibm.com/developerworks/webservices/library/ws-tip-jaxwsrpc5/
3. I once took a wsdl generated by JAX-WS and create a JAX-RPC client, it complain
because there are data type in the wsdl are not supported by JAX-RPC.
So 1 way is look at the data type which is defined in the XML schema (embedded or external
from the wsdl.)
For more, GOOGLE is your best friend
|
 |
 |
|
|
subject: difference between web services clients results in one error(AXIS) in one success(JAXWS)
|
|
|