aspose file tools*
The moose likes Web Services and the fly likes Using Jersey Bundle to call a SOAP based WS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Using Jersey Bundle to call a SOAP based WS" Watch "Using Jersey Bundle to call a SOAP based WS" New topic
Author

Using Jersey Bundle to call a SOAP based WS

Vivek K Singh
Ranch Hand

Joined: Dec 22, 2009
Posts: 85

Hi,

We have an application where we make a lot of WS Calls (all of them are RESTFul WS). We use Jersey to make RESTFul calls.

In a new requirement we need to consume a SOAP based WS, Can we use Jersey to call the SOAP WS ? Pass the SOAP XML as a String?

thanks.

SCJP 6
Bhagat Singh Rawat
Ranch Hand

Joined: Apr 04, 2009
Posts: 93
Vivek K Singh wrote:
We have an application where we make a lot of WS Calls (all of them are RESTFul WS). We use Jersey to make RESTFul calls.

In a new requirement we need to consume a SOAP based WS, Can we use Jersey to call the SOAP WS ? Pass the SOAP XML as a String?


Please check at SOAP over RESTy Client


Brainbench Java 2.0 Fundamentals, J2EE 1.4
http://www.brainbench.com/transcript.jsp?pid=8192792
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42632
    
  65
Why do you want to do that? Is there an actual problem using a proper SOAP stack with all its attendant benefits? If there's a proper abstraction layer on top of the WS access code then the client shouldn't care one way or the other what library is used underneath.

Note that the article linked by Bhagat shows an approach that uses SAAJ, which works on a lower level than APIs like JAX-WS. That means more code to write, and more opportunities to get things wrong.


Ping & DNS - my free Android networking tools app
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12825
    
    5
You could always fake a SOAP client if you can get the clear text of a SOAP request to this service as a template and the service is not implementing all the WS-* security bells and whistles.

Your Jersey client would POST a copy of this text with the desired values pasted into the template.

SoapUI is great for fiddling with SOAP messages.

Bill
 
jQuery in Action, 2nd edition
 
subject: Using Jersey Bundle to call a SOAP based WS