Note that there are some explanatory texts on larger screens.

plurals
  1. POWSO2 ESB overwrites a ContentType property
    text
    copied!<p>I am working on the WSO2 ESB Proxy service, which involves exposing the internal RESTful service via SOAP endpoint on the ESB. My RESTful service requires Content-type = "application/rdf+xml". I tried setting it using all 3 properties mentioned in the documentation: messageType, ContentType and CONTENT_TYPE. However, the request Content-type still remains "application/xml".</p> <p>Here is an excerpt from my sequence that calls REST service:</p> <pre><code> &lt;property xmlns:ns="http://org.apache.synapse/xsd" name="REST_URL_POSTFIX" value="/record/12345" scope="axis2" type="STRING"/&gt; &lt;property name="HTTP_METHOD" value="PUT" scope="axis2" type="STRING"/&gt; &lt;property name="messageType" value="application/rdf+xml" scope="axis2" type="STRING"/&gt; &lt;property name="ContentType" value="application/rdf+xml" scope="axis2" type="STRING"/&gt; &lt;property name="CONTENT_TYPE" value="application/rdf+xml" scope="axis2" type="STRING"/&gt; &lt;send&gt; &lt;endpoint name="CQ"&gt; &lt;address uri="http://my_url" format="pox"&gt; &lt;/address&gt; &lt;property xmlns:ns="http://org.apache.synapse/xsd" name="Authorization" expression="fn:concat('Basic ', base64Encode('username:password'))" scope="transport"/&gt; &lt;property name="OSLC-Core-Version" value="2.0" scope="transport"/&gt; &lt;property name="Accept" value="application/rdf+xml" scope="transport"/&gt; &lt;/endpoint&gt; &lt;/send&gt; </code></pre> <p>I tested it with TCPMon and no matter what Content-type property I use, request still contains "application/xml".</p> <p>Please advice.</p>
 

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