Skip to content

Instantly share code, notes, and snippets.

View hasithaa's full-sized avatar
🏠
Working from home

Hasitha Aravinda hasithaa

🏠
Working from home
View GitHub Profile
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.deployer.bpel.carbon.wso2.org" xmlns:xsd="http://types.services.deployer.bpel.carbon.wso2.org/xsd">
<soapenv:Header/>
<soapenv:Body>
<ser:uploadService>
<ser:fileItems>
<!--Optional:-->
<xsd:dataHandler>UEsDBAoAAAAIAEyOIkRwFzFB2gQAAKIUAAAZAAAAQ2xpZW50LXNvYXB1aS1wcm9qZWN0LnhtbNVY
bW/bNhD+3l+h6btNO0WHQLAdpGmKDliTok3XAkUxMNLZ4SaTKknFMYr9992JFCUmTmx32YZ8MGCS
c2RsUEsBAhQDCgAAAAgATI4iRBvrzEtPAQAAUgQAAAoAAAAAAAAAAAAAAKSBWBMAAGRlcGxveS54
bWxQSwUGAAAAAAYABgB3AQAAzxQAAAAA</xsd:dataHandler>
<?xml version="1.0" encoding="UTF-8"?>
<htd:humanInteractions
xmlns:htd="http://docs.oasis-open.org/ns/bpel4people/ws-humantask/200803"
xmlns:htt="http://docs.oasis-open.org/ns/bpel4people/ws-humantask/types/200803"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:tns=”http://www.example.com/simpleTask” targetNamespace="http://www.example.com/simpleTask"
xsi:schemaLocation="http://docs.oasis-open.org/ns/bpel4people/ws-humantask/200803
http://docs.oasis-open.org/bpel4people/ws-humantask.xsd
http://docs.oasis-open.org/ns/bpel4people/ws-humantask/types/200803
http://docs.oasis-open.org/bpel4people/ws-humantask-types.xsd">
<api xmlns="http://ws.apache.org/ns/synapse" name="Transform" context="/Transform">
<resource methods="POST">
<inSequence>
<property name="messageType" value="application/json" scope="axis2"></property>
<log level="custom">
<property name="Status" expression="json-eval($.StockQuotes.Stock)"></property>
</log>
<filter source="json-eval($.StockQuotes.Stock.Symbol)" regex="null">
<then>
<payloadFactory media-type="json">
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="EchoUTBasicProxy"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<log level="custom" separator="," description="Log">
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="EchoUTDynamicProxy"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<log level="full"/>
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UTOverTransport">
<wsp:ExactlyOne>
<wsp:All>
<sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
<sp:HttpsToken RequireClientCertificate="false"></sp:HttpsToken>
</wsp:Policy>
</sp:TransportToken>
package org.example.rampart;
import java.util.Map;
import org.apache.rampart.RampartConfigCallbackHandler;
import org.apache.rampart.policy.model.RampartConfig;
public class UTConfigCallbackHandler implements RampartConfigCallbackHandler{
@Override
package org.example.rampart.mediator;
import java.util.Hashtable;
import java.util.Map;
import org.apache.synapse.Mediator;
import org.apache.synapse.MessageContext;
import org.apache.synapse.core.axis2.Axis2MessageContext;
public class SetUserMediator implements Mediator {
package org.example.rampart;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
import org.apache.ws.security.WSPasswordCallback;
import java.io.IOException;
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
name="EchoUTProxy"
transports="https,http"
statistics="disable"
trace="disable"
startOnLoad="true">
<target>
<inSequence>
<send>