Skip to content

Instantly share code, notes, and snippets.

View nuwanbando's full-sized avatar

Nuwan Bandara nuwanbando

View GitHub Profile
@nuwanbando
nuwanbando / gist:8745625
Created January 31, 2014 23:47
ent sequence
<sequence xmlns="http://ws.apache.org/ns/synapse" name="ent">
<log level="custom">
<property name="TOP" value="XXXXXXXXX"/>
</log>
<entitlementService remoteServiceUrl="https://localhost:9444/services"
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="mockme"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<log level="full" category="DEBUG"/>
[2014-03-14 12:55:42,049] INFO - LogMediator To: /services/mockme.mockmeHttpSoap11Endpoint, WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: urn:uuid:07c1e28c-c39e-46fe-9e31-282735481969, Direction: request, EEEE = #1, Envelope: <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body></soapenv:Body></soapenv:Envelope>
[2014-03-14 12:55:42,050] INFO - LogMediator To: /services/mockme.mockmeHttpSoap11Endpoint, WSAction: urn:mediate, SOAPAction: urn:mediate, MessageID: urn:uuid:07c1e28c-c39e-46fe-9e31-282735481969, Direction: request, EEEE = #2, Envelope: <?xml version="1.0" encoding="utf-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><text xmlns="http://ws.apache.org/commons/ns/payload">
rc,a,b,c,d,e,f,g,h,i
1,1a,1b,1c,1d,1e,1f,1g,1h,1i
2,2a,2b,2c,2d,2e,2f,2g,2h,2i
3,3a,3b,3c,3d,3e,3f,3g,3h,3i
4,4a,4b,4c,4d,4e,4f,4g,4h,4i
5,5a,5b,5c,5d,5e,5f,5g,5h,5i
6,6a,6b,6c,6d
<proxy name="mockme"
transports="https http"
startOnLoad="true"
trace="disable">
<description/>
<target>
<inSequence>
<log level="full">
<property name="EEEE" value="#1"/>
</log>
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="mockme"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<log level="full">
@nuwanbando
nuwanbando / gist:9553257
Created March 14, 2014 18:02
CSV to XML
<proxy name="mockme"
transports="https http"
startOnLoad="true"
trace="disable">
<description/>
<target>
<inSequence>
<log level="full">
<property name="EEEE" value="#1"/>
</log>
@nuwanbando
nuwanbando / gist:9553305
Created March 14, 2014 18:04
smooks-config
<smooks-resource-list
xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.2.xsd">
<resource-config selector="org.xml.sax.driver">
<resource>org.milyn.csv.CSVReader</resource>
<param name="fields">column,a,b,c,d,e,f,g,h,i</param>
<param name="rootElementName">all</param>
<param name="recordElementName">line</param>
</resource-config>
<proxy name="UTBEPolicy"
transports="https http"
startOnLoad="true"
trace="disable">
<description/>
<target>
<inSequence>
<property name="username" value="Bob" scope="axis2" type="STRING"/>
<property name="password" value="bobPass" scope="axis2" type="STRING"/>
<send>
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://ws.apache.org/ns/synapse">
<registry provider="org.wso2.carbon.mediation.registry.WSO2Registry">
<parameter name="cachableDuration">15000</parameter>
</registry>
<proxy name="testsec"
transports="https http"
startOnLoad="true"
trace="disable">
<description/>
@nuwanbando
nuwanbando / dblookupSeq.xml
Last active August 29, 2015 14:04
dblookupSeq for querying the DB and sending some results back
<sequence xmlns="http://ws.apache.org/ns/synapse" name="dblookupSeq">
<log level="custom">
<property name="text" value="** Looking up from the Database **"></property>
</log>
<property name="book_id" value="3" scope="default" type="INTEGER"></property>
<dblookup>
<connection>
<pool>
<password>root</password>
<user>root</user>