This > conversion happens from the underlying XML object model (i.e. Axiom). I did couple of samples with Axiom and found out that this happens only when you build an element from a stream. Should a text content undergo such transformation? If not then I think we should put a JIRA to Axiom ;)
Thanks, Saliya Ruwan Linton wrote: > Hi Fanny, > > It is OK to convert the &gt; to '>' but it is not OK to convert the > &lt; to '<' because '<' is the xml starting tag. I think there is > something wrong in the XSLT other than the conversion of the encoded > character? > > Is there any possibility to send the XSLT that you are using with the > configuration of the ESB so that I can have a look at what is actually > wrong. > > It is OK to send the configurations and the XSLT privately to my email > address if there are any private data that you don't want to expose in > public [EMAIL PROTECTED] > > Thanks, > Ruwan > > unmou wrote: > >> Hello, >> >> Since the connection time for ESB to our servlet is too long, we decided not >> to use the servlet anymore and send requests to the web service directly. >> >> But problems encountered again! :-( >> >> The following is the response from the web service directly. >> >> ====================================================== >> <?xml version="1.0" encoding="UTF-8"?> >> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" >> xmlns:xsd="http://www.w3.org/2001/XMLSchema" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >> <soap:Body> >> <CLM_CASE_INSTResponse >> xmlns="http://tempuri.org/MTWService/WebService/CaseService"> >> >> <CLM_CASE_INSTResult><CASE><RESULT>Y</RESULT><CASE_SEQ>MA200808110006</CASE_SEQ><CONFIRM_ID>0536</CONFIRM_ID><TicketNo>1234</TicketNo></CASE></CLM_CASE_INSTResult> >> </CLM_CASE_INSTResponse> >> </soap:Body> >> </soap:Envelope> >> ========================================================== >> >> Inside the <CLM_CASE_INSTResult> node, the element should be treat as a >> string. >> >> But when I received the response through ESB, inside the log, it appears >> like this: >> =========================================================== >> <?xml version='1.0' encoding='utf-8'?><soap:Envelope >> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" >> xmlns:xsd="http://www.w3.org/2001/XMLSchema" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><CLM_CASE_INSTResponse >> xmlns="http://tempuri.org/MTWService/WebService/CaseService"> >> >> <CLM_CASE_INSTResult>&lt;CASE>&lt;RESULT>Y&lt;/RESULT>&lt;CASE_SEQ>MA200808120006&lt;/CASE_SEQ>&lt;CONFIRM_ID>0662&lt;/CONFIRM_ID>&lt;TicketNo>1234&lt;/TicketNo>&lt;/CASE></CLM_CASE_INSTResult></CLM_CASE_INSTResponse></soap:Body></soap:Envelope> >> >> >> ============================================================ >> The "&gt;" was transformed into ">" character while "&lt;" remains >> the same!! >> >> All I need is either both appear to be "<" and ">" or "&lt;" and >> "&gt;" >> >> This problem will cause the XSLT cannot performed correctly, with the >> following error: >> >> ============================================================= >> WARN Fault handler - setting ERROR_DETAIL : >> org.apache.synapse.SynapseException: Unable to perform XSLT transformation >> using : back1 against source XPath : s11:Body/child::*[position()=1] | >> s12:Body/child::*[position()=1] at >> org.apache.synapse.mediators.AbstractMediator.handleException(AbstractMediator.java:220) >> at >> org.apache.synapse.mediators.transform.XSLTMediator.mediate(XSLTMediator.java:180) >> at >> org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:58) >> at >> org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:125) >> at >> org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:162) >> at >> org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:301) >> at >> org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:131) >> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176) at >> org.apache.synapse.transport.nhttp.ClientWorker.run(ClientWorker.java:200) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) >> at java.lang.Thread.run(Thread.java:619) Caused by: >> org.apache.axiom.om.OMException: >> com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '&' (code >> 38) in prolog; expected '<' at [row,col {unknown-source}]: [2,1] at >> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:249) >> at >> org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:132) >> at >> org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:411) >> at >> org.apache.synapse.mediators.transform.XSLTMediator.performXSLT(XSLTMediator.java:368) >> at >> org.apache.synapse.mediators.transform.XSLTMediator.mediate(XSLTMediator.java:177) >> ... 10 more Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: >> Unexpected character '&' (code 38) in prolog; expected '<' at [row,col >> {unknown-source}]: [2,1] at >> com.ctc.wstx.sr.StreamScanner.throwUnexpectedChar(StreamScanner.java:623) at >> com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2047) >> at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069) at >> org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:506) >> at >> org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:161) >> ... 14 more >> ============================================================= >> >> Do anyone has any idea why it is like this? >> >> Thanks! >> >> Fanny >> >> > > > _______________________________________________ > Esb-java-user mailing list > [email protected] > http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-user > > _______________________________________________ Esb-java-user mailing list [email protected] http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-user
