Hello everyone,
Need help on,How to generate a dummy response XML based on payload.XML file is available on local system.I am new to APIGEE. This is required for Proof of concept.
@sudheendra you mentioned
1 - Use a node.js target to stub the XML responses. In your node.js target you can conditionally return the SOAP response based on request payload. If you have XML response as files, you can upload them as resources and read in your node.js code.
The above one is my scenario.Kindly help me to achieve this.
@chidambaram , Welcome to Apigee Community, Glad to know you are evaluating Apigee.
It's simple, You just need to know Node.Js. You can run Node.JS applications as target servers in Apigee Edge.
For example, Please find attached node app that outputs mock xml from a xml file when you call API / or /breakfast.
You can deploy node app to Apigee using apigeetool node command line tool. You can find more details here.
apigeetool deploynodeapp -n {PROXYNAME} -d . -m server.js -o {APIGEEORG} -e test -b /v1/mock -u {APIGEEUSERNAME}
I have deployed above node code to one of my org, You can see API in action below,
http://apigee4mv4d-test.apigee.net/v1/mock/breakfast
http://apigee4mv4d-test.apigee.net/v1/mock
For your reference , Attached the proxy bundle which you can directly import & see proxy in action.
Hope it helps. Keep us posted moving forward if any.