wso2 - wso2esb - REST API Failure doing XML to XML mapping -


failure scenarios listed in red

i not able make call rest backend browser[rest client] using wso2 esb when trying scenarios listed in red.

content type , messageformatter tried, doing wrong or limitation of rest api.

source code scenario :

<?xml version="1.0" encoding="utf-8"?> <api xmlns="http://ws.apache.org/ns/synapse" name="invokeasservice" context="/invokews" hostname="10.203.101.76">     <resource methods="get" uri-template="/{str1}">         <insequence>             <log level="full" separator=",">                 <property name="sequence" value="** request recieved**"/>             </log>             <property name="rest_url_postfix" expression="fn:concat('/get?id=',get-property('uri.var.str1'))" scope="axis2" type="string"/>             <send>                 <endpoint>                     <address uri="http://10.203.101.76:9765/services/personinfoservice.personinfoservicehttpendpoint/"/>                 </endpoint>             </send>         </insequence>         <outsequence>             <log level="full" separator=",">                 <property name="sequence" value="** message recieved**"/>             </log>             <property name="contenttype" value="application/xml" scope="axis2"/>             <send/>         </outsequence>         <faultsequence/>     </resource> </api> 

browser error:

error message on browser

#####################update#####################

scenario seems work after changing source

<api xmlns="http://ws.apache.org/ns/synapse" name="invokeasservice" context="/invokews" hostname="10.203.101.76">    <resource methods="get" uri-template="/{str1}">       <insequence>          <log level="full" separator=",">             <property name="sequence" value="** request recieved**"/>          </log>          <property name="rest_url_postfix" expression="fn:concat('/get?id=',get-property('uri.var.str1'))" scope="axis2" type="string"/>          <send>             <endpoint>                <address uri="http://10.203.101.76:9765/services/personinfoservice.personinfoservicehttpendpoint/"/>             </endpoint>          </send>       </insequence>       <outsequence>          <send/>       </outsequence>       <faultsequence/>    </resource> </api> 

but, scenario c still unsolved puzzle response coming in xml format. tried adding following outsequence. not help

<outsequence>             <property name="messagetype" value="application/json" scope="axis2" type="string"/>             <send/>         </outsequence> 


Comments

Popular posts from this blog

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -

c++ - Warning : overflow in implicit constant conversion -