I have two web services running on my tomcat lets call them X and Y.
when Y is requested by X in the end Y have a String with a XML inside and now i want to return this string of XML to X.
How can i do this ?
is there anyway to make a special request that X servlet waits for a response ? or do i really need to redirect ?
thx for your time.
Since you have a java tag, I will assume you are using java servlets.
X gets a XML, that should go to y?
Well the easiest way is to for X to create a request to y and forward the response back to the person who made the request.
You can use the HTTPClient class for that.
so once you send the request from X to Y, X will wait until Y has responded.
If your unsure how to do this checkout the java docs http://download.oracle.com/javase/1.5.0/docs/api/java/net/HttpURLConnection.html
Make sure u check variable sets and parameters, i pulled this from some of my code
Code: