Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If I understand you correctly, you want to expose a REST service as a SOAP service, so that SOAP clients can access your REST service through the ESB? </p> <p>If that is the case, it is possible :) You should check out sample 152 from these: <a href="http://docs.wso2.org/wiki/display/ESB451/Proxy+Service+Samples">http://docs.wso2.org/wiki/display/ESB451/Proxy+Service+Samples</a></p> <p>It'll explain how you take a SOAP request and pass it to a REST backend and then transform the REST response into a SOAP response. </p> <p>EDIT: Here's a sample configuration on how to do what you asked in the comments, hopefully it will get you started :) </p> <pre><code>&lt;proxy xmlns="http://ws.apache.org/ns/synapse" name="RESTProxy" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"&gt; &lt;target&gt; &lt;inSequence&gt; &lt;!-- We set the HTTP Method we want to use to make the REST request here --&gt; &lt;property name="HTTP_METHOD" value="GET" scope="axis2"/&gt; &lt;!-- This is where the magic happens, for what you want i.e. mapping SOAP "params" to REST query param's --&gt; &lt;property name="messageType" value="application/x-www-form-urlencoded" scope="axis2"/&gt; &lt;send&gt; &lt;endpoint&gt; &lt;!-- This is the RESTful URL we are going to query, like the one in the ESB example 152 --&gt; &lt;address uri="http://localhost/person" /&gt; &lt;/endpoint&gt; &lt;/send&gt; &lt;/inSequence&gt; &lt;outSequence&gt; &lt;log level="full"/&gt; &lt;property name="messageType" value="text/xml" scope="axis2"/&gt; &lt;send/&gt; &lt;/outSequence&gt; &lt;/target&gt; &lt;description&gt;&lt;/description&gt; &lt;/proxy&gt; </code></pre> <p>Then the SOAP request you make to the ESB should be something like: </p> <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"&gt; &lt;soapenv:Header/&gt; &lt;soapenv:Body&gt; &lt;person&gt; &lt;fromDate&gt;2012-01-01&lt;/fromDate&gt; &lt;toDate&gt;2012-12-31&lt;/toDate&gt; &lt;/person&gt; &lt;/soapenv:Body&gt; &lt;/soapenv:Envelope&gt; </code></pre> <p>Hope that helps :) </p>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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