Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <api context="/test" name="test" 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"/>
- <dbreport description="">
- <connection>
- <pool>
- <password>regadmin</password>
- <driver>com.mysql.jdbc.Driver</driver>
- <url>jdbc:mysql://localhost:3306/regdb</url>
- <user>regadmin</user>
- </pool>
- </connection>
- <statement>
- <sql><![CDATA[insert into tracker (`id`, `query`, `tracked`) values (NULL, ?, NOW())]]></sql>
- <parameter expression="get-property('uri.var.id')" type="VARCHAR"/>
- </statement>
- </dbreport>
- <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=code&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="gov:datamapper/TestMapping.dmc" inputSchema="gov:datamapper/TestMapping_inputSchema.json" inputType="XML" outputSchema="gov:datamapper/TestMapping_outputSchema.json" outputType="XML"/>
- <send/>
- </onComplete>
- </aggregate>
- </outSequence>
- <faultSequence/>
- </resource>
- </api>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement