Sunday 15 June 2014

wso2esb - Invoking RESTful service from WSO2 ESB using method POST -


I have a simple lush service, which I want to expose as SOAP based web service using WSO2 ESB I am

My simple restless service to http: // can be brought as a reply, let me know the JSON person's data.

Problem: I am unable to provide parameters for a safe service. I am doing to strip the absolute value from SOAP input, but I do not know how to crawl it; Service using ESB

I have WSO2 ESB

  & lt; Proxy is configured in xmlns = "http: //ws.apache.org / ns / synapse" name = "PersonProxy" transports = "https, http" statistics = "enable" trace = "enable" startOnLoad = "true "& Gt; & Lt; Goal & gt; & Lt; InSequence & gt; & Lt; Property xmlns: soapenv = "http://schemas.xmlsoap.org/soap/envelope/" name = "PERSON_ID" expression = "// soap: body / person / id" / & gt; & Lt; Log level = "full" & gt; & Lt; Property name = "PERSON_ID" expression = "received-asset ('PERSON_ID')" /> & Lt; / Logs & gt; & Lt; Filter xpath = "// person" & gt; & Lt; Then & gt; & Lt; Property Name = "REST_URL_POSTFIX" value = "read" scope = "axis 2" type = "STRING" /> & Lt; Property Name = "HTTP_METHOD" value = "POST" scope = "axis2" type = "STRING" /> & Lt; Property name = "id" expression = "received-asset ('PERSON_ID')" scope = "axis 2" type = "STRING" /> & Lt; Property name = "content type" value = "application / x-www-form-urlcode" scope = "axis" "type =" STRING "/> gt; then / gt; & lt; any other & gt; ; & Lt; / filter & gt; & lt; send & gt; & lt; endpoint & gt; & lt; address uri = "http: //   gt; send to & lt; / inSequence & gt; & quot; outSequence & gt; & Lt; send / & gt; & lt; / outSequence & gt; & lt; / target & gt; & lt; description & gt; & lt; / description & gt; & lt; / proxy & gt;   

My SOAP request looks like the following

   gt; soapenv: body & gt; & lt; person & gt; & lt; id & gt; 3 & lt; / id & gt; & lt; / Person & gt; & lt; / soapenv: body & gt; & lt; / soapenv: envelope & gt;   

As part of the URL I have < Code> GET is another conditional service with the method and id, and it works exactly like ESB config

  & property; property name = "REST_URL_POSTFIX" expression = "Property-Property ('PERSON_ID')" scope = "axis2" type = "STRING" /> property name = "HTTP_METHOD" value = "received" scope = "axis 2" type = "STRING" / & Gt; & Lt; Endpoint & gt; & Lt; Address uri = "http: // << lt; my system & gt; & gt;: 8080 / cfs / person" format = "rest" /> & Lt; / Endpoint & gt;   

Appreciate any hints or help.

If your service is http: // < , you can read the ID from the SOAP request and send it using the "REST_URL_POSTFIX" property below.

  & lt; Property name = "REST_URL_POSTFIX" expression = "// person / id" scope = "axis 2" type = "STRING" />   

Take a look in which a similar scenario applies.

No comments:

Post a Comment