|
From: Ng C. Y. [Cyng] <cy...@cs...> - 2002-12-25 03:57:58
|
Hi Visva,
> Even before it reaches the receiver, the exception is thrown.
>
> When the message is sent out the first time (to the receiver):
> In httservlet.java send method, I logged the content type. It
> correctly says "text/xml".
That means the message being sent really has a correct
Content-Type and it's not the cause of the exception.
> Once SoapConnection.call is called it throws an exception and that is
> where the "absent content type" comes from. This is why it is confusing.
When SOAPConnection.call(message) is invoked, besides the message
is sent to the receiver, call() is also expecting the HTTP response code
and input stream from the receiver. According to your TestServlet.java,
you may set the response code to be HTTP_OK (200) such that call() will
expect some bytes to be returned and tries to read the input stream. But
now, nothing can be actually read and exception is thrown when the
response message is constructed. Try to set HTTP response code to be
HTTP_NO_CONTENT (204) if the receiver does not return anything.
Regards,
CY
----------------------------------------------------------------------------
Ng Chi Yuen, CY. cy...@ce... http://www.cecid.hku.hk/
Technology Officer,
Centre for E-Commerce Infrastructure Development,
The University of Hong Kong
----------------------------------------------------------------------------
|