A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
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.
Ping & DNS
- my free Android networking tools app
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
Reg Manual Creation of new Topics -
Unable to upload file using Commons HTTPClient and Commons FileUpload
Using PostMethod to post from a servlet without capturing the response body
Get ServletContext of a web app hosted in another server
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-2014