Dear Roland,
> // let's see what is being sent
> System.out.println("posting the following string: " + login);
The "login" String is like as following.
----
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<login>
<phaseKey>encryption.key</phaseKey>
<result>-1</result>
</login>
----
>> stringEntity.setContentType(" text/plain; charset=UTF-8");
>> httpPost.setEntity(stringEntity);
>> httpclient.execute(httpPost);
> This fragment of your client side code looks correct.
> I'm just wondering about the value of login. Have you
> tried sending a hard-coded string instead?
> ...StringEntity("<?xml version='1.0' encoding='UTF-8'?><empty/>", HTTP.UTF_8);
I think I am sure the login String is as above xml content I describe, so the
result will be the same if I hard-coded it.
And I truly experiment it, the result is the same. (server can't get the xml
content)
>> The buffer.toString() is null.
> Now that is interesting. If the reader were null, you'd get
> a NullPointerException in the while() loop. If the buffer
> was empty, you'd see "receive: " without a null. The return
> value of buffer.toString is never null. If you are seeing
> "receive: null", then you are actually sending the string
> "null" in your POST request to the server.
Sorry for my wrong meaning expression in the previous mail.
The meaning of "buffer.toString() is null" is it outputs an "" (empty) string.
Just like you said, I see "receive: " without a null.
> See the comments above: check the string you are sending.
So the string is ok for sending, but the server still can't receive it.....
>"<
Thanks for your kindly relay.
Sincerely,
Micky
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]