Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can achieve this with a configuration similar to the following; (We must set the "messageType" property to "text/xml" to engage the SOAP message builder when responding back to the client.)</p> <pre><code>&lt;proxy xmlns="http://ws.apache.org/ns/synapse" name="JSONToSOAPService" transports="https,http"&gt; &lt;target&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;endpoint&gt; &lt;address uri="http://api.statsfc.com/premier-league/table.json?key=free"/&gt; &lt;/endpoint&gt; &lt;/target&gt; &lt;description&gt;&lt;/description&gt; &lt;/proxy&gt; </code></pre> <p>But if your JSON response object is exactly same as the one you get from the sample service that you've provided (ie., if it is an array of anonymous objects), the ESB is going to cut down the response to include only the first element (see following SOAP response).</p> <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt; &lt;soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"&gt; &lt;soapenv:Body&gt; &lt;position&gt;1&lt;/position&gt; &lt;team_id&gt;10260&lt;/team_id&gt; &lt;team&gt;Manchester United&lt;/team&gt; &lt;played&gt;21&lt;/played&gt; &lt;won&gt;17&lt;/won&gt; &lt;drawn&gt;1&lt;/drawn&gt; &lt;lost&gt;3&lt;/lost&gt; &lt;for&gt;54&lt;/for&gt; &lt;against&gt;28&lt;/against&gt; &lt;difference&gt;26&lt;/difference&gt; &lt;points&gt;52&lt;/points&gt; &lt;info&gt;championsleague&lt;/info&gt; &lt;/soapenv:Body&gt; &lt;/soapenv:Envelope&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. 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