[ 
https://issues.apache.org/jira/browse/RAMPART-83?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13234208#comment-13234208
 ] 

shivendra tripathi commented on RAMPART-83:
-------------------------------------------

Problem is with XML security serialization code. Class CanonicalizerBase uses 
faulty logic to identify non ascii char.
if( (c & 0x80) ==0) {
                                writer.write(c);
                        } else {
                                UtfHelpper.writeCharToUtf8(c,writer);
                        };

Resolution: Problem is present in xml-sec 1.4 lib and got fixed in xml-sec 
1.4.2. So you could either change rampart dependency to refer xml-sec 1.4.2 or 
copy classes CanonocalizeBase and UtfHelper from 1.4.2 to 1.4.0. And you are 
all set.

-Shiv
                
> rampart and non us-ascii symbols
> --------------------------------
>
>                 Key: RAMPART-83
>                 URL: https://issues.apache.org/jira/browse/RAMPART-83
>             Project: Rampart
>          Issue Type: Bug
>          Components: rampart-core
>    Affects Versions: 1.3
>         Environment: Linux, jdk1.5.0_11, axis 1.3 
>            Reporter: Sergey Bezverhiy
>            Priority: Minor
>
> 'm having problem with rampart 1.3 and non us-ascii symbols(russian in my 
> case). 
> For example, if in  /samples/basic/sample03 (UsernameToken authentication 
> with a plain text password) in 
> org.apache.rampart.samples.sample03.Client.java we replaced  «Hellow World» 
> by string with russan letters, we got following  exception:
>      Exception in thread "main" org.apache.axis2.AxisFault: Error in 
> extracting message properties
>          at 
> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:70)
>          at org.apache.axis2.engine.Phase.invoke(Phase.java:292)
>          at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)
>          at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:377)
>          at 
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374)
>          at 
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211)
>          at 
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>          at 
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
>          at 
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
>          at org.apache.rampart.samples.sample03.Client.main(Unknown Source)
>      Caused by: org.apache.rampart.RampartException: Error in extracting 
> message properties
>          at 
> org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:290)
>          at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:58)
>          at 
> org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
>          ... 9 more
>      Caused by: org.apache.ws.security.WSSecurityException: Error in 
> converting SOAP Envelope to Document; nested exception is:
>          org.apache.axiom.om.OMException: 
> com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character ((CTRL-CHAR, 
> code 16))
>       at [row,col {unknown-source}]: [4,605]
>          at 
> org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:157)
>          at 
> org.apache.rampart.RampartMessageData.<init>(RampartMessageData.java:150)
>          ... 11 more
>      Caused by: org.apache.axiom.om.OMException: 
> com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal character ((CTRL-CHAR, 
> code 16))
>       at [row,col {unknown-source}]: [4,605]
>          at 
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:239)
>          at 
> org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java:318)
>          at 
> org.apache.axiom.om.impl.llom.OMElementImpl.build(OMElementImpl.java:614)
>          at 
> org.apache.rampart.util.Axis2Util.getDocumentFromSOAPEnvelope(Axis2Util.java:92)
>          ... 12 more
>      Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal 
> character ((CTRL-CHAR, code 16))
>       at [row,col {unknown-source}]: [4,605]
>          at 
> com.ctc.wstx.sr.StreamScanner.throwInvalidSpace(StreamScanner.java:650)
>          at 
> com.ctc.wstx.sr.BasicStreamReader.readTextPrimary(BasicStreamReader.java:4554)
>          at 
> com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2886)
>          at 
> com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019)
>          at 
> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:153)
>          ... 15 more
>      Java Result: 1
> With english letters all work fine. Without rampart axis work fine with 
> russian too.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org
For additional commands, e-mail: java-dev-h...@axis.apache.org

Reply via email to