Note that there are some explanatory texts on larger screens.

plurals
  1. PORemoving SOAP Wrapper From a Message in wso2 ESB
    primarykey
    data
    text
    <p>I tried to invoke a web service through WSO2esb.My web service is only accepting a soap message like this.</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;ns1:Envelope xmlns:ns1="http://www.webserviceX.NET/ConversionRate/Input" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Documents and Settings\RoGulk\Desktop\SPM\Envelope.xsd"&gt; &lt;ns1:Body&gt; &lt;ns2:ConversionRate xmlns:ns2="http://www.webserviceX.NET/"&gt; &lt;ns2:FromCurrency&gt;USD&lt;/ns2:FromCurrency&gt; &lt;ns2:ToCurrency&gt;USD&lt;/ns2:ToCurrency&gt; &lt;/ns2:ConversionRate&gt; &lt;/ns1:Body&gt; &lt;/ns1:Envelope&gt; </code></pre> <p>But the problem is when I read the input message to the esb, The esb adds a additional wrapper to my meaasage like this</p> <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt; &lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt; &lt;soapenv:Body&gt; &lt;ns1:Envelope xmlns:ns1="http://www.webserviceX.NET/ConversionRate/Input"&gt; &lt;ns1:Body&gt; &lt;ns2:ConversionRate xmlns:ns2="http://www.webserviceX.NET/"&gt; &lt;ns2:FromCurrency&gt;INR&lt;/ns2:FromCurrency&gt; &lt;ns2:ToCurrency&gt;NAD&lt;/ns2:ToCurrency&gt; &lt;/ns2:ConversionRate&gt; &lt;/ns1:Body&gt; &lt;/ns1:Envelope&gt; &lt;/soapenv:Body&gt; &lt;/soapenv:Envelope&gt; </code></pre> <p>I think it can be done by using the 'application/XML' message formatter before I call to my endpoint.But the problem is I don't know how to invoke the 'application/XML' message formatter and where to use it.** Guys please help me, Thanks</p> <p><strong>EDITED</strong></p> <p>I thought that adding my proxy service configuration will be helpful.</p> <p>In this I am not using default out sequance. Instead of that I am using sequance called "currencyFileWriter" which is responsible for writing a file to a output directory.</p> <p>This is my proxy service</p> <pre><code>&lt;proxy xmlns="http://ws.apache.org/ns/synapse" name="CurrencyProxy" transports="https,http,vfs" statistics="disable" trace="disable" startOnLoad="true"&gt; &lt;target&gt; &lt;inSequence&gt; &lt;property name="messageType" value="application/xml" scope="default" type="STRING"/&gt; &lt;property name="ContentType" value="application/xml" scope="default"/&gt; &lt;log level="custom"&gt; &lt;property name="MessageType" expression="$axis2:ContentType"/&gt; &lt;/log&gt; &lt;log level="full"/&gt; &lt;log level="custom"&gt; &lt;property name="insequance" value="================================Forwerded to out File writer sequance====================="/&gt; &lt;/log&gt; &lt;send receive="currencyFileWriter" buildmessage="true"&gt; &lt;endpoint key="CurrencyConverter"/&gt; &lt;/send&gt; &lt;log level="custom"&gt; &lt;property name="After" value="============================AFTER SEND================"/&gt; &lt;/log&gt; &lt;log level="full"/&gt; &lt;/inSequence&gt; &lt;/target&gt; &lt;parameter name="transport.PollInterval"&gt;5&lt;/parameter&gt; &lt;parameter name="transport.vfs.ActionAfterProcess"&gt;MOVE&lt;/parameter&gt; &lt;parameter name="transport.vfs.FileURI"&gt;file:///C:/test/Orginal1/&lt;/parameter&gt; &lt;parameter name="transport.vfs.MoveAfterProcess"&gt;file:///C:/test/Pass1/&lt;/parameter&gt; &lt;parameter name="transport.vfs.MoveAfterFailure"&gt;file:///C:/test/Failures1/&lt;/parameter&gt; &lt;parameter name="transport.vfs.FileNamePattern"&gt;currencytest.xml&lt;/parameter&gt; &lt;parameter name="transport.vfs.ContentType"&gt;application/xml&lt;/parameter&gt; &lt;parameter name="transport.vfs.ActionAfterFailure"&gt;MOVE&lt;/parameter&gt; &lt;description&gt;&lt;/description&gt; &lt;/proxy&gt; </code></pre> <p>And tihs is my CurrencyFilewriter sequance</p> <pre><code>&lt;sequence xmlns="http://ws.apache.org/ns/synapse" name="currencyFileWriter"&gt; &lt;log level="custom"&gt; &lt;property name="sequance" value="=====================RECIVED TO CURRENCYFILEWRITER=========================="/&gt; &lt;/log&gt; &lt;log level="full"/&gt; &lt;property name="transport.vfs.ReplyFileName" value="result.xml" scope="default" type="STRING"/&gt; &lt;property name="OUT_ONLY" value="true" scope="default" type="STRING"/&gt; &lt;send&gt; &lt;endpoint&gt; &lt;address uri="vfs:file:///C:/test/Out1"/&gt; &lt;/endpoint&gt; &lt;/send&gt; &lt;/sequence&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload