Hello,

I have a similar approach using XML pay-load data in the response body, however 
I do not use parameters. I have seen somebody saying that you should not set 
the content type to "text/xml", but should let HTTPClient do this for you 
automatically (by doing something like a best guess?). Why that? Thanks.

Regards,
        Hans-Dieter Cordes

-----Original Message-----
From: Roland Weber [mailto:[EMAIL PROTECTED]
Sent: Montag, 9. Januar 2006 17:55
To: HttpClient User Discussion
Subject: Re: cant't get HttpClient working


Hi Lothar,

> I have a servlet which tries to read two parameters (ID, Type) from the 
> incoming
> request using request.getParameter(XXX) and then read the content of the 
> request
> (xml data in my case)  using request.getInputStream().read(...).

Then you will have to send the parameters as a query string in the URL:
http://jakarta.apache.org/commons/httpclient/apidocs/org/apache/commons/httpclient/HttpMethod.html#setQueryString(org.apache.commons.httpclient.NameValuePair[])

The XML can be set as a StringRequestEntity.

If you set the parameters at the post method, the request body will be
multipart MIME or form-URL-encoded, but you can't add any non-parameter
data anymore.

hope that helps,
  Roland



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to