I want to call a SOAP service using REST service. Can anybody please share some example programme or snippets where we can invoke a soap service using JAX-RS(Jersey) written REST service. I am using jdk 1.7 & eclipse juno. What will we be using to refer to the soap service? Please note that I am entirely new to webservice, so examples will be a huge help!
2 Answers
You cannot use a REST service framework to access a SOAP Web-Service. This are two completely different technologies.
It's like you're asking how to drive with a locomotive on a motorway...
7 Comments
Akhil Kooliyatt
I didnt know anything about this but i found an answer saying it is just a normal thing to do at this link stackoverflow.com/questions/17986498/calling-soap-in-jersey Is this answer wrong or my understandin?? @Uwe Plonus
Uwe Plonus
@RBz Perhaps you question is not clear. If you want to wrap a SOAP service with a REST Service then this is possible as described in the answer mentioned. If you want to call a SOAP Service using a REST service then this is simple impossible.
Akhil Kooliyatt
Can you please define what we mean by wrapping? Please forgive my ignorence, i dont understand how both are different. @Uwe Plonus
Uwe Plonus
@RBz Wrapping means that you create a REST service and call a SOAP service out of the newly created REST service. Calling means that you create a REST service and want to call a SOAP service with this.
Uwe Plonus
@RBz to explain it with pseudo code: Using
MyService extends RESTClient to access a SOAP service does not work (Calling). Using MyService extends RESTService and handle() { call SOAPService } will work as you create a new web service that is a REST service and call from this new service a SOAP web service (Wrapping). |
DispatchAPI (Google it).