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>&lt;CASE&gt;&lt;RESULT&gt;Y&lt;/RESULT&gt;&lt;CASE_SEQ&gt;MA200808110006&lt;/CASE_SEQ&gt;&lt;CONFIRM_ID&gt;0536&lt;/CONFIRM_ID&gt;&lt;TicketNo&gt;1234&lt;/TicketNo&gt;&lt;/CASE&gt;</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>&amp;lt;CASE>&amp;lt;RESULT>Y&amp;lt;/RESULT>&amp;lt;CASE_SEQ>MA200808120006&amp;lt;/CASE_SEQ>&amp;lt;CONFIRM_ID>0662&amp;lt;/CONFIRM_ID>&amp;lt;TicketNo>1234&amp;lt;/TicketNo>&amp;lt;/CASE></CLM_CASE_INSTResult></CLM_CASE_INSTResponse></soap:Body></soap:Envelope>
 

============================================================
The "&amp;gt;" was transformed into ">" character while "&amp;lt;" remains
the same!!

All I need is either both appear to be "<" and ">" or "&amp;lt;" and
"&amp;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
-- 
View this message in context: 
http://www.nabble.com/The-%22%3E%22-character...-tp18922440p18922440.html
Sent from the WSO2 ESB Users mailing list archive at Nabble.com.


_______________________________________________
Esb-java-user mailing list
[email protected]
http://mailman.wso2.org/cgi-bin/mailman/listinfo/esb-java-user

Reply via email to