Alright, here is what I want accomplished. My servlet (servlet1) builds an XML string, stores it in the HttpServletRequest object, and needs to forward the HttpServletRequest to servlet2. Servlet2 is on another server, thus RequestDispatcher.forward is not an option. Servlet2 also only responds to doPost. Thus, resp.sendRedirect is not an option. Servlet2's response is an XML file (xml2). How could I possibly, as an ideal end result, have xml2 stored in a string in servlet1.
Looks like you need to build a post request, with the generated XML as the POST body, and send it to the other server. Whenever I need to build and send HTTP requests, or parse the returned results, I turn to HTTPUnit. This is a free tool, billed as a web application testing framework, which is actually really useful for any sort of remote-control of web applications. [ February 06, 2004: Message edited by: Frank Carver ]