Sending XML via http post, using servlet
Hey I am hopeing someone may be able to help. I am trying to send and xml stream via http post. I am using a servlet using goPost. The server I am sending the request to will return with a response as long as the stream is sent via http post, as of right now I am getting an error from the remote server saying im not sending the xml stream via post.
my imports are :
import java.io.*;
import java.net.*;
import javax.servlet.*;
import javax.servlet.http.*;
throws:
throws ServletException, IOException {
and using goPost:
protected void doPost(HttpServletRequest request, HttpServletResponse response)
whats included in the xml stream is a simple domain search, when a client types in a domain search on my website the servlet grabs that info and sends it to the remote server via sendRedirect basically temp files.. here is where the xml doc is being sent to:
response.sendRedirect("http://pirin.names4ever.com/TestXAPI/Pirin2Test.exe?"+test);
Maybe somewhere there I need make another POST call.. not sure..
Can someone send me in the right direction please, I would certainly appriciate it. If you need more info let me know. I am not exactly an expert when it comes to servlets, or java for that fact, I am a student, and able to understand most things, just be nice to me if I dont sound like i know what im doing. :)
Corey C
|