[ 
http://issues.apache.org/jira/browse/AXIS2-489?page=comments#action_12413772 ] 

Thilina Gunarathne commented on AXIS2-489:
------------------------------------------

This behavior is observed when interop testing MTOM with WCF using UTF-16. 
Axis2 cannot decode the UTF-16 encoded CID's inside the XOP:Inlcude element 
sent by WCF. I earlier thought this need to be done by the parser.. But now it 
seems it's up to Axis2 to do the work.

I think following code from 
o.a.axiom.om.impl.mtom.MTOStaxSoapModelBuilder.createOMElement()  method might 
be the culprit for the above behavior. Note that we are checking only for 
UTF-8. Try changing those.. 

                if (contentIDName.equalsIgnoreCase("href")
                        & contentID.substring(0, 3).equalsIgnoreCase("cid")) {
                    contentID = contentID.substring(4);
                    String charsetEncoding = getDocument().getCharsetEncoding();
                    String charEnc = charsetEncoding == null || 
"".equals(charsetEncoding) ? "UTF-8" : charsetEncoding;
                    try {
                        contentID = URLDecoder.decode(contentID, charEnc);
                    } catch (UnsupportedEncodingException e) {
                        throw new OMException("Unsupported Character Encoding 
Found", e);
                    }

Sorry.. I will not be able to give it a go due to me being too tied up with 
exams..

> Axis2 cannot decode UTF16 URL encoded strings
> ---------------------------------------------
>
>          Key: AXIS2-489
>          URL: http://issues.apache.org/jira/browse/AXIS2-489
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>   Components: om
>     Reporter: Thilina Gunarathne

>
> Axis2 wasn't able  to decode the UTF-16 URL encoded content-id urn strings 
> sent by WCF. 
> Problem seems to be with the underlying parser...
> Please investigate more in to this in cases other than MTOM.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to