简体   繁体   中英

remove xml declaration in payload response

I want remove xml declaration from wso response created by payload mediator (post method).

  <?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mgod="MgOdinCToCrm" xmlns:mgex="MgExchange">
    <soapenv:Body>
        <m:getQuote xmlns:m="http://services.samples/xsd">
            <m:request>
                <m:symbol/>
            </m:request>
        </m:getQuote>
    </soapenv:Body>
</soapenv:Envelope>

I try use xslt and js mediators to modify response, but it isn't help. This mediator can modify content only in body tag. May be someone faced with this problem

尝试设置messageType,如下所示。

<property name="messageType" scope="axis2" type="STRING" value="application/xml"/>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM