aspose file tools*
The moose likes Web Services and the fly likes Need to intercept web services request and send it to multiple web services server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Need to intercept web services request and send it to multiple web services server" Watch "Need to intercept web services request and send it to multiple web services server" New topic
Author

Need to intercept web services request and send it to multiple web services server

M. Azri
Greenhorn

Joined: Jan 03, 2008
Posts: 2
Hi guys,

I need to intercept web services client request (RAW HTTP), modify the SOAPAction header to "" and send the request to 5 web services endpoint on different servers, and return back the result only if both return HTTP 200.

What would be the best way to do it?

Just use plain socket?
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12781
    
    5
I not sure I understand the:
and send the request to 5 web services endpoint on different servers

part of this question. But anyway...

Assuming you have a SOAP request incoming, you can read it all into a byte[] or String and grab the request headers. You could then make separate HttpURLConnections (in separate Threads presumably) creating NEW request headers using whatever values you want and send the message.
Resolving the different responses from the different requests and hanlding errors sounds like quite a problem.

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need to intercept web services request and send it to multiple web services server