Note that there are some explanatory texts on larger screens.

plurals
  1. POWSO2 ESB: log and convert response from the RDF REST service back to SOAP
    primarykey
    data
    text
    <p>I am working on the WSO2 ESB POC for my company, which involves exposing the internal RESTful service via SOAP endpoint on the ESB. I've read all the threads and blog posts related to the SOAP-REST mediation, but still could not find an answer. My RESTful service returns "application/rdf+xml" message format. Here is my sequence:</p> <pre><code>&lt;proxy xmlns="http://ws.apache.org/ns/synapse" name="CQProxy" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"&gt; &lt;target&gt; &lt;inSequence&gt; &lt;send&gt; &lt;endpoint&gt; &lt;address uri="http://&lt;MYURL&gt;/cqweb/oslc/repo/eraprototype/db/CQT_T/simpleQuery/16783484?oslc.select=dcterms:title,cq:CM_Label,dcterms:type,cq:Assigned_To,oslc_cm:status,cq:AutoDeployment,cq:SentToEADS_By&amp;oslc.where=oslc:shortTitle=CQT_T00000131" format="get"/&gt; &lt;property xmlns:ns="http://org.apache.synapse/xsd" name="Authorization" expression="fn:concat('Basic ', base64Encode('user: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; &lt;/inSequence&gt; &lt;outSequence&gt; &lt;log level="full"/&gt; &lt;send/&gt; &lt;/outSequence&gt; &lt;/target&gt; &lt;publishWSDL key="gov:/services/cqproxy/CQProxy.wsdl"&gt; &lt;resource location="CQProxy.xsd" key="gov:/services/cqproxy/CQProxy.xsd"/&gt; &lt;resource location="eads_ws.xsd" key="gov:/services/eads_ws/eads_ws.xsd"/&gt; &lt;/publishWSDL&gt; &lt;description&gt;&lt;/description&gt; &lt;/proxy&gt; </code></pre> <p>I am able to send the request to the RESTful service successfully. However my OUT sequence can't process the "application/rdf+xml" response. Logs show the following error:</p> <pre><code>INFO {org.apache.axis2.builder.BuilderUtil} - OMException in getSOAPBuilder {org.apache.axis2.builder.BuilderUtil} org.apache.axiom.soap.SOAPProcessingException: First Element must contain the local name, Envelope , but found RDF </code></pre> <p><br>Two questions: <br>1. How can I log the actual response that is received from the REST service before Axis2 applies SOAP transformation to it? My log mediator generates empty SOAP envelope only.</p> <pre><code>INFO {org.apache.synapse.mediators.builtin.LogMediator} - To: http://www.w3.org/2005/08/addressing/anonymous, WSAction: , SOAPAction: , MessageID: urn:uuid:4c06fcb9-4e45-4fb3-bc5a-4350e3d86533, Direction: response, Envelope: &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;/soapenv:Envelope&gt; {org.apache.synapse.mediators.builtin.LogMediator} </code></pre> <p><br/>2. How do I convert from RDF+XML back to the SOAP format? Should I use XSLT mediator in the OUT sequence for this?</p> <p>Appreciate your help!</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. 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