xml-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wouter Cloetens" <wcloe...@raleigh.ibm.com>
Subject i18n (was: rpcrouter servlet committed)
Date Mon, 07 Aug 2000 21:28:34 GMT
On Tue, 8 Aug 2000 02:33:00 -0400, Sanjiva Weerawarana wrote:

>I have committed a servlet version of rpcrouter.jsp - see
>org.apache.soap.server.http.RPCRouterServlet.

>- used Steven McDowall's UTF8 stuff to better support I18N
>  (is it correct to always set the outgoing content type to UTF8??)

I've been working on i18n support over the weekend in my multipart mime 
implementation. That turned out to be quite a job. The charset modifier needs to be 
picked up by the server as well as the client, and set by the client too. This version of
the 
servlet only accepts client requests without a character set specified. Getting a Reader 
and a Writer from the HttpServlet{Request|Response} object breaks the character set 
too. Steven's version correctly uses an OutputStream instead of a Writer, and writes the 
content, encoded as UTF-8, to a byte array, but it won't be able to read UTF-8.

The multipart issue added considerably additional complexity to that. OTOH, I did use 
some of JavaMail's functionality to parse Content-Type headers and map Mime 
character set names to Java's. I'm a bit busy this week, but I'll probably port my patches

back to the base version and publish them over the weekend.

Also, the servlet still has the problem I mentioned earlier - the try block catching SOAP

exceptions and returning valid SOAP error responses should be expanded to beyond 
returning the response. It's happened many, many times to me that erroneous server 
processing resulted in a Xerces exception on the client side as it tries to parse an HTML

response. The check for the text/xml content type should probably be in the client code 
too, that would fix responses from a server that can't even correctly execute the servlet.

>I haven't put in Steven's content-length code in there yet. Is the
>only way to buffer the results and then count and send? Seems 
>expensive .. however, maybe that's the only way.

It does more than count the bytes... It's the only way to get the response encoded as 
UTF-8.

bfn, Wouter
--
http://www.workspot.net/~zombie/soap/
My opinions are irrelevant. They will be assimilated by my employer.


Mime
View raw message