Hi Krishantha, Following are the steps that involves with the use.
1. Install data services server feature in ESB. 2. Create a new data service 3. Invoke the created data service from callout mediator with local transport inside a RestAPI For the moment I've created a mock service which is similar to stockquote service and invoked using callout mediator with local transport to automate the local transport scenario with callout mediator. *Following is the RestAPI configuration used invoke data service.* <?xml version="1.0" encoding="UTF-8"?> <api xmlns="http://ws.apache.org/ns/synapse" name="ProvaRestApiDecodifica" context="/wso001/services/provarest"> <resource methods="GET" url-mapping="/deploymentstatus"> <inSequence> <property name="NO_ENTITY_BODY" scope="axis2" action="remove"/> <log level="full"> <property name="step" value="API_internal_readDeploymentStatusList BEGIN"/> </log> <property name="FORCE_ERROR_ON_SOAP_FAULT" value="true" scope="default" type="STRING"/> <payloadFactory media-type="xml"> <format> <org:readDeploymentStatusList xmlns:org="http://org.csi.yucca "/> </format> <args/> </payloadFactory> <log level="full"> <property name="step" value="API_internal_readDeploymentStatusList CALLOUT"/> <property name="BODY" expression="$body/child::*"/> </log> * <callout serviceURL="local:///services/MyDataService/"* * action="readDeploymentStatusList">* * <source xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/>"* * xmlns:org="http://org.csi.yucca <http://org.csi.yucca>"* * xpath="$body/child::*"/>* * <target xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/ <http://schemas.xmlsoap.org/soap/envelope/>"* * xmlns:org="http://org.csi.yucca <http://org.csi.yucca>"* * xpath="$body/child::*"/>* * </callout>* <log level="full"> <property name="step" value="API_internal_readDeploymentStatusList DOPO CALLOUT"/> </log> <loopback description="end"/> </inSequence> <outSequence> <property name="messageType" value="application/json" scope="axis2" type="STRING"/> <log level="full"> <property name="step" value="API_internal_readDeploymentStatusList END"/> </log> <send/> </outSequence> <faultSequence> <log level="full"> <property name="STEP" value="ERROR $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"/> </log> <property name="messageType" value="application/json" scope="axis2" type="STRING"/> <property name="NO_ENTITY_BODY" scope="axis2" action="remove"/> <property name="HTTP_SC" value="500" scope="axis2" type="STRING"/> <payloadFactory media-type="json"> <format>{ "error_code": "YuccaInternaApiException", "error_message": "$1", "error_detail": "" }</format> <args> <arg evaluator="xml" expression="get-property('ERROR_MESSAGE')"/> </args> </payloadFactory> <log level="full" separator=","> <property name="message" expression="get-property('ERROR_MESSAGE')"/> <property name="code" expression="get-property('ERROR_CODE')"/> <property name="detail" expression="get-property('ERROR_DETAIL')"/> <property name="exception" expression="get-property('ERROR_EXCEPTION')"/> </log> <respond/> </faultSequence> </resource> </api> Thank you! On Wed, Feb 18, 2015 at 5:33 PM, Krishantha Samaraweera <[email protected] > wrote: > > > On Thu, Feb 12, 2015 at 2:58 PM, Vijitha Ekanayake <[email protected]> > wrote: > >> Hi all, >> >> Is there a way to do the $subject? If so, can someone point me out some >> references or any sample test-case may helpful. >> > > Can you list manual steps involve with this use case ? based on the steps > we might be able to propose you a solution. > > Thanks, > Krishantha. > > >> >> Thanks ! >> >> -- >> Vijitha Ekanayake >> Software Engineer*, *WSO2, Inc.; http://wso2.com/ >> Mobile : +94 777 24 73 39 | +94 718 74 44 08 >> lean.enterprise.middleware >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > Krishantha Samaraweera > Senior Technical Lead - Test Automation > Mobile: +94 77 7759918 > WSO2, Inc.; http://wso2.com/ > lean . enterprise . middlewear. > -- Vijitha Ekanayake Software Engineer*, *WSO2, Inc.; http://wso2.com/ Mobile : +94 777 24 73 39 | +94 718 74 44 08 lean.enterprise.middleware
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
