Marian
Marian

Reputation: 387

wso2 esb change soap namespace prefix

I have a proxy service on my wso2esb and a response like this:

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

Does wso2esb have any configurable place where I can change the soap prefix? I need a result like this:

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

Upvotes: 0

Views: 1994

Answers (1)

Jean-Michel
Jean-Michel

Reputation: 5946

You should'nt care about the name of the namespace, but if you really need that, you can for exemple use enrich mediator to : Save the body, change soap envelope, restore the body

<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>

Upvotes: 3

Related Questions