  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Sending XML via http post, using servlet | Sending XML via http post, using servlet 2006-03-13 - By Corey Crandell
Back 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?> 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.
Corey C
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.2900.2838" name=GENERATOR></HEAD> <BODY> <DIV><FONT face=Arial size=2><SPAN class=spnMessageText id=msg>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.<BR><BR>my imports are :<BR><BR><FONT color=red>import java.io.*;<BR>import java.net.*;<BR><BR>import javax.servlet.*;<BR>import javax.servlet.http.*;</FONT><BR><BR>throws:<BR><BR><FONT color=red>throws ServletException, IOException {</FONT><BR><BR>and using goPost:<BR><BR><FONT color=red>protected void doPost(HttpServletRequest request, HttpServletResponse response)</FONT><BR><BR>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:<BR><BR><FONT color=red>response.sendRedirect("<A href="http://pirin.names4ever.com/TestXAPI/Pirin2Test.exe?" target=_blank><FONT color=#000000>http://pirin.names4ever.com/TestXAPI/Pirin2Test.exe?</FONT></A>" +test);</FONT><BR><BR>Maybe somewhere there I need make another POST call.. not sure..<BR><BR>Can someone send me in the right direction please, I would certainly appriciate it. If you need more info let me know.</SPAN></FONT></DIV> <DIV> </DIV> <DIV align=left><SPAN style="FONT-SIZE: 11pt; COLOR: black; FONT-FAMILY: Verdana; mso-fareast-font -family: 'Times New Roman'; mso-bidi-font-family: 'Times New Roman'; mso-ansi -language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"><STRONG >Corey C </STRONG></SPAN></DIV></BODY></HTML> __ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ __ To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff SERVLET-INTEREST". <p> Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html <p>
|
|
 |