File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Other Open Source Projects
how to submit and receive the responce of XML through java
Joined: May 11, 2009
May 11, 2009 01:26:31
I am submiting the XML content throught
code against which one response is generated by the server. On submiting the request to the server the status by "client.executeMethod(method)" is 200
When I am using this method I am not getting the respoce from the server as this is returning a blank
for your reference I am pastig the code below : -
here dataParameter is containig the XML code in DTD format as a string.
HttpClient client = new HttpClient(); PostMethod method = new PostMethod(SERVICE_URL); String dataParameter = getDataParameter1(param1, param2, param3); method.addParameter("data", dataParameter); method.addParameter("action", "send"); client.executeMethod(method);
Joined: Oct 13, 2005
May 11, 2009 03:36:38
Welcome to JavaRanch
That question is too difficult for the beginner's forum. Moving.
Joined: Mar 22, 2005
May 11, 2009 03:58:08
Well, *IS* the server returning anything but a blank response? You can use an HTTP proxy like tcpmon to check what is actually going over the wire.
Joined: Oct 14, 2005
May 11, 2009 09:59:23
Seems to me that it doesn't matter whether the data you are sending happens to be XML. You have a question about Apache HttpClient (it is Apache, right? You didn't mention that...) so let's not hide it in the XML forum.
I agree. Here's the link:
subject: how to submit and receive the responce of XML through java
Get ServletContext of a web app hosted in another server
Reg Manual Creation of new Topics -
Using PostMethod to post from a servlet without capturing the response body
Unable to upload file using Commons HTTPClient and Commons FileUpload
How to programmatically login to JForum using Crowd Authentication
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015