The SOAP spec explicitly references RFC 2376 http://www.normos.org/ietf/rfc/rfc2376.txt (now
superceded by RFC 3023 - http://www.normos.org/ietf/rfc/rfc3023.txt).
Anyone who is sincerely interested in interoperability will recognize that SOAP
needs to be able to support the international community, and implementations
therefore should follow the advice of RFC 2376/3023 and include explicit
declarations of the character encoding used. They should also properly deal with
such declarations in requests. I understand that the SOAP spec does not clearly
address this issue. But it does explicitly reference RFC 2376, and RFC
2376 is quite clear on this issue (as is the newer RFC 3023).
As an experiment, I tried the
"manyTypesTest" at "http://validator.soapware.org/validator1". If I send only ASCII text, it echos back just
fine. I tried putting Russian text in as the string for param6. Sure enough, it
was corrupted and came back garbled. I'd encourage anyone else to try this
experiment. Try sending Kanji, or Cyrillic. It will come back garbled. The validator at soapware.org apparently supports an
English-only SOAP.
I also
tried the "echoString" test at http://services.xmethods.net:8080/soap/servlet/rpcrouter.
This one worked. Thank you Apache! It's nice to see that someone in the SOAP
community is willing to support internationalized text.
I
tried the "echoString" test for the MS SOAP 2.0 B2 at http://services2.xmethods.net/XMethodsInterop/XMethodsInterop.asp.
It failed.
I
tried the "echoString" test for the MS .NET Beta at http://services3.xmethods.net/dotnet/xmethods/XMInterop/XMInterop.asmx.
It generated a SOAP fault due to the fact I correctly identified the character
encoding of my request via a "charset" parameter in the Content-Type header!
This is absolutely abysmal! Here's the actual fault I
received:
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body> <soap:Fault> <soap:faultcode>Client</soap:faultcode> <soap:faultstring>Server found request content type to be 'text/xml; charset="utf-8"', but expected 'text/xml'.</soap:faultstring> <soap:faultactor>http://localhost/dotnet/xmethods/XMInterop/XMInterop.asmx</soap:faultactor> <soap:detail/> </soap:Fault> </soap:Body> </soap:Envelope> I
tried some of the others listed at the XMethods site, but either got 404 errors
or no response at all, so this was the best I could do, for
now.
The
result of ignoring character encoding issues, as anyone can verify (as I just
did myself), is that the SOAP toolkits that are being made available -- with the
sole exception of Apache SOAP -- are only of use for English-only messaging. I
really hope that other SOAP developers (including Microsoft!) start treating
these issues related to internationalization more seriously. As it is, the
current outlook seems quite bleak.
|