WSO2 how to change response from string to xml
My application response is a xml like:
<?xml version="1.0" encoding="UTF-8"?><message><header>
<TransactionID>1</TransactionID>
<Timestamp>2012-04-21 14:47:28</Timestamp>
<OpCode>BOSS_DELETE_USER_SME.CD</OpCode>
<MsgType>RESP</MsgType>
<ReturnCode>3001</ReturnCode>
<ErrorMessage>???????</ErrorMessage> </header><body/></message>
But in ESB,the response like :
< ;?xml version="1.0" encoding="UTF-8"?> ;< ;message> ;< ;header> ; < ;TransactionID> ;1< ;/TransactionID> ; < ;Timestamp> ;2012-04-21 14:47:28< ;/Timestamp> ; < ;OpCode> ;BOSS_DELETE_USER_SME.CD< ;/OpCode> ; < ;MsgType> ;RESP< ;/MsgType> ; < ;ReturnCode> ;3001< ;/ReturnCode> ; < ;ErrorMessage> ;???????< ;/ErrorMessage> ; < ;/header> ;< ;body/> ;< ;/message> ;
How to set in outSequence? I have tried use contentType and messageType,but no use.
Best regards.
What is the content type of the response message?( Looks like it is not text/xml. You may use the tcpmonitor to find that out. ) If the content type is found, then you can set the correct message formatter in axis2.xml. (ie application/xml formatter).
链接地址: http://www.djcxy.com/p/29832.html上一篇: 如何读取和写入XML文档节点值?
下一篇: WSO2如何更改从字符串到xml的响应