Redirecting a http POST request, without loosing data?

B

basic

I have a web service that has moved to another server, but clients
still use the old server.
What i need to do is simply redirect their requests to the new server,
and keep all data in the redirect process. simple http redirect looses
data, and the servlet dispatcher mechanism works only for redirecting
to local resources.
Is there anything i can do to redirect the request?

Here is the POST request:

POST http://oldserver/service HTTP/1.1
Host: xxx.xxx.xxx.xxx
Proxy-Connection: Keep-Alive
Connection: TE
TE: trailers, deflate, gzip, compress
User-Agent: RPT-HTTPClient/0.3-3
SOAPAction: ""
Accept-Encoding: gzip, x-gzip, compress, x-compress
Content-type: text/xml; charset=utf-8
Content-length: 606

<?xml version = '1.0' encoding = 'UTF-8'?>
<SOAP_XML>...</SOAP_XML>

Thanks!
 
S

Steve Sobol

basic said:
I have a web service that has moved to another server, but clients
still use the old server.
What i need to do is simply redirect their requests to the new server,
and keep all data in the redirect process. simple http redirect looses
data, and the servlet dispatcher mechanism works only for redirecting
to local resources.

Have you considered JSP's "forward" functionality?

--
JustThe.net - Apple Valley, CA - http://JustThe.net/ - 888.480.4NET (4638)
Steven J. Sobol, Geek In Charge / (e-mail address removed) / PGP: 0xE3AE35ED

"In case anyone was wondering, that big glowing globe above the Victor
Valley is the sun." -Victorville _Daily Press_ on the unusually large
amount of rain the Southland has gotten this winter (January 12th, 2005)
 
B

basic

Have you considered JSP's "forward" functionality?

This functionality emulates servlet's dispatcher mechanism, which
means that it can only forward to local servlets and jsps, and not to
any outside url.
 
W

Wendy S

I have a web service that has moved to another server, but clients
still use the old server.
What i need to do is simply redirect their requests to the new server,
and keep all data in the redirect process. simple http redirect looses
data, and the servlet dispatcher mechanism works only for redirecting
to local resources.
Is there anything i can do to redirect the request?

Not a redirect, that tells the client to make a new request to the URL you
provide. (Unless you can get all the data into the URL as request
parameters.)

You could sit in the middle as proxy. You've got all the data, so you POST
it to the new server, receive the response, and hand the response back to
the client. On the old server, replace the web service with a Servlet that
handles this. (I'd also keep a log of who's still using the old server, and
work towards converting them.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top