I have found a problem in the source and made the best fix I can do
"easily", but there is still a problem I have not fixed.

The value for the href attribute in the XML is URL encoded.  This is
done using java.net.URLEncoder.encode.  The value is decoded using
MimeUtils.decode.  This was written before JDK 1.2 introduced
java.net.URLDecoder.decode.  It does not correctly decode multi-byte
character sequences.  I have changed MimeUtils.decode to simply call
URLDecoder.decode, which presumably handles multi-byte character
encodings.

There is, however, still a problem when the client and server have
different default character encodings.  Prior to JDK 1.4, encode and
decode always used the local machine's default encoding.  Therefore,
a server might encode using a Korean character set, which a client
might decode using a Latin character set, yielding a decoded string
not equal to the one originally encoded.  As of JDK 1.4, encode and
decode are overloaded, with new methods that have a parameter for the
encoding.  By always using UTF8, all clients and servers would agree
on encoded and decoded URLs.  I will hopefully get around to adding
run-time logic to determine whether the overloaded method is present,
and using it if it is, but for now at least a Korean client and
Korean server should be able to converse.

As an alternative, I am considering munging the host name used to
create the cid to have only 7-bit ASCII characters.

On 12 Jun 2003 at 14:22, [EMAIL PROTECTED] wrote:

> Unfortunately, I did not use netmon.  However, I do have the files that i
> created from running TcpTunnelGui.  Would that be sufficient?
>
> I can also get a screen capture of the ComputerName from the Windows panel
> where you set up the computer.
>
> Komal
>
>
>
>
> Thanks for continuing to pursue this.  Can you post the hex from
> netmon for two things.  First is the ??? in
>
> start="13783459.1055357926281.apache-soap.TRAINING???"
>
> Second is the Korean characters
>
> Content-ID: <4875224.1055357926265.apache-soap.TRAININGi ¡Æ>
>
> This will help me understand what character encodings are being used
> in each place within the message.
>
> On 11 Jun 2003 at 15:19, [EMAIL PROTECTED] wrote:
>
> > Scott,
> > I think I know what is causing the problem.  The Windows NetBios (AKA
> > ComputerName) of the computer that has the aforemention problem has
> > characters that are not ASCII.  Instead, they are Korean characters.
> >
> >
> > When the SOAP client is creating an attachment, it calls
> > MimeUtils.getUniqueValue();
> >
> > This in turn calls
> > InetAddress.getLocalHost().getHostName();
> >
> > which seems to return the ComputerName;
> >
> > In the SOAP ENV:Body section, the href to the attachment is
> >
> > <item href
> > ="cid:4875224.1055357926265.apache-soap.TRAINING%F6%AB%FB%AD%B8%F4"/>
> >
> >
> > However, in the Part 2 section, Content ID is
> >
> > Content-ID: <4875224.1055357926265.apache-soap.TRAININGi ¡Æ>
> >
> > (where the funny characters are the Korean characters - machine I am
> > sending mail from does not display them well)
> >
> > and I am guessing this is what is causing the problem.
> >
> >
> >
> >
> > Here is the the most relevant lines from the Network Monitor: (I have
> left
> > out the rest of the Part 2 section, Please let me know if you need it
> also
> > - Thx)
> >
> > Is this a SOAP Bug?
> >
> > Thanks
> >
> > Komal
> >
> >
> >
> > POST /soap/servlet/rpcrouter HTTP/1.0
> >
> > Host: localhost
> >
> > Content-Type: text/xml; charset=utf-8
> >
> > Content-Length: 532
> >
> > SOAPAction: ""
> >
> >
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> >
> > <SOAP-ENV:Envelope
> > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
> > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance";
> > xmlns:xsd="http://www.w3.org/1999/XMLSchema";>
> >
> > <SOAP-ENV:Body>
> >
> > <ns1:SIVerify xmlns:ns1="urn:issfilexfer"
> > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
> >
> > <test xmlns:ns2="http://xml.apache.org/xml-soap"; xsi:type="ns2:Vector">
> >
> > <item xsi:type="xsd:string">-MODE=BCA</item>
> >
> > </test>
> >
> > </ns1:SIVerify>
> >
> > </SOAP-ENV:Body>
> >
> > </SOAP-ENV:Envelope>
> >
> > POST /soap/servlet/rpcrouter HTTP/1.0
> >
> > Host: localhost
> >
> > Content-Type: multipart/related;
> > boundary="----=_Part_2_26204548.1055357926250"; type="text/xml";
> > start="13783459.1055357926281.apache-soap.TRAINING???"
> >
> > Content-Length: 28545
> >
> > SOAPAction: ""
> >
> >
> >
> > ------=_Part_2_26204548.1055357926250
> >
> > Content-Type: text/xml; charset=utf-8
> >
> > Content-Transfer-Encoding: 8bit
> >
> > Content-ID: <13783459.1055357926281.apache-soap.TRAININGi ¡Æ>
> >
> > Content-Length: 1480
> >
> >
> >
> > <?xml version='1.0' encoding='UTF-8'?>
> >
> > <SOAP-ENV:Envelope
> > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
> > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance";
> > xmlns:xsd="http://www.w3.org/1999/XMLSchema";>
> >
> > <SOAP-ENV:Body>
> >
> > <ns1:SIService xmlns:ns1="urn:issfilexfer"
> > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
> >
> > <test xmlns:ns2="http://xml.apache.org/xml-soap"; xsi:type="ns2:Vector">
> >
> > <item xsi:type="xsd:int">1</item>
> >
> > <item xsi:type="xsd:string">LooseFiles_105108.zip</item>
> >
> > <item xmlns:ns3="http://schemas.xmlsoap.org/soap/encoding/";
> > xsi:type="ns3:base64">KqwXPO7KDgVWa3HWqygmSQ==</item>
> >
> > <item href
> > ="cid:4875224.1055357926265.apache-soap.TRAINING%F6%AB%FB%AD%B8%F4"/>
> >
> > <item xsi:type="xsd:string">-MODE=BCA</item>
> >
> > <item xsi:type="xsd:string">CL_DICT=INSYNC30</item>
> >
> > <item xsi:type="xsd:string">CL_DATA=KAISTEP</item>
> >
> > <item xsi:type="xsd:string">CL_USER</item>
> >
> > <item xsi:type="xsd:string">=</item>
> >
> > <item xsi:type="xsd:string">321`1143*79321777&gt;111f57000</item>
> >
> > <item xsi:type="xsd:string">CL_PSWD</item>
> >
> > <item xsi:type="xsd:string">=</item>
> >
> > <item xsi:type="xsd:string">321`1143*79321777&gt;111f57000</item>
> >
> > <item xsi:type="xsd:string">CL_SGRP</item>
> >
> > <item xsi:type="xsd:string">=</item>
> >
> > <item xsi:type="xsd:string">*}b145501*63117901&lt;;17778000</item>
> >
> > <item xsi:type="xsd:string">CL_OS_USER=brianp</item>
> >
> > <item xsi:type="xsd:string">SV_LOG_COPY=</item>
> >
> > </test>
> >
> > </ns1:SIService>
> >
> > </SOAP-ENV:Body>
> >
> > </SOAP-ENV:Envelope>
> >
> >
> >
> > ------=_Part_2_26204548.1055357926250
> >
> > Content-Type: application/octet-stream
> >
> > Content-Transfer-Encoding: 8bit
> >
> > Content-ID: <4875224.1055357926265.apache-soap.TRAININGi ¡Æ>
> >
> > Content-Length: 26625
> >
> >
> >
>
>
> Scott Nichol
>
> Do not reply directly to this e-mail address,
> as it is filtered to only receive e-mail from
> specific mailing lists.
>
>
>
>
>


Scott Nichol

Do not reply directly to this e-mail address,
as it is filtered to only receive e-mail from
specific mailing lists.


Reply via email to