wso2 esb更改soap命名空间前缀

时间:2014-01-28 15:27:43

标签: soap wso2 wso2esb

我的wso2esb上有代理服务,响应如下:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        ..........
    </soap:Body>
</soap:Envelope>

wso2esb是否有任何可配置的位置我可以更改soap前缀?我需要这样的结果:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Body>
       ..........
    </soapenv:Body>
</soapenv:Envelope>

1 个答案:

答案 0 :(得分:3)

你不应该关心命名空间的名称,但是如果你真的需要它,你可以例如使用丰富的中介来:保存身体,改变肥皂信封,恢复身体

<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="TestSOF"
       transports="http"
       startOnLoad="true"
       trace="disable">
   <description/>
   <target endpoint="ProductEngineServiceMock1">
      <outSequence>
         <enrich>
            <source type="body"/>
            <target type="property" property="INPUT_MESSAGE"/>
         </enrich>
         <enrich>
            <source type="inline">
               <myns:Envelope xmlns:myns="http://schemas.xmlsoap.org/soap/envelope/">
                  <myns:Body/>
               </myns:Envelope>
            </source>
            <target type="envelope"/>
         </enrich>
         <enrich>
            <source type="property" property="INPUT_MESSAGE"/>
            <target type="body"/>
         </enrich>
         <send/>
      </outSequence>
   </target>
</proxy>