Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <api context="/example" name="example" xmlns="http://ws.apache.org/ns/synapse">
- <resource methods="GET">
- <inSequence>
- <property name="ROOT" scope="default">
- <root:movie xmlns:root="www.wso2esb.com"/>
- </property>
- <property name="uri.var.id" scope="default" type="STRING" value="tt0418279"/>
- <clone continueParent="true" id="movie" sequential="true">
- <target>
- <sequence>
- <send>
- <endpoint>
- <http format="rest" uri-template="http://api.themoviedb.org/3/movie/{uri.var.id}?api_key=KEY&append_to_response=casts,images"/>
- </endpoint>
- </send>
- </sequence>
- </target>
- <target>
- <sequence>
- <send>
- <endpoint>
- <http format="rest" uri-template="https://www.omdbapi.com/?type=movie&i={uri.var.id}"/>
- </endpoint>
- </send>
- </sequence>
- </target>
- </clone>
- </inSequence>
- <outSequence>
- <aggregate id="movie">
- <completeCondition>
- <messageCount max="-1" min="-1"/>
- </completeCondition>
- <onComplete enclosingElementProperty="ROOT" expression="//jsonObject/*" xmlns:dummy="http://org.dummy" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
- <log level="full"/>
- <datamapper config="conf:myresources/exampleMap.dmc" inputSchema="conf:myresources/exampleInput.dmc" inputType="XML" outputSchema="conf:myresources/exampleOutput.dmc" outputType="JSON"/>
- <log level="full"/>
- <send/>
- </onComplete>
- </aggregate>
- </outSequence>
- <faultSequence/>
- </resource>
- </api>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement