Reverting changes in revision 1441298
diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllHandler.java b/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllHandler.java
new file mode 100644
index 0000000..1c80f50
--- /dev/null
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllHandler.java
@@ -0,0 +1,210 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.handler;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.description.HandlerDescription;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.engine.Handler;
+import org.apache.rampart.util.Axis2Util;
+import org.apache.ws.security.handler.WSHandler;
+
+/**
+ * Class WSDoAllHandler
+ */
+public abstract class WSDoAllHandler extends WSHandler implements Handler {
+
+    /**
+     * Field EMPTY_HANDLER_METADATA
+     */
+    private static HandlerDescription EMPTY_HANDLER_METADATA =
+            new HandlerDescription("default Handler");
+
+    private final static String WSS_PASSWORD = "password";
+
+    private final static String WSS_USERNAME = "username";
+
+    /**
+     * Field handlerDesc
+     */
+    protected HandlerDescription handlerDesc;
+
+    /**
+     * In Axis2, the user cannot set inflow and outflow parameters.
+     * Therefore, we need to map the Axis2 specific inflow and outflow
+     * parameters to WSS4J params,
+     * <p/>
+     * Knowledge of inhandler and out handler is used to get the mapped value.
+     */
+    protected boolean inHandler;
+
+    /**
+     * Constructor AbstractHandler.
+     */
+    public WSDoAllHandler() {
+        handlerDesc = EMPTY_HANDLER_METADATA;
+    }
+
+    public abstract void processMessage(MessageContext msgContext) throws AxisFault;
+
+    /* (non-Javadoc)
+    * @see org.apache.axis2.engine.Handler#invoke(org.apache.axis2.context.MessageContext)
+    */
+    public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {
+        //If the security module is not engaged for this service
+        //do not do any processing
+        if (msgContext.isEngaged(WSSHandlerConstants.SECURITY_MODULE_NAME)) {
+            this.processMessage(msgContext);
+        }
+        return InvocationResponse.CONTINUE;        
+    }
+
+    public void flowComplete(MessageContext msgContext)
+    {
+    }
+    
+    /**
+     * Method getName.
+     *
+     * @return Returns name.
+     */
+    public String getName() {
+        return handlerDesc.getName();
+    }
+
+    /**
+     * Method cleanup.
+     */
+    public void cleanup() {
+    }
+
+    /**
+     * Method getParameter.
+     *
+     * @param name
+     * @return Returns parameter.
+     */
+    public Parameter getParameter(String name) {
+        return handlerDesc.getParameter(name);
+    }
+
+    /**
+     * Method init.
+     *
+     * @param handlerdesc
+     */
+    public void init(HandlerDescription handlerdesc) {
+        this.handlerDesc = handlerdesc;
+    }
+
+    /**
+     * Gets the handler description.
+     *
+     * @return Returns handler description.
+     */
+    public HandlerDescription getHandlerDesc() {
+        return handlerDesc;
+    }
+
+    /* (non-Javadoc)
+     * @see java.lang.Object#toString()
+     */
+    public String toString() {
+        String name = this.getName();
+        return (name != null) ? name : "";
+    }
+
+
+    public Object getProperty(Object msgContext, String axisKey) {
+
+        int repetition = getCurrentRepetition(msgContext);
+
+        String key = Axis2Util.getKey(axisKey, inHandler, repetition);
+        Object property = ((MessageContext) msgContext).getProperty(key);
+        if (property == null) {
+            //Try the description hierarchy
+            Parameter parameter = ((MessageContext) msgContext).getParameter(key);
+            if (parameter != null) {
+                property = parameter.getValue();
+            }
+        }
+        return property;
+    }
+
+    /**
+     * Returns the repetition number from the message context
+     *
+     * @param msgContext
+     * @return Returns int.
+     */
+    protected int getCurrentRepetition(Object msgContext) {
+        //get the repetition from the message context
+        int repetition = 0;
+        if (!inHandler) {//We only need to repeat the out handler
+            Integer count = (Integer) ((MessageContext) msgContext).getProperty(WSSHandlerConstants.CURRENT_REPETITON);
+            if (count != null) { //When we are repeating the handler
+                repetition = count.intValue();
+            }
+        }
+        return repetition;
+    }
+
+    public String getPassword(Object msgContext) {
+        return (String) ((MessageContext) msgContext).getProperty(WSS_PASSWORD);
+    }
+
+    public void setPassword(Object msgContext, String password) {
+        ((MessageContext) msgContext).setProperty(WSS_PASSWORD, password);
+    }
+
+    public String getUsername(Object msgContext) {
+        return (String) ((MessageContext) msgContext).getProperty(WSS_USERNAME);
+    }
+
+    public void setUsername(Object msgContext, String username) {
+        ((MessageContext) msgContext).setProperty(WSS_USERNAME, username);
+    }
+
+    /**
+     * Gets option. Extracts the configuration values from the service.xml
+     * and/or axis2.xml. Values set in the service.xml takes priority over
+     * values of the axis2.xml
+     */
+    public Object getOption(String axisKey) {
+        Parameter parameter = this.handlerDesc.getParameter(axisKey);
+        return (parameter == null) ? null : parameter.getValue();
+    }
+
+    public void setProperty(Object msgContext, String key, Object value) {
+        ((MessageContext) msgContext).setProperty(key, value);
+    }
+
+    /**
+     * Overrides the class loader used to load the PW callback class.
+     *
+     * @param msgCtx MessageContext
+     * @return Returns class loader.
+     */
+    public java.lang.ClassLoader getClassLoader(Object msgCtx) {
+        try {
+            return ((MessageContext) msgCtx).getAxisService().getClassLoader();
+        } catch (Throwable t) {
+            return super.getClassLoader(msgCtx);
+        }
+    }
+}
diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllReceiver.java b/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllReceiver.java
new file mode 100644
index 0000000..86280a4
--- /dev/null
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllReceiver.java
@@ -0,0 +1,388 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.handler;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMException;
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axiom.soap.SOAPHeader;
+import org.apache.axiom.soap.SOAPHeaderBlock;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.context.OperationContext;
+import org.apache.axis2.wsdl.WSDLConstants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.rampart.RampartConstants;
+import org.apache.rampart.util.Axis2Util;
+import org.apache.rampart.util.HandlerParameterDecoder;
+import org.apache.rampart.util.RampartUtil;
+import org.apache.ws.security.*;
+import org.apache.ws.security.handler.RequestData;
+import org.apache.ws.security.handler.WSHandlerConstants;
+import org.apache.ws.security.handler.WSHandlerResult;
+import org.apache.ws.security.message.token.Timestamp;
+import org.apache.ws.security.util.WSSecurityUtil;
+import org.w3c.dom.Document;
+
+import javax.security.auth.callback.CallbackHandler;
+import javax.xml.namespace.QName;
+
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * @deprecated
+ */
+public class WSDoAllReceiver extends WSDoAllHandler {
+
+    private static final Log log = LogFactory.getLog(WSDoAllReceiver.class);
+    private static Log mlog = LogFactory.getLog(RampartConstants.MESSAGE_LOG);
+
+    public WSDoAllReceiver() {
+        super();
+        inHandler = true;
+    }
+
+    public void processMessage(MessageContext msgContext) throws AxisFault {
+    	
+    	if(mlog.isDebugEnabled()){
+        	mlog.debug("*********************** WSDoAllReceiver recieved \n"+msgContext.getEnvelope());
+        }
+    	
+        boolean doDebug = log.isDebugEnabled();
+
+        if (doDebug) {
+            log.debug("WSDoAllReceiver: enter invoke() ");
+        }
+
+        String useDoomValue = (String) getProperty(msgContext,
+                WSSHandlerConstants.USE_DOOM);
+        boolean useDoom = useDoomValue != null
+                && Constants.VALUE_TRUE.equalsIgnoreCase(useDoomValue);
+
+        RequestData reqData = new RequestData();
+        try {
+
+            this.processBasic(msgContext, useDoom, reqData);
+        } catch (AxisFault axisFault) {
+            setAddressingInformationOnFault(msgContext);
+            throw axisFault;
+        } catch (Exception e) {
+            setAddressingInformationOnFault(msgContext);
+            throw new AxisFault(e.getMessage(), e);
+        } finally {
+
+            if (reqData != null) {
+                reqData.clear();
+                reqData = null;
+            }
+
+            if (doDebug) {
+                log.debug("WSDoAllReceiver: exit invoke()");
+            }
+        }
+
+    }
+
+    private void processBasic(MessageContext msgContext, boolean useDoom, RequestData reqData)
+            throws Exception {
+
+        // populate the properties
+        try {
+            HandlerParameterDecoder.processParameters(msgContext, true);
+        } catch (Exception e) {
+            throw new AxisFault("Configuration error", e);
+        }
+
+        // Retrieves signature crypto and set it to decryption crypto
+        RampartUtil.setDecryptionCrypto(msgContext);
+
+        reqData.setMsgContext(msgContext);
+
+        if (((getOption(WSSHandlerConstants.INFLOW_SECURITY)) == null) &&
+            ((getProperty(msgContext, WSSHandlerConstants.INFLOW_SECURITY)) == null)) {
+            
+            if (msgContext.isServerSide() && 
+                ((getOption(WSSHandlerConstants.INFLOW_SECURITY_SERVER)) == null) &&
+                ((getProperty(msgContext, WSSHandlerConstants.INFLOW_SECURITY_SERVER)) == null)) {
+            
+                return;
+            } else if (((getOption(WSSHandlerConstants.INFLOW_SECURITY_CLIENT)) == null) &&
+                    ((getProperty(msgContext, WSSHandlerConstants.INFLOW_SECURITY_CLIENT)) == null))  {
+                
+                return;
+            }
+        }
+        
+        List<java.lang.Integer> actions = new ArrayList<Integer>();
+        String action = null;
+        if ((action = (String) getOption(WSSHandlerConstants.ACTION_ITEMS)) == null) {
+            action = (String) getProperty(msgContext,
+                    WSSHandlerConstants.ACTION_ITEMS);
+        }
+        if (action == null) {
+            throw new AxisFault("WSDoAllReceiver: No action items defined");
+        }
+        int doAction = WSSecurityUtil.decodeAction(action, actions);
+
+        if (doAction == WSConstants.NO_SECURITY) {
+            return;
+        }
+
+        String actor = (String) getOption(WSHandlerConstants.ACTOR);
+
+        Document doc = null;
+
+        try {
+            doc = Axis2Util.getDocumentFromSOAPEnvelope(msgContext
+                    .getEnvelope(), useDoom);
+        } catch (WSSecurityException wssEx) {
+            throw new AxisFault(
+                    "WSDoAllReceiver: Error in converting to Document", wssEx);
+        }
+
+        // Do not process faults
+        SOAPConstants soapConstants = WSSecurityUtil.getSOAPConstants(doc
+                .getDocumentElement());
+        if (WSSecurityUtil.findElement(doc.getDocumentElement(), "Fault",
+                soapConstants.getEnvelopeURI()) != null) {
+            return;
+        }
+
+        /*
+         * To check a UsernameToken or to decrypt an encrypted message we need a
+         * password.
+         */
+        CallbackHandler cbHandler = null;
+        if ((doAction & (WSConstants.ENCR | WSConstants.UT)) != 0) {
+            cbHandler = getPasswordCallbackHandler(reqData);
+        }
+
+        // Copy the WSHandlerConstants.SEND_SIGV over to the new message
+        // context - if it exists, if signatureConfirmation in the response msg
+        String sigConfEnabled = null;
+        if ((sigConfEnabled = (String) getOption(WSHandlerConstants.ENABLE_SIGNATURE_CONFIRMATION)) == null) {
+            sigConfEnabled = (String) getProperty(msgContext,
+                    WSHandlerConstants.ENABLE_SIGNATURE_CONFIRMATION);
+        }
+
+        // To handle sign confirmation of a sync response
+        // TODO Async response
+        if (!msgContext.isServerSide()
+                && !"false".equalsIgnoreCase(sigConfEnabled)) {
+            OperationContext opCtx = msgContext.getOperationContext();
+            MessageContext outMsgCtx = opCtx
+                    .getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
+            if (outMsgCtx != null) {
+                msgContext.setProperty(WSHandlerConstants.SEND_SIGV, outMsgCtx
+                        .getProperty(WSHandlerConstants.SEND_SIGV));
+            } else {
+                throw new WSSecurityException(
+                        "Cannot obtain request message context");
+            }
+        }
+
+        /*
+         * Get and check the Signature specific parameters first because they
+         * may be used for encryption too.
+         */
+
+        doReceiverAction(doAction, reqData);
+
+        List<WSSecurityEngineResult> wsResult = null;
+        try {
+            wsResult = secEngine.processSecurityHeader(doc, actor, cbHandler,
+                    reqData.getSigCrypto(), reqData.getDecCrypto());
+        } catch (WSSecurityException ex) {
+            throw new AxisFault("WSDoAllReceiver: security processing failed",
+                    ex);
+        }
+        if (wsResult == null) { // no security header found
+            if (doAction == WSConstants.NO_SECURITY) {
+                return;
+            } else {
+                throw new AxisFault(
+                        "WSDoAllReceiver: Incoming message does not contain required Security header");
+            }
+        }
+
+        if (reqData.getWssConfig().isEnableSignatureConfirmation()
+                && !msgContext.isServerSide()) {
+            checkSignatureConfirmation(reqData, wsResult);
+        }
+
+        /**
+         * Set the new SOAPEnvelope
+         */
+
+        msgContext.setEnvelope(Axis2Util.getSOAPEnvelopeFromDOMDocument(doc, useDoom));
+
+        /*
+         * After setting the new current message, probably modified because of
+         * decryption, we need to locate the security header. That is, we force
+         * Axis (with getSOAPEnvelope()) to parse the string, build the new
+         * header. Then we examine, look up the security header and set the
+         * header as processed.
+         * 
+         * Please note: find all header elements that contain the same actor
+         * that was given to processSecurityHeader(). Then check if there is a
+         * security header with this actor.
+         */
+        SOAPHeader header = null;
+        try {
+            header = msgContext.getEnvelope().getHeader();
+        } catch (OMException ex) {
+            throw new AxisFault(
+                    "WSDoAllReceiver: cannot get SOAP header after security processing",
+                    ex);
+        }
+
+        Iterator headers = header.examineHeaderBlocks(actor);
+
+        SOAPHeaderBlock headerBlock = null;
+
+        while (headers.hasNext()) { // Find the wsse header
+            SOAPHeaderBlock hb = (SOAPHeaderBlock) headers.next();
+            if (hb.getLocalName().equals(WSConstants.WSSE_LN)
+                    && hb.getNamespace().getNamespaceURI().equals(WSConstants.WSSE_NS)) {
+                headerBlock = hb;
+                break;
+            }
+        }
+
+        if(headerBlock != null) {
+            headerBlock.setProcessed();
+        }
+
+        /*
+         * Now we can check the certificate used to sign the message. In the
+         * following implementation the certificate is only trusted if either it
+         * itself or the certificate of the issuer is installed in the keystore.
+         * 
+         * Note: the method verifyTrust(X509Certificate) allows custom
+         * implementations with other validation algorithms for subclasses.
+         */
+
+        // Extract the signature action result from the action list
+        WSSecurityEngineResult actionResult = WSSecurityUtil.fetchActionResult(
+                wsResult, WSConstants.SIGN);
+
+        if (actionResult != null) {
+            X509Certificate returnCert = (X509Certificate)actionResult.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
+
+            if (returnCert != null) {
+                CertificateValidator certificateValidator = new CertificateValidator();
+
+                if (!certificateValidator.validateCertificate(returnCert, reqData.getSigCrypto())) {
+                    throw new AxisFault(
+                            "WSDoAllReceiver: The certificate used for the signature is not trusted");
+                }
+            }
+        }
+
+        /*
+         * Perform further checks on the timestamp that was transmitted in the
+         * header. In the following implementation the timestamp is valid if it
+         * was created after (now-ttl), where ttl is set on server side, not by
+         * the client.
+         * 
+         * Note: the method verifyTimestamp(Timestamp) allows custom
+         * implementations with other validation algorithms for subclasses.
+         */
+
+        // Extract the timestamp action result from the action list
+        actionResult = WSSecurityUtil.fetchActionResult(wsResult,
+                WSConstants.TS);
+
+        if (actionResult != null) {
+            Timestamp timestamp = (Timestamp)actionResult.get(WSSecurityEngineResult.TAG_TIMESTAMP);
+
+            if (timestamp != null) {
+                String ttl = null;
+                if ((ttl = (String) getOption(WSHandlerConstants.TTL_TIMESTAMP)) == null) {
+                    ttl = (String) getProperty(msgContext,
+                            WSHandlerConstants.TTL_TIMESTAMP);
+                }
+                int ttl_i = 0;
+                if (ttl != null) {
+                    try {
+                        ttl_i = Integer.parseInt(ttl);
+                    } catch (NumberFormatException e) {
+                        ttl_i = reqData.getTimeToLive();
+                    }
+                }
+                if (ttl_i <= 0) {
+                    ttl_i = reqData.getTimeToLive();
+                }
+
+                // TODO configure future time to live
+                if (!timestamp.verifyCreated(ttl_i, 60)) {
+                    throw new AxisFault(
+                            "WSDoAllReceiver: The timestamp could not be validated");
+                }
+            }
+        }
+
+        /*
+         * now check the security actions: do they match, in right order?
+         */
+        if (!checkReceiverResults(wsResult, actions)) {
+            throw new AxisFault(
+                    "WSDoAllReceiver: security processing failed (actions mismatch)");
+
+        }
+        /*
+         * All ok up to this point. Now construct and setup the security result
+         * structure. The service may fetch this and check it. Also the
+         * DoAllSender will use this in certain situations such as:
+         * USE_REQ_SIG_CERT to encrypt
+         */
+        List<WSHandlerResult> results = null;
+        if ((results = (List<WSHandlerResult>) getProperty(msgContext,
+                WSHandlerConstants.RECV_RESULTS)) == null) {
+            results = new ArrayList<WSHandlerResult>();
+            msgContext.setProperty(WSHandlerConstants.RECV_RESULTS, results);
+        }
+        WSHandlerResult rResult = new WSHandlerResult(actor, wsResult);
+        results.add(0, rResult);
+    }
+
+    private void setAddressingInformationOnFault(MessageContext msgContext) {
+        SOAPEnvelope env = msgContext.getEnvelope();
+        SOAPHeader header = env.getHeader();
+
+        if (header != null) {
+            OMElement msgIdElem = header.getFirstChildWithName(new QName(
+                    AddressingConstants.Final.WSA_NAMESPACE,
+                    AddressingConstants.WSA_MESSAGE_ID));
+            if (msgIdElem == null) {
+                msgIdElem = header.getFirstChildWithName(new QName(
+                        AddressingConstants.Submission.WSA_NAMESPACE,
+                        AddressingConstants.WSA_MESSAGE_ID));
+            }
+            if (msgIdElem != null && msgIdElem.getText() != null) {
+                msgContext.getOptions().setMessageId(msgIdElem.getText());
+            }
+        }
+    }
+
+}
diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllSender.java b/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllSender.java
new file mode 100644
index 0000000..28e57d5
--- /dev/null
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/handler/WSDoAllSender.java
@@ -0,0 +1,281 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.handler;
+
+import org.apache.axiom.soap.SOAPEnvelope;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.context.OperationContext;
+import org.apache.axis2.wsdl.WSDLConstants;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.rampart.RampartConstants;
+import org.apache.rampart.util.Axis2Util;
+import org.apache.rampart.util.HandlerParameterDecoder;
+import org.apache.rampart.util.MessageOptimizer;
+import org.apache.rampart.util.RampartUtil;
+import org.apache.ws.security.WSConstants;
+import org.apache.ws.security.WSSecurityException;
+import org.apache.ws.security.handler.RequestData;
+import org.apache.ws.security.handler.WSHandlerConstants;
+import org.apache.ws.security.util.WSSecurityUtil;
+import org.w3c.dom.Document;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @deprecated
+ */
+public class WSDoAllSender extends WSDoAllHandler {
+    
+    private static final Log log = LogFactory.getLog(WSDoAllSender.class);
+    private static Log mlog = LogFactory.getLog(RampartConstants.MESSAGE_LOG);
+
+    // TODO can we get rid of this ?
+    private static final String SND_SECURITY = "SND_SECURITY";
+    
+    
+    public WSDoAllSender() {
+        super();
+        inHandler = false;
+    }
+
+
+      
+    public void processMessage(MessageContext msgContext) throws AxisFault {
+        
+              String useDoomValue = (String) getProperty(msgContext,
+                WSSHandlerConstants.USE_DOOM);
+        boolean useDoom = useDoomValue != null
+                && Constants.VALUE_TRUE.equalsIgnoreCase(useDoomValue);
+
+        RequestData reqData = new RequestData();
+
+        try {
+            //If the msgs are msgs to an STS then use basic WS-Sec
+            processBasic(msgContext, useDoom, reqData);
+            
+        } catch (Exception e) {
+            throw new AxisFault(e.getMessage(), e);
+        }
+        finally {
+            if(reqData != null) {
+                reqData.clear();
+                reqData = null;
+            }
+        }  
+        
+        if(mlog.isDebugEnabled()){
+        	mlog.debug("*********************** WSDoAllSender sent out \n"+msgContext.getEnvelope());
+        }
+    }
+    
+    /**
+     * This will carryout the WS-Security related operations.
+     * 
+     * @param msgContext
+     * @param useDoom
+     * @throws WSSecurityException
+     * @throws AxisFault
+     */
+    private void processBasic(MessageContext msgContext, boolean useDoom,
+            RequestData reqData) throws WSSecurityException, AxisFault {
+        boolean doDebug = log.isDebugEnabled();
+        
+        try {
+            HandlerParameterDecoder.processParameters(msgContext,false);
+        } catch (Exception e) {
+            throw new AxisFault("Configureation error", e);
+        }
+
+        // If encryption crypto is not already set use signatureCrypto as encryption crypto.
+        RampartUtil.setEncryptionCrypto(msgContext);
+        
+        if (doDebug) {
+            log.debug("WSDoAllSender: enter invoke()");
+        }
+        
+        /*
+         * Copy the RECV_RESULTS over to the current message context
+         * - IF available 
+         */
+        OperationContext opCtx = msgContext.getOperationContext();
+        MessageContext inMsgCtx;
+        if(opCtx != null && 
+                (inMsgCtx = opCtx.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE)) != null) {
+            msgContext.setProperty(WSHandlerConstants.RECV_RESULTS, 
+                    inMsgCtx.getProperty(WSHandlerConstants.RECV_RESULTS));
+        }
+        
+        
+        
+        reqData.setNoSerialization(false);
+        reqData.setMsgContext(msgContext);
+        
+        if (((getOption(WSSHandlerConstants.OUTFLOW_SECURITY)) == null) &&
+                ((getProperty(msgContext, WSSHandlerConstants.OUTFLOW_SECURITY)) == null)) {
+                
+                if (msgContext.isServerSide() && 
+                    ((getOption(WSSHandlerConstants.OUTFLOW_SECURITY_SERVER)) == null) &&
+                    ((getProperty(msgContext, WSSHandlerConstants.OUTFLOW_SECURITY_SERVER)) == null)) {
+                
+                    return;
+                } else if (((getOption(WSSHandlerConstants.OUTFLOW_SECURITY_CLIENT)) == null) &&
+                        ((getProperty(msgContext, WSSHandlerConstants.OUTFLOW_SECURITY_CLIENT)) == null))  {
+                    
+                    return;
+                }
+            }
+        
+        List<Integer> actions = new ArrayList<Integer>();
+        String action = null;
+        if ((action = (String) getOption(WSSHandlerConstants.ACTION_ITEMS)) == null) {
+            action = (String) getProperty(msgContext, WSSHandlerConstants.ACTION_ITEMS);
+        }
+        if (action == null) {
+            throw new AxisFault("WSDoAllReceiver: No action items defined");
+        }
+        
+        int doAction = WSSecurityUtil.decodeAction(action, actions);
+        if (doAction == WSConstants.NO_SECURITY) {
+            return;
+        }
+        
+        /*
+         * For every action we need a username, so get this now. The
+         * username defined in the deployment descriptor takes precedence.
+         */
+        reqData.setUsername((String) getOption(WSHandlerConstants.USER));
+        if (reqData.getUsername() == null || reqData.getUsername().length() == 0) {
+            String username = (String) getProperty(reqData.getMsgContext(), WSHandlerConstants.USER);
+            if (username != null) {
+                reqData.setUsername(username);
+            }
+        }
+        
+        /*
+         * Now we perform some set-up for UsernameToken and Signature
+         * functions. No need to do it for encryption only. Check if
+         * username is available and then get a passowrd.
+         */
+        if ((doAction & (WSConstants.SIGN | WSConstants.UT | WSConstants.UT_SIGN)) != 0) {
+            /*
+             * We need a username - if none throw an AxisFault. For
+             * encryption there is a specific parameter to get a username.
+             */
+            if (reqData.getUsername() == null
+                    || reqData.getUsername().length() == 0) {
+                throw new AxisFault(
+                "WSDoAllSender: Empty username for specified action");
+            }
+        }
+        
+        /*
+         * Now get the SOAPEvelope from the message context and convert it
+         * into a Document
+         * 
+         * Now we can perform our security operations on this request.
+         */
+        
+        
+        Document doc = null;
+        /*
+         * If the message context property conatins a document then this is
+         * a chained handler.
+         */
+        if ((doc = (Document) ((MessageContext)reqData.getMsgContext())
+                .getProperty(SND_SECURITY)) == null) {
+            try {
+                doc = Axis2Util.getDocumentFromSOAPEnvelope(msgContext.getEnvelope(), useDoom);
+            } catch (WSSecurityException wssEx) {
+                throw new AxisFault("WSDoAllReceiver: Error in converting to Document", wssEx);
+            }
+        }
+
+
+        doSenderAction(doAction, doc, reqData, actions, !msgContext.isServerSide());
+        
+        /*
+         * If noSerialization is false, this handler shall be the last (or
+         * only) one in a handler chain. If noSerialization is true, just
+         * set the processed Document in the transfer property. The next
+         * Axis WSS4J handler takes it and performs additional security
+         * processing steps.
+         *
+         */
+        if (reqData.isNoSerialization()) {
+            ((MessageContext)reqData.getMsgContext()).setProperty(SND_SECURITY,
+                    doc);
+        } else {
+            if(useDoom) {
+                msgContext.setEnvelope((SOAPEnvelope)doc.getDocumentElement());
+            } else {
+                msgContext.setEnvelope(Axis2Util.getSOAPEnvelopeFromDOMDocument(doc, useDoom));
+            }
+            ((MessageContext)reqData.getMsgContext()).setProperty(SND_SECURITY, null);
+        }
+        
+
+        /**
+         * If the optimizeParts parts are set then optimize them
+         */
+        String optimizeParts;
+        
+        if((optimizeParts = (String) getOption(WSSHandlerConstants.OPTIMIZE_PARTS)) == null) {
+            optimizeParts = (String)
+            getProperty(reqData.getMsgContext(), WSSHandlerConstants.OPTIMIZE_PARTS);
+        }
+        if(optimizeParts != null) {
+            // Optimize the Envelope
+            MessageOptimizer.optimize(msgContext.getEnvelope(),optimizeParts);
+        }
+        
+        //Enable handler repetition
+        Integer repeat;
+        int repeatCount;
+        if ((repeat = (Integer)getOption(WSSHandlerConstants.SENDER_REPEAT_COUNT)) == null) {
+            repeat = (Integer)
+            getProperty(reqData.getMsgContext(), WSSHandlerConstants.SENDER_REPEAT_COUNT);
+        }
+        
+        repeatCount = repeat.intValue();
+        
+        //Get the current repetition from message context
+        int repetition = this.getCurrentRepetition(msgContext);
+        
+        if(repeatCount > 0 && repetition < repeatCount) {
+            
+            reqData.clear();
+            reqData = null;
+            
+            // Increment the repetition to indicate the next repetition
+            // of the same handler
+            repetition++;
+            msgContext.setProperty(WSSHandlerConstants.CURRENT_REPETITON,
+                    Integer.valueOf(repetition));
+            
+            this.invoke(msgContext);
+        }
+        
+        if (doDebug) {
+            log.debug("WSDoAllSender: exit invoke()");
+        }
+    }
+    
+}
diff --git a/modules/rampart-integration/pom.xml b/modules/rampart-integration/pom.xml
index 09c0829..8d8ea23 100644
--- a/modules/rampart-integration/pom.xml
+++ b/modules/rampart-integration/pom.xml
@@ -363,8 +363,8 @@
                                 <copy file="target/artifacts/addressing-${axis2.version}.mar" tofile="target/test-resources/default_security_client_repo/modules/addressing-${axis2.version}.mar" />
                                 <copy file="src/test/resources/conf/axis2.xml" tofile="target/test-resources/default_security_client_repo/conf/axis2.xml" />
                                 <!--
-                                RahasSAMLTokenAttributeTest
-                                -->
+                        RahasSAMLTokenAttributeTest
+                        -->
                                 <mkdir dir="target/test-resources/rahas_service_repo_5" />
                                 <mkdir dir="target/test-resources/rahas_service_repo_5/conf" />
                                 <mkdir dir="target/test-resources/rahas_service_repo_5/services" />
@@ -375,8 +375,182 @@
                                 <!-- copy the services.xml and create the aar -->
                                 <copy overwrite="yes" file="src/test/resources/rahas/s5-services.xml" tofile="target/temp-rahas/META-INF/services.xml" />
                                 <jar jarfile="target/test-resources/rahas_service_repo_5/services/SecureService.aar" basedir="target/temp-rahas" />
-                                <!--RahasAttributeTest END-->
 
+                                <!--RahasAttributeTest END-->
+                                <!-- Scenario 1 -->
+                                <mkdir dir="target/test-resources/scenario1_client_repo" />
+                                <mkdir dir="target/test-resources/scenario1_client_repo/conf" />
+                                <mkdir dir="target/test-resources/scenario1_client_repo/modules" />
+                                <mkdir dir="target/test-resources/scenario1_client_repo/services" />
+                                <mkdir dir="target/test-resources/scenario1_service_repo" />
+                                <mkdir dir="target/test-resources/scenario1_service_repo/conf" />
+                                <mkdir dir="target/test-resources/scenario1_service_repo/services" />
+                                <mkdir dir="target/test-resources/scenario1_service_repo/modules" />
+                                <!-- setup scenario 1 client repository-->
+                                <copy file="src/test/resources/security/s1.client.axis2.xml" tofile="target/test-resources/scenario1_client_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenario1_client_repo/modules/rampart-${project.version}.mar" />
+                                <!-- setup scenario 1 service repository-->
+                                <copy file="src/test/resources/security/s1.service.axis2.xml" tofile="target/test-resources/scenario1_service_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenario1_service_repo/modules/rampart-${project.version}.mar" />
+
+                                <mkdir dir="target/temp-interop/META-INF" />
+
+                                <!-- Create the .aar file -->
+                                <copy file="src/test/resources/security/s1.service.xml" tofile="target/temp-interop/META-INF/services.xml" overwrite="true" />
+                                <jar jarfile="target/test-resources/scenario1_service_repo/services/PingPort.aar" basedir="target/temp-interop" />
+                                <!-- Scenario 2 - Setup the client and service repos -->
+                                <mkdir dir="target/test-resources/scenario2_client_repo" />
+                                <mkdir dir="target/test-resources/scenario2_client_repo/conf" />
+                                <mkdir dir="target/test-resources/scenario2_client_repo/modules" />
+                                <mkdir dir="target/test-resources/scenario2_service_repo" />
+                                <mkdir dir="target/test-resources/scenario2_service_repo/ conf" />
+                                <mkdir dir="target/test-resources/scenario2_service_repo/services" />
+                                <mkdir dir="target/test-resources/scenario2_service_repo/modules" />
+                                <copy file="src/test/resources/security/s2.client.axis2.xml" tofile="target/test-resources/scenario2_client_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenario2_client_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/s2.service.axis2.xml" tofile="target/test-resources/scenario2_service_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenario2_service_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/s2.service.xml" tofile="target/temp-interop/META-INF/services.xml" overwrite="true" />
+                                <jar jarfile="target/test-resources/scenario2_service_repo/services/PingPort.aar" basedir="target/temp-interop" />
+
+                                <!-- Scenario 2a - set up repos -->
+                                <mkdir dir="target/test-resources/scenario2a_client_repo" />
+                                <mkdir dir="target/test-resources/scenario2a_client_repo/conf" />
+                                <mkdir dir="target/test-resources/scenario2a_client_repo/modules" />
+                                <mkdir dir="target/test-resources/scenario2a_service_repo" />
+                                <mkdir dir="target/test-resources/scenario2a_service_repo/conf" />
+                                <mkdir dir="target/test-resources/scenario2a_service_repo/services" />
+                                <mkdir dir="target/test-resources/scenario2a_service_repo/modules" />
+                                <copy file="src/test/resources/security/s2a.client.axis2.xml" tofile="target/test-resources/scenario2a_client_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenario2a_client_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/s2a.service.axis2.xml" tofile="target/test-resources/scenario2a_service_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenario2a_service_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/s2a.service.xml" tofile="target/temp-interop/META-INF/services.xml" overwrite="true" />
+                                <jar jarfile="target/test-resources/scenario2a_service_repo/services/PingPort.aar" basedir="target/temp-interop" />
+                                <!-- Scenario 3 -->
+                                <mkdir dir="target/test-resources/scenario3_client_repo" />
+                                <mkdir dir="target/test-resources/scenario3_client_repo/conf" />
+                                <mkdir dir="target/test-resources/scenario3_client_repo/modules" />
+                                <mkdir dir="target/test-resources/scenario3_service_repo" />
+                                <mkdir dir="target/test-resources/scenario3_service_repo/conf" />
+                                <mkdir dir="target/test-resources/scenario3_service_repo/services" />
+                                <mkdir dir="target/test-resources/scenario3_service_repo/modules" />
+                                <copy file="src/test/resources/security/s3.client.axis2.xml" tofile="target/test-resources/scenario3_client_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenario3_client_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/s3.service.axis2.xml" tofile="target/test-resources/scenario3_service_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenario3_service_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/s3.service.xml" tofile="target/temp-interop/META-INF/services.xml" overwrite="true" />
+                                <jar jarfile="target/test-resources/scenario3_service_repo/services/PingPort.aar" basedir="target/temp-interop" />
+
+                                <!-- Scenario 4 -->
+                                <mkdir dir="target/test-resources/scenario4_client_repo" />
+                                <mkdir dir="target/test-resources/scenario4_client_repo/conf" />
+                                <mkdir dir="target/test-resources/scenario4_client_repo/modules" />
+                                <mkdir dir="target/test-resources/scenario4_service_repo" />
+                                <mkdir dir="target/test-resources/scenario4_service_repo/conf" />
+                                <mkdir dir="target/test-resources/scenario4_service_repo/services" />
+                                <mkdir dir="target/test-resources/scenario4_service_repo/modules" />
+                                <copy file="src/test/resources/security/s4.client.axis2.xml" tofile="target/test-resources/scenario4_client_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenario4_client_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/s4.service.axis2.xml" tofile="target/test-resources/scenario4_service_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenario4_service_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/s4.service.xml" tofile="target/temp-interop/META-INF/services.xml" overwrite="true" />
+                                <jar jarfile="target/test-resources/scenario4_service_repo/services/PingPort.aar" basedir="target/temp-interop" />
+
+                                <!-- Scenario 5 -->
+                                <mkdir dir="target/test-resources/scenario5_client_repo" />
+                                <mkdir dir="target/test-resources/scenario5_client_repo/conf" />
+                                <mkdir dir="target/test-resources/scenario5_client_repo/modules" />
+                                <mkdir dir="target/test-resources/scenario5_service_repo" />
+                                <mkdir dir="target/test-resources/scenario5_service_repo/conf" />
+                                <mkdir dir="target/test-resources/scenario5_service_repo/services" />
+                                <mkdir dir="target/test-resources/scenario5_service_repo/modules" />
+                                <copy file="src/test/resources/security/s5.client.axis2.xml" tofile="target/test-resources/scenario5_client_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenario5_client_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/s5.service.axis2.xml" tofile="target/test-resources/scenario5_service_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenario5_service_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/s5.service.xml" tofile="target/temp-interop/META-INF/services.xml" overwrite="true" />
+                                <jar jarfile="target/test-resources/scenario5_service_repo/services/PingPort.aar" basedir="target/temp-interop" />
+
+                                <!-- Scenario 6 -->
+                                <mkdir dir="target/test-resources/scenario6_client_repo" />
+                                <mkdir dir="target/test-resources/scenario6_client_repo/conf" />
+                                <mkdir dir="target/test-resources/scenario6_client_repo/modules" />
+                                <mkdir dir="target/test-resources/scenario6_service_repo" />
+                                <mkdir dir="target/test-resources/scenario6_service_repo/conf" />
+                                <mkdir dir="target/test-resources/scenario6_service_repo/services" />
+                                <mkdir dir="target/test-resources/scenario6_service_repo/modules" />
+                                <copy file="src/test/resources/security/s6.client.axis2.xml" tofile="target/test-resources/scenario6_client_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenario6_client_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/s6.service.axis2.xml" tofile="target/test-resources/scenario6_service_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenario6_service_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/s6.service.xml" tofile="target/temp-interop/META-INF/services.xml" overwrite="true" />
+                                <jar jarfile="target/test-resources/scenario6_service_repo/services/PingPort.aar" basedir="target/temp-interop" />
+
+                                <!-- Scenario 7 -->
+                                <mkdir dir="target/test-resources/scenario7_client_repo" />
+                                <mkdir dir="target/test-resources/scenario7_client_repo/conf" />
+                                <mkdir dir="target/test-resources/scenario7_client_repo/modules" />
+                                <mkdir dir="target/test-resources/scenario7_service_repo" />
+                                <mkdir dir="target/test-resources/scenario7_service_repo/conf" />
+                                <mkdir dir="target/test-resources/scenario7_service_repo/services" />
+                                <mkdir dir="target/test-resources/scenario7_service_repo/modules" />
+                                <copy file="src/test/resources/security/s7.client.axis2.xml" tofile="target/test-resources/scenario7_client_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenario7_client_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/s7.service.axis2.xml" tofile="target/test-resources/scenario7_service_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenario7_service_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/s7.service.xml" tofile="target/temp-interop/META-INF/services.xml" overwrite="true" />
+                                <jar jarfile="target/test-resources/scenario7_service_repo/services/PingPort.aar" basedir="target/temp-interop" />
+
+                                <!-- Scenario ST1 -->
+                                <mkdir dir="target/test-resources/scenarioST1_client_repo" />
+                                <mkdir dir="target/test-resources/scenarioST1_client_repo/conf" />
+                                <mkdir dir="target/test-resources/scenarioST1_client_repo/modules" />
+                                <mkdir dir="target/test-resources/scenarioST1_service_repo" />
+                                <mkdir dir="target/test-resources/scenarioST1_service_repo/conf" />
+                                <mkdir dir="target/test-resources/scenarioST1_service_repo/services" />
+                                <mkdir dir="target/test-resources/scenarioST1_service_repo/modules" />
+                                <copy file="src/test/resources/security/sST1.client.axis2.xml" tofile="target/test-resources/scenarioST1_client_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenarioST1_client_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/sST1.service.axis2.xml" tofile="target/test-resources/scenarioST1_service_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/scenarioST1_service_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/sST1.service.xml" tofile="target/temp-interop/META-INF/services.xml" overwrite="true" />
+                                <jar jarfile="target/test-resources/scenarioST1_service_repo/services/PingPort.aar" basedir="target/temp-interop" />
+
+                                <!-- MTOM Optimized Security Test -->
+                                <mkdir dir="target/test-resources/mtom_sec_client_repo" />
+                                <mkdir dir="target/test-resources/mtom_sec_client_repo/conf" />
+                                <mkdir dir="target/test-resources/mtom_sec_client_repo/modules" />
+                                <mkdir dir="target/test-resources/mtom_sec_service_repo" />
+                                <mkdir dir="target/test-resources/mtom_sec_service_repo/conf" />
+                                <mkdir dir="target/test-resources/mtom_sec_service_repo/services" />
+                                <mkdir dir="target/test-resources/mtom_sec_service_repo/modules" />
+                                <copy file="src/test/resources/security/secMtom.client.axis2.xml" tofile="target/test-resources/mtom_sec_client_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/mtom_sec_client_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/secMtom.service.axis2.xml" tofile="target/test-resources/mtom_sec_service_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/mtom_sec_service_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="src/test/resources/security/secMtom.service.xml" tofile="target/temp-interop/META-INF/services.xml" overwrite="true" />
+                                <jar jarfile="target/test-resources/mtom_sec_service_repo/services/PingPort.aar" basedir="target/temp-interop" />
+
+                                <!-- Test with addressing and MTOM  -->
+                                <mkdir dir="target/test-resources/complete_client_repo" />
+                                <mkdir dir="target/test-resources/complete_client_repo/conf" />
+                                <mkdir dir="target/test-resources/complete_client_repo/modules" />
+                                <mkdir dir="target/test-resources/complete_service_repo" />
+                                <mkdir dir="target/test-resources/complete_service_repo/conf" />
+                                <mkdir dir="target/test-resources/complete_service_repo/services" />
+                                <mkdir dir="target/test-resources/complete_service_repo/modules" />
+                                <!-- Test with addressing and MTOM client repository-->
+                                <copy file="src/test/resources/security/complete.client.axis2.xml" tofile="target/test-resources/complete_client_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/complete_client_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="target/artifacts/addressing-${axis2.version}.mar" tofile="target/test-resources/complete_client_repo/modules/addressing-${axis2.version}.mar" />
+                                <!-- Test with addressing and MTOMservice repository-->
+                                <copy file="src/test/resources/security/complete.service.axis2.xml" tofile="target/test-resources/complete_service_repo/conf/axis2.xml" />
+                                <copy file="target/artifacts/rampart-${project.version}.mar" tofile="target/test-resources/complete_service_repo/modules/rampart-${project.version}.mar" />
+                                <copy file="target/artifacts/addressing-${axis2.version}.mar" tofile="target/test-resources/complete_service_repo/modules/addressing-${axis2.version}.mar" />
+                                <copy file="src/test/resources/security/complete.service.xml" tofile="target/temp-interop/META-INF/services.xml" overwrite="true" />
+                                <!-- Create the .aar file -->
+                                <jar jarfile="target/test-resources/complete_service_repo/services/PingPort.aar" basedir="target/temp-interop" />
                             </tasks>
                         </configuration>
                         <goals>
@@ -408,9 +582,6 @@
                 <configuration>
                     <!-- Add the Xerces/Xalan versions expected by OpenSAML to the boot classpath so that the build succeeds on older 1.5 JDKs -->
                     <argLine>${argLine} -Xbootclasspath/p:${project.build.directory}/endorsed/xml-apis.jar${path.separator}${project.build.directory}/endorsed/xercesImpl.jar${path.separator}${project.build.directory}/endorsed/resolver.jar${path.separator}${project.build.directory}/endorsed/serializer.jar${path.separator}${project.build.directory}/endorsed/xalan.jar</argLine>
-                    <excludes>
-                        <exclude>org/apache/rahas/*.java</exclude>
-                    </excludes>
                 </configuration>
             </plugin>
         </plugins>
diff --git a/modules/rampart-integration/src/test/java/org/apache/axis2/security/AddressingMTOMSecurityTest.java b/modules/rampart-integration/src/test/java/org/apache/axis2/security/AddressingMTOMSecurityTest.java
new file mode 100644
index 0000000..a5690e6
--- /dev/null
+++ b/modules/rampart-integration/src/test/java/org/apache/axis2/security/AddressingMTOMSecurityTest.java
@@ -0,0 +1,125 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.security;
+
+import org.apache.axis2.Constants;
+import org.apache.rampart.handler.WSSHandlerConstants;
+import org.apache.rampart.handler.config.InflowConfiguration;
+import org.apache.rampart.handler.config.OutflowConfiguration;
+
+import java.util.Hashtable;
+import java.util.Properties;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+public class AddressingMTOMSecurityTest extends InteropTestBase {
+
+    protected OutflowConfiguration getOutflowConfiguration() {
+
+        OutflowConfiguration ofc = new OutflowConfiguration();
+
+        ofc.setActionItems("Timestamp Signature Encrypt");
+        ofc.setUser("alice");
+        ofc.setEncryptionUser("bob");
+        ofc.setSignaturePropFile("interop.properties");
+        ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        ofc.setSignatureKeyIdentifier(WSSHandlerConstants.SKI_KEY_IDENTIFIER);
+        ofc.setEncryptionKeyIdentifier(WSSHandlerConstants.SKI_KEY_IDENTIFIER);
+        ofc.setSignatureParts("{Element}{" + ADDR_NS + "}To;" +
+                                "{Element}{" + ADDR_NS + "}MessageID;" +
+                                "{Element}{" + WSU_NS + "}Timestamp");
+        ofc.setOptimizeParts(
+                "//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue");
+
+        return ofc;
+    }
+
+    protected InflowConfiguration getInflowConfiguration() {
+        InflowConfiguration ifc = new InflowConfiguration();
+
+        ifc.setActionItems("Timestamp Signature Encrypt");
+        ifc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        ifc.setSignaturePropFile("interop.properties");
+
+        return ifc;
+    }
+
+    protected String getClientRepo() {
+        return COMPLETE_CLIENT_REPOSITORY;
+    }
+
+    protected String getServiceRepo() {
+        return COMPLETE_SERVICE_REPOSITORY;
+    }
+
+    protected boolean isUseSOAP12InStaticConfigTest() {
+        return true;
+    }
+
+    protected OutflowConfiguration getOutflowConfigurationWithRefs() {
+
+        OutflowConfiguration ofc = new OutflowConfiguration();
+
+        ofc.setActionItems("Timestamp Signature Encrypt");
+        ofc.setUser("alice");
+        ofc.setEncryptionUser("bob");
+        ofc.setSignaturePropRefId("key1");
+        ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        ofc.setSignatureKeyIdentifier(WSSHandlerConstants.SKI_KEY_IDENTIFIER);
+        ofc.setEncryptionKeyIdentifier(WSSHandlerConstants.SKI_KEY_IDENTIFIER);
+        ofc.setSignatureParts("{Element}{" + ADDR_NS + "}To;" +
+                                "{Element}{" + ADDR_NS + "}MessageID;" +
+                                "{Element}{" + WSU_NS + "}Timestamp");
+        ofc.setOptimizeParts(
+                "//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue");
+
+        return ofc;
+    }
+
+    protected InflowConfiguration getInflowConfigurationWithRefs() {
+        InflowConfiguration ifc = new InflowConfiguration();
+
+        ifc.setActionItems("Timestamp Signature Encrypt");
+        ifc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        ifc.setSignaturePropRefId("key2");
+
+        return ifc;
+    }
+
+    protected Hashtable getPropertyRefs() {
+        Properties prop1 =  new Properties();
+        prop1.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+
+        Properties prop2 =  new Properties();
+        prop2.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+        
+        Hashtable table = new Hashtable();
+        table.put("key1", prop1);
+        table.put("key2", prop2);
+        
+        return table;
+    }
+
+}
diff --git a/modules/rampart-integration/src/test/java/org/apache/axis2/security/InteropTestBase.java b/modules/rampart-integration/src/test/java/org/apache/axis2/security/InteropTestBase.java
new file mode 100644
index 0000000..407a71e
--- /dev/null
+++ b/modules/rampart-integration/src/test/java/org/apache/axis2/security/InteropTestBase.java
@@ -0,0 +1,239 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.security;
+
+import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.AddressingConstants;
+import org.apache.axis2.integration.UtilServer;
+import org.apache.rampart.handler.config.InflowConfiguration;
+import org.apache.rampart.handler.config.OutflowConfiguration;
+import org.apache.ws.security.WSConstants;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.util.Hashtable;
+
+import junit.framework.TestCase;
+
+public abstract class InteropTestBase extends TestCase {
+
+    protected static final String SCENARIO1_SERVICE_REPOSITORY =
+            "scenario1_service_repo";
+
+    protected static final String SCENARIO1_CLIENT_REPOSITORY =
+            "scenario1_client_repo";
+
+    protected static final String SCENARIO2_SERVICE_REPOSITORY =
+            "scenario2_service_repo";
+
+    protected static final String SCENARIO2_CLIENT_REPOSITORY =
+            "scenario2_client_repo";
+
+    protected static final String SCENARIO2a_SERVICE_REPOSITORY =
+            "scenario2a_service_repo";
+
+    protected static final String SCENARIO2a_CLIENT_REPOSITORY =
+            "scenario2a_client_repo";
+
+    protected static final String SCENARIO3_SERVICE_REPOSITORY =
+            "scenario3_service_repo";
+
+    protected static final String SCENARIO3_CLIENT_REPOSITORY =
+            "scenario3_client_repo";
+
+    protected static final String SCENARIO4_SERVICE_REPOSITORY =
+            "scenario4_service_repo";
+
+    protected static final String SCENARIO4_CLIENT_REPOSITORY =
+            "scenario4_client_repo";
+
+    protected static final String SCENARIO5_SERVICE_REPOSITORY =
+            "scenario5_service_repo";
+
+    protected static final String SCENARIO5_CLIENT_REPOSITORY =
+            "scenario5_client_repo";
+
+    protected static final String SCENARIO6_SERVICE_REPOSITORY =
+            "scenario6_service_repo";
+
+    protected static final String SCENARIO6_CLIENT_REPOSITORY =
+            "scenario6_client_repo";
+
+    protected static final String SCENARIO7_SERVICE_REPOSITORY =
+            "scenario7_service_repo";
+
+    protected static final String SCENARIO7_CLIENT_REPOSITORY =
+            "scenario7_client_repo";
+
+    protected static final String SCENARIO_ST1_SERVICE_REPOSITORY =
+            "scenarioST1_service_repo";
+
+    protected static final String SCENARIO_ST1_CLIENT_REPOSITORY =
+            "scenarioST1_client_repo";
+
+    protected static final String SCENARIO_ST3_SERVICE_REPOSITORY =
+            "scenarioST3_service_repo";
+
+    protected static final String SCENARIO_ST3_CLIENT_REPOSITORY =
+            "scenarioST3_client_repo";
+
+    protected static final String SCENARIO_ST4_SERVICE_REPOSITORY =
+            "scenarioST4_service_repo";
+
+    protected static final String SCENARIO_ST4_CLIENT_REPOSITORY =
+            "scenarioST4_client_repo";
+
+    protected static final String MTOM_SEC_SERVICE_REPOSITORY =
+            "mtom_sec_service_repo";
+
+    protected static final String MTOM_SEC_CLIENT_REPOSITORY =
+            "mtom_sec_client_repo";
+
+    protected static final String COMPLETE_SERVICE_REPOSITORY =
+            "complete_service_repo";
+
+    protected static final String COMPLETE_CLIENT_REPOSITORY =
+            "complete_client_repo";
+
+    protected static final String DEFAULT_CLIENT_REPOSITORY =
+            "default_security_client_repo";
+
+    protected static final String WSSE_NS = WSConstants.WSSE_NS;
+
+    protected static final String WSU_NS = WSConstants.WSU_NS;
+
+    protected static final String ADDR_NS =
+            AddressingConstants.Final.WSA_NAMESPACE;
+
+    private String targetEpr = "http://127.0.0.1:" +
+//            5556 +
+            UtilServer.TESTING_PORT +
+            "/axis2/services/PingPort";
+
+    public InteropTestBase() {
+        super();
+    }
+
+    public InteropTestBase(String arg0) {
+        super(arg0);
+    }
+    
+    public void setUp() throws Exception {
+        UtilServer.start(Constants.TESTING_PATH + getServiceRepo());
+    }
+
+    public void tearDown() throws Exception {
+        UtilServer.stop();
+    }
+    /**
+     * Do test
+     */
+    public void testInteropWithConfigFiles() {
+        try {
+
+            Class interopScenarioClientClass = Class
+                    .forName("org.apache.axis2.security.InteropScenarioClient");
+
+            Constructor c = interopScenarioClientClass
+                    .getConstructor(new Class[]{boolean.class});
+            Object clientObj = c.newInstance(new Object[]{this
+                    .isUseSOAP12InStaticConfigTest() ? Boolean.TRUE
+                    : Boolean.FALSE});
+            Method m = interopScenarioClientClass.getMethod(
+                    "invokeWithStaticConfig", new Class[]{String.class,
+                    String.class});
+            m.invoke(clientObj, new Object[]{
+                    Constants.TESTING_PATH + getClientRepo(), targetEpr});
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            fail("Error in introperating with " + targetEpr
+                    + ", client configuration: " + getClientRepo());
+        }
+    }
+
+    public void testInteropWithDynamicConfig() {
+        try {
+            Class interopScenarioClientClass = Class
+                    .forName("org.apache.axis2.security.InteropScenarioClient");
+            Constructor c = interopScenarioClientClass
+                    .getConstructor(new Class[]{boolean.class});
+            Object clientObj = c.newInstance(new Object[]{this
+                    .isUseSOAP12InStaticConfigTest() ? Boolean.TRUE
+                    : Boolean.FALSE});
+            Method m = interopScenarioClientClass.getMethod(
+                    "invokeWithGivenConfig", new Class[]{String.class,
+                    String.class, OutflowConfiguration.class,
+                    InflowConfiguration.class});
+            m.invoke(clientObj, new Object[]{
+                    Constants.TESTING_PATH + DEFAULT_CLIENT_REPOSITORY,
+                    targetEpr, getOutflowConfiguration(),
+                    getInflowConfiguration()});
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            fail("Error in introperating with " + targetEpr
+                    + ", client configuration: " + getClientRepo());
+        }
+
+    }
+
+    public void testInteropWithDynamicConfigWithProfRefs() {
+        if(getPropertyRefs() != null) {
+            try {
+    
+                Class interopScenarioClientClass = Class
+                        .forName("org.apache.axis2.security.InteropScenarioClient");
+                Constructor c = interopScenarioClientClass
+                        .getConstructor(new Class[]{boolean.class});
+                Object clientObj = c.newInstance(new Object[]{this
+                        .isUseSOAP12InStaticConfigTest() ? Boolean.TRUE
+                        : Boolean.FALSE});
+                Method m = interopScenarioClientClass.getMethod(
+                        "invokeWithGivenConfigWithProRefs", new Class[]{
+                        String.class,
+                        String.class, OutflowConfiguration.class,
+                        InflowConfiguration.class, Hashtable.class});
+                m.invoke(clientObj, new Object[]{
+                        Constants.TESTING_PATH + DEFAULT_CLIENT_REPOSITORY,
+                        targetEpr, getOutflowConfigurationWithRefs(),
+                        getInflowConfigurationWithRefs(),
+                        getPropertyRefs()});
+            } catch (Exception e) {
+                e.printStackTrace();
+                fail("Error in introperating with " + targetEpr
+                        + ", client configuration: " + getClientRepo());
+            }
+        }
+    }
+    
+    protected abstract OutflowConfiguration getOutflowConfiguration();
+
+    protected abstract InflowConfiguration getInflowConfiguration();
+
+    protected abstract OutflowConfiguration getOutflowConfigurationWithRefs();
+
+    protected abstract InflowConfiguration getInflowConfigurationWithRefs();
+    
+    protected abstract Hashtable getPropertyRefs();
+    
+    protected abstract String getClientRepo();
+
+    protected abstract String getServiceRepo();
+
+    protected abstract boolean isUseSOAP12InStaticConfigTest();
+}
diff --git a/modules/rampart-integration/src/test/java/org/apache/axis2/security/MTOMOptimizedSecurityTest.java b/modules/rampart-integration/src/test/java/org/apache/axis2/security/MTOMOptimizedSecurityTest.java
new file mode 100644
index 0000000..e96599e
--- /dev/null
+++ b/modules/rampart-integration/src/test/java/org/apache/axis2/security/MTOMOptimizedSecurityTest.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.security;
+
+import org.apache.rampart.handler.WSSHandlerConstants;
+import org.apache.rampart.handler.config.InflowConfiguration;
+import org.apache.rampart.handler.config.OutflowConfiguration;
+
+import java.util.Hashtable;
+import java.util.Properties;
+
+
+/**
+ * Testing optimizing the base 64 elements with 
+ * <code><parameter name="optimizeParts" locked="false">//xenc:Encrypted
+ * Data/xenc:CipherData/xenc:CipherValue</parameter></code>
+ */
+public class MTOMOptimizedSecurityTest extends InteropTestBase {
+
+
+	protected OutflowConfiguration getOutflowConfiguration() {
+		OutflowConfiguration ofc = new OutflowConfiguration();
+		
+		ofc.setActionItems("Signature Encrypt Timestamp");
+		ofc.setUser("alice");
+		ofc.setEncryptionUser("bob");
+		ofc.setSignaturePropFile("interop.properties");
+		ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+		ofc.setSignatureKeyIdentifier(WSSHandlerConstants.BST_DIRECT_REFERENCE);
+		ofc.setEncryptionKeyIdentifier(WSSHandlerConstants.SKI_KEY_IDENTIFIER);
+		ofc.setOptimizeParts("//xenc:EncryptedData/xenc:CipherData/" +
+                             "xenc:CipherValue");
+		
+		return ofc;
+	}
+
+	protected InflowConfiguration getInflowConfiguration() {
+		InflowConfiguration ifc = new InflowConfiguration();
+		
+		ifc.setActionItems("Signature Encrypt Timestamp");
+		ifc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+		ifc.setSignaturePropFile("interop.properties");
+		
+		return ifc;
+	}
+
+	protected String getClientRepo() {
+		return MTOM_SEC_CLIENT_REPOSITORY;
+	}
+
+	protected String getServiceRepo() {
+		return MTOM_SEC_SERVICE_REPOSITORY;
+	}
+
+	protected boolean isUseSOAP12InStaticConfigTest() {
+		return true;
+	}
+
+    protected OutflowConfiguration getOutflowConfigurationWithRefs() {
+        OutflowConfiguration ofc = new OutflowConfiguration();
+        
+        ofc.setActionItems("Signature Encrypt Timestamp");
+        ofc.setUser("alice");
+        ofc.setEncryptionUser("bob");
+        ofc.setSignaturePropRefId("key1");
+        ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        ofc.setSignatureKeyIdentifier(WSSHandlerConstants.BST_DIRECT_REFERENCE);
+        ofc.setEncryptionKeyIdentifier(WSSHandlerConstants.SKI_KEY_IDENTIFIER);
+        ofc.setOptimizeParts("//xenc:EncryptedData/xenc:CipherData/" +
+                             "xenc:CipherValue");
+        
+        return ofc;
+    }
+
+    protected InflowConfiguration getInflowConfigurationWithRefs() {
+        InflowConfiguration ifc = new InflowConfiguration();
+        
+        ifc.setActionItems("Signature Encrypt Timestamp");
+        ifc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        ifc.setSignaturePropRefId("key2");
+        
+        return ifc;
+    }
+
+    protected Hashtable getPropertyRefs() {
+        Properties prop1 =  new Properties();
+        prop1.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+
+        Properties prop2 =  new Properties();
+        prop2.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+        
+        Hashtable table = new Hashtable();
+        table.put("key1", prop1);
+        table.put("key2", prop2);
+        
+        return table;
+    }
+	
+}
diff --git a/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario1Test.java b/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario1Test.java
new file mode 100644
index 0000000..505b507
--- /dev/null
+++ b/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario1Test.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.security;
+
+import org.apache.rampart.handler.config.InflowConfiguration;
+import org.apache.rampart.handler.config.OutflowConfiguration;
+
+import java.util.Hashtable;
+
+
+/**
+ * WS-Security interop scenario 1
+ */
+public class Scenario1Test extends InteropTestBase {
+
+    
+	protected OutflowConfiguration getOutflowConfiguration() {
+		OutflowConfiguration ofc = new OutflowConfiguration();
+		ofc.setActionItems("UsernameToken");
+		ofc.setUser("Chris");
+		ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+		ofc.setPasswordType("PasswordText");
+		return ofc;
+	}
+
+	protected InflowConfiguration getInflowConfiguration() {
+		return null;
+	}
+
+	protected String getClientRepo() {
+		return SCENARIO1_CLIENT_REPOSITORY;
+	}
+
+	protected String getServiceRepo() {
+		return SCENARIO1_SERVICE_REPOSITORY;
+	}
+
+	protected boolean isUseSOAP12InStaticConfigTest() {
+		return true;
+	}
+
+    protected OutflowConfiguration getOutflowConfigurationWithRefs() {
+        return null;
+    }
+
+    protected InflowConfiguration getInflowConfigurationWithRefs() {
+        return null;
+    }
+
+    protected Hashtable getPropertyRefs() {
+        return null;
+    }
+
+}
diff --git a/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario2Test.java b/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario2Test.java
new file mode 100644
index 0000000..2e626b7
--- /dev/null
+++ b/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario2Test.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.security;
+
+import org.apache.rampart.handler.WSSHandlerConstants;
+import org.apache.rampart.handler.config.InflowConfiguration;
+import org.apache.rampart.handler.config.OutflowConfiguration;
+import org.apache.ws.security.WSConstants;
+
+import java.util.Hashtable;
+import java.util.Properties;
+
+/**
+ * WS-Security inteorp scenario 2
+ */
+public class Scenario2Test extends InteropTestBase {
+    
+	protected OutflowConfiguration getOutflowConfiguration() {
+		OutflowConfiguration ofc = new OutflowConfiguration();
+		
+		ofc.setActionItems("UsernameToken Encrypt");
+		ofc.setUser("Chris");
+		ofc.setAddUTElements("Nonce Created");
+		ofc.setEncryptionParts("{Element}{" + WSSE_NS + "}UsernameToken");
+		ofc.setEncryptionUser("bob");
+		ofc.setEncryptionPropFile("interop.properties");
+		ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+		ofc.setEncryptionSymAlgorithm(WSConstants.TRIPLE_DES);
+		ofc.setPasswordType(WSConstants.PW_TEXT);
+		ofc.setEncryptionKeyIdentifier(WSSHandlerConstants.SKI_KEY_IDENTIFIER);
+		
+		return ofc;
+	}
+
+	protected InflowConfiguration getInflowConfiguration() {
+		return null;
+	}
+
+	protected String getClientRepo() {
+		return SCENARIO2_CLIENT_REPOSITORY;
+	}
+
+	protected String getServiceRepo() {
+		return SCENARIO2_SERVICE_REPOSITORY;
+	}
+
+	protected boolean isUseSOAP12InStaticConfigTest() {
+		return true;
+	}
+
+    /* (non-Javadoc)
+     * @see org.apache.axis2.security.InteropTestBase#getOutflowConfigurationWithRefs()
+     */
+    protected OutflowConfiguration getOutflowConfigurationWithRefs() {
+        OutflowConfiguration ofc = new OutflowConfiguration();
+        
+        ofc.setActionItems("UsernameToken Encrypt");
+        ofc.setUser("Chris");
+        ofc.setAddUTElements("Nonce Created");
+        ofc.setEncryptionParts("{Element}{" + WSSE_NS + "}UsernameToken");
+        ofc.setEncryptionUser("bob");
+        ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        ofc.setEncryptionSymAlgorithm(WSConstants.TRIPLE_DES);
+        ofc.setPasswordType(WSConstants.PW_TEXT);
+        ofc.setEncryptionKeyIdentifier(WSSHandlerConstants.SKI_KEY_IDENTIFIER);
+        
+        ofc.setEncryptionPropRefId("key1");
+        
+        return ofc;
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.axis2.security.InteropTestBase#getInflowConfigurationWithRefs()
+     */
+    protected InflowConfiguration getInflowConfigurationWithRefs() {
+        return null;
+    }
+
+    protected Hashtable getPropertyRefs() {
+        Properties prop1 =  new Properties();
+        prop1.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+        
+        Hashtable table = new Hashtable();
+        table.put("key1", prop1);
+        
+        return table;
+    }
+}
diff --git a/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario2aTest.java b/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario2aTest.java
new file mode 100644
index 0000000..2cbf860
--- /dev/null
+++ b/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario2aTest.java
@@ -0,0 +1,99 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.security;
+
+import org.apache.rampart.handler.WSSHandlerConstants;
+import org.apache.rampart.handler.config.InflowConfiguration;
+import org.apache.rampart.handler.config.OutflowConfiguration;
+import org.apache.ws.security.WSConstants;
+
+import java.util.Hashtable;
+import java.util.Properties;
+
+
+/**
+ * WS-Security interop scenario 2a
+ */
+public class Scenario2aTest extends InteropTestBase {
+
+
+	protected OutflowConfiguration getOutflowConfiguration() {
+		OutflowConfiguration ofc = new OutflowConfiguration();
+		
+		ofc.setActionItems("UsernameTokenSignature Encrypt Timestamp");
+		ofc.setUser("Chris");
+		ofc.setEncryptionParts("{Element}{" + WSSE_NS + "}UsernameToken");
+		ofc.setEncryptionUser("bob");
+		ofc.setEncryptionPropFile("interop.properties");
+		ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+		ofc.setEncryptionSymAlgorithm(WSConstants.TRIPLE_DES);
+		ofc.setEncryptionKeyIdentifier(WSSHandlerConstants.SKI_KEY_IDENTIFIER);
+		
+		return ofc;
+	}
+
+	protected InflowConfiguration getInflowConfiguration() {
+		return null;
+	}
+
+	protected String getClientRepo() {
+		return SCENARIO2a_CLIENT_REPOSITORY;
+	}
+
+	protected String getServiceRepo() {
+		return SCENARIO2a_SERVICE_REPOSITORY;
+	}
+
+	protected boolean isUseSOAP12InStaticConfigTest() {
+		return true;
+	}
+
+    protected OutflowConfiguration getOutflowConfigurationWithRefs() {
+        OutflowConfiguration ofc = new OutflowConfiguration();
+        
+        ofc.setActionItems("UsernameTokenSignature Encrypt Timestamp");
+        ofc.setUser("Chris");
+        ofc.setEncryptionParts("{Element}{" + WSSE_NS + "}UsernameToken");
+        ofc.setEncryptionUser("bob");
+        ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        ofc.setEncryptionSymAlgorithm(WSConstants.TRIPLE_DES);
+        ofc.setEncryptionKeyIdentifier(WSSHandlerConstants.SKI_KEY_IDENTIFIER);
+        
+        ofc.setEncryptionPropRefId("key1");
+        
+        return ofc;
+    }
+
+    protected InflowConfiguration getInflowConfigurationWithRefs() {
+        return null;
+    }
+
+    protected Hashtable getPropertyRefs() {
+        
+        Properties prop1 =  new Properties();
+        prop1.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+        
+        Hashtable table = new Hashtable();
+        table.put("key1", prop1);
+        
+        return table;
+        
+    }
+}
diff --git a/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario3Test.java b/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario3Test.java
new file mode 100644
index 0000000..679cdce
--- /dev/null
+++ b/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario3Test.java
@@ -0,0 +1,119 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.security;
+
+import org.apache.rampart.handler.WSSHandlerConstants;
+import org.apache.rampart.handler.config.InflowConfiguration;
+import org.apache.rampart.handler.config.OutflowConfiguration;
+import org.apache.ws.security.WSConstants;
+
+import java.util.Hashtable;
+import java.util.Properties;
+
+/**
+ * WS-Security interop scenario 3
+ */
+public class Scenario3Test extends InteropTestBase {
+
+
+	protected OutflowConfiguration getOutflowConfiguration() {
+		OutflowConfiguration ofc = new OutflowConfiguration();
+		
+		ofc.setActionItems("Signature Encrypt Timestamp");
+		ofc.setUser("alice");
+		ofc.setEncryptionUser("bob");
+		ofc.setSignaturePropFile("interop.properties");
+		ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+		ofc.setEncryptionSymAlgorithm(WSConstants.TRIPLE_DES);
+		ofc.setEncryptionKeyIdentifier(WSSHandlerConstants.SKI_KEY_IDENTIFIER);
+		ofc.setSignatureKeyIdentifier(WSSHandlerConstants.BST_DIRECT_REFERENCE);
+		ofc.setEnableSignatureConfirmation(false);
+		
+		return ofc;
+	}
+
+	protected InflowConfiguration getInflowConfiguration() {
+		InflowConfiguration ifc = new InflowConfiguration();
+		ifc.setActionItems("Signature Encrypt Timestamp");
+		ifc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+		ifc.setSignaturePropFile("interop.properties");
+		ifc.setEnableSignatureConfirmation(false);
+		return ifc;
+	}
+
+	protected String getClientRepo() {
+		return SCENARIO3_CLIENT_REPOSITORY;
+	}
+
+	protected String getServiceRepo() {
+		return SCENARIO3_SERVICE_REPOSITORY;
+	}
+
+	protected boolean isUseSOAP12InStaticConfigTest() {
+		return true;
+	}
+
+    protected OutflowConfiguration getOutflowConfigurationWithRefs() {
+        OutflowConfiguration ofc = new OutflowConfiguration();
+        
+        ofc.setActionItems("Signature Encrypt Timestamp");
+        ofc.setUser("alice");
+        ofc.setEncryptionUser("bob");
+        ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        ofc.setEncryptionSymAlgorithm(WSConstants.TRIPLE_DES);
+        ofc.setEncryptionKeyIdentifier(WSSHandlerConstants.SKI_KEY_IDENTIFIER);
+        ofc.setSignatureKeyIdentifier(WSSHandlerConstants.BST_DIRECT_REFERENCE);
+        ofc.setEnableSignatureConfirmation(false);
+        
+        ofc.setSignaturePropRefId("key1");
+        
+        return ofc;
+    }
+
+    protected InflowConfiguration getInflowConfigurationWithRefs() {
+        InflowConfiguration ifc = new InflowConfiguration();
+        ifc.setActionItems("Signature Encrypt Timestamp");
+        ifc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        ifc.setEnableSignatureConfirmation(false);
+        
+        ifc.setSignaturePropRefId("key2");
+        
+        return ifc;
+    }
+
+    protected Hashtable getPropertyRefs() {
+        Properties prop1 =  new Properties();
+        prop1.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+
+        Properties prop2 =  new Properties();
+        prop2.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+        
+        Hashtable table = new Hashtable();
+        table.put("key1", prop1);
+        table.put("key2", prop2);
+        
+        return table;
+    }
+
+	
+}
diff --git a/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario4Test.java b/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario4Test.java
new file mode 100644
index 0000000..fb6565f
--- /dev/null
+++ b/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario4Test.java
@@ -0,0 +1,126 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.security;
+
+import org.apache.rampart.handler.WSSHandlerConstants;
+import org.apache.rampart.handler.config.InflowConfiguration;
+import org.apache.rampart.handler.config.OutflowConfiguration;
+import org.apache.ws.security.WSConstants;
+
+import java.util.Hashtable;
+import java.util.Properties;
+
+/**
+ * WS-Security interop scenario 4
+ */
+public class Scenario4Test extends InteropTestBase {
+
+
+	protected OutflowConfiguration getOutflowConfiguration() {
+		OutflowConfiguration ofc = new OutflowConfiguration();
+		
+		ofc.setActionItems("Signature Encrypt Timestamp");
+		ofc.setUser("alice");
+		ofc.setSignaturePropFile("interop.properties");
+		ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+		ofc.setEncryptionSymAlgorithm(WSConstants.TRIPLE_DES);
+		ofc.setEncryptionKeyIdentifier(WSSHandlerConstants.EMBEDDED_KEYNAME);
+		ofc.setEmbeddedKeyName("SessionKey");
+		ofc.setSignatureKeyIdentifier(WSSHandlerConstants.BST_DIRECT_REFERENCE);
+		ofc.setEmbeddedKeyCallbackClass("org.apache.axis2.security.PWCallback");
+
+		return ofc;
+	}
+
+	protected InflowConfiguration getInflowConfiguration() {
+		InflowConfiguration ifc = new InflowConfiguration();
+		
+		ifc.setActionItems("Signature Encrypt Timestamp");
+		ifc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+		ifc.setSignaturePropFile("interop.properties");
+
+        /**
+         * This test is not "Basic Security Profile(BSP)" compatible. Cos we use
+         * KeyInfo/KeyName. Therefore setting this test as not BSP compatible.
+         */
+        ifc.setBSPCompliant(false);
+		
+		return ifc;
+	}
+
+	protected String getClientRepo() {
+		return SCENARIO4_CLIENT_REPOSITORY;
+	}
+
+	protected String getServiceRepo() {
+		return SCENARIO4_SERVICE_REPOSITORY;
+	}
+
+	protected boolean isUseSOAP12InStaticConfigTest() {
+		return true;
+	}
+
+    protected OutflowConfiguration getOutflowConfigurationWithRefs() {
+        OutflowConfiguration ofc = new OutflowConfiguration();
+        
+        ofc.setActionItems("Signature Encrypt Timestamp");
+        ofc.setUser("alice");
+        ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        ofc.setEncryptionSymAlgorithm(WSConstants.TRIPLE_DES);
+        ofc.setEncryptionKeyIdentifier(WSSHandlerConstants.EMBEDDED_KEYNAME);
+        ofc.setEmbeddedKeyName("SessionKey");
+        ofc.setSignatureKeyIdentifier(WSSHandlerConstants.BST_DIRECT_REFERENCE);
+        ofc.setEmbeddedKeyCallbackClass("org.apache.axis2.security.PWCallback");
+
+        ofc.setSignaturePropRefId("key1");
+        
+        return ofc;
+    }
+
+    protected InflowConfiguration getInflowConfigurationWithRefs() {
+        InflowConfiguration ifc = new InflowConfiguration();
+        
+        ifc.setActionItems("Signature Encrypt Timestamp");
+        ifc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        
+        ifc.setSignaturePropRefId("key2");
+        ifc.setBSPCompliant(false);
+        
+        return ifc;
+    }
+
+    protected Hashtable getPropertyRefs() {
+        Properties prop1 =  new Properties();
+        prop1.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+
+        Properties prop2 =  new Properties();
+        prop2.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+        
+        Hashtable table = new Hashtable();
+        table.put("key1", prop1);
+        table.put("key2", prop2);
+        
+        return table;
+    }
+
+}
diff --git a/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario5Test.java b/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario5Test.java
new file mode 100644
index 0000000..ef15ff4
--- /dev/null
+++ b/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario5Test.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.security;
+
+import org.apache.rampart.handler.WSSHandlerConstants;
+import org.apache.rampart.handler.config.InflowConfiguration;
+import org.apache.rampart.handler.config.OutflowConfiguration;
+
+import java.util.Hashtable;
+import java.util.Properties;
+
+/**
+ * WS-Security interop scenario 5
+ */
+public class Scenario5Test extends InteropTestBase {
+
+
+	protected OutflowConfiguration getOutflowConfiguration() {
+		OutflowConfiguration ofc = new OutflowConfiguration(2);
+		
+		ofc.setActionItems("Signature");
+		ofc.setUser("alice");
+		ofc.setSignaturePropFile("interop.properties");
+		ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+		ofc.setSignatureKeyIdentifier(WSSHandlerConstants.BST_DIRECT_REFERENCE);
+		ofc.setSignatureParts("{}{http://xmlsoap.org/Ping}ticket");
+		
+		ofc.nextAction();
+		
+		ofc.setActionItems("Signature Timestamp");
+		ofc.setUser("alice");
+		ofc.setSignaturePropFile("interop.properties");
+		ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+		
+		return ofc;
+	}
+
+	protected InflowConfiguration getInflowConfiguration() {
+		return null;
+	}
+
+	protected String getClientRepo() {
+		return SCENARIO5_CLIENT_REPOSITORY;
+	}
+
+	protected String getServiceRepo() {
+		return SCENARIO5_SERVICE_REPOSITORY;
+	}
+
+	protected boolean isUseSOAP12InStaticConfigTest() {
+		return true;
+	}
+
+    protected OutflowConfiguration getOutflowConfigurationWithRefs() {
+        OutflowConfiguration ofc = new OutflowConfiguration(2);
+        
+        ofc.setActionItems("Signature");
+        ofc.setUser("alice");
+        ofc.setSignaturePropRefId("key1");
+        ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        ofc.setSignatureKeyIdentifier(WSSHandlerConstants.BST_DIRECT_REFERENCE);
+        ofc.setSignatureParts("{}{http://xmlsoap.org/Ping}ticket");
+        
+        ofc.nextAction();
+        
+        ofc.setActionItems("Signature Timestamp");
+        ofc.setUser("alice");
+        ofc.setSignaturePropRefId("key2");
+        ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        
+        return ofc;
+    }
+
+    protected InflowConfiguration getInflowConfigurationWithRefs() {
+        return null;
+    }
+
+    protected Hashtable getPropertyRefs() {
+        Properties prop1 =  new Properties();
+        prop1.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+
+        Properties prop2 =  new Properties();
+        prop2.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+        
+        Hashtable table = new Hashtable();
+        table.put("key1", prop1);
+        
+        //IMPORTANT: Note that the key of the first repetition has "1" appended to it
+        table.put("key21", prop2);
+        
+        return table;
+    }
+}
diff --git a/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario6Test.java b/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario6Test.java
new file mode 100644
index 0000000..3a5033d
--- /dev/null
+++ b/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario6Test.java
@@ -0,0 +1,114 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.security;
+
+import org.apache.rampart.handler.WSSHandlerConstants;
+import org.apache.rampart.handler.config.InflowConfiguration;
+import org.apache.rampart.handler.config.OutflowConfiguration;
+import org.apache.ws.security.WSConstants;
+
+import java.util.Hashtable;
+import java.util.Properties;
+
+/**
+ * WS-Security interop scenario 6
+ */
+public class Scenario6Test extends InteropTestBase {
+	
+
+	protected OutflowConfiguration getOutflowConfiguration() {
+		OutflowConfiguration ofc = new OutflowConfiguration();
+		
+		ofc.setActionItems("Encrypt Signature Timestamp");
+		ofc.setUser("alice");
+		ofc.setSignaturePropFile("interop.properties");
+		ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+		ofc.setEncryptionSymAlgorithm(WSConstants.TRIPLE_DES);
+		ofc.setSignatureKeyIdentifier(WSSHandlerConstants.BST_DIRECT_REFERENCE);
+		ofc.setEncryptionKeyIdentifier(WSSHandlerConstants.SKI_KEY_IDENTIFIER);
+		ofc.setEmbeddedKeyCallbackClass("rg.apache.axis2.security.PWCallback");
+		
+		return ofc;
+	}
+
+	protected InflowConfiguration getInflowConfiguration() {
+		InflowConfiguration ifc = new InflowConfiguration();
+		
+		ifc.setActionItems("Encrypt Signature Timestamp");
+		ifc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+		ifc.setSignaturePropFile("interop.properties");
+		
+		return ifc;
+	}
+
+	protected String getClientRepo() {
+		return SCENARIO6_CLIENT_REPOSITORY;
+	}
+
+	protected String getServiceRepo() {
+		return SCENARIO6_SERVICE_REPOSITORY;
+	}
+
+	protected boolean isUseSOAP12InStaticConfigTest() {
+		return true;
+	}
+
+    protected OutflowConfiguration getOutflowConfigurationWithRefs() {
+        OutflowConfiguration ofc = new OutflowConfiguration();
+        
+        ofc.setActionItems("Encrypt Signature Timestamp");
+        ofc.setUser("alice");
+        ofc.setSignaturePropRefId("key1");
+        ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        ofc.setEncryptionSymAlgorithm(WSConstants.TRIPLE_DES);
+        ofc.setSignatureKeyIdentifier(WSSHandlerConstants.BST_DIRECT_REFERENCE);
+        ofc.setEncryptionKeyIdentifier(WSSHandlerConstants.SKI_KEY_IDENTIFIER);
+        ofc.setEmbeddedKeyCallbackClass("rg.apache.axis2.security.PWCallback");
+        
+        return ofc;
+    }
+
+    protected InflowConfiguration getInflowConfigurationWithRefs() {
+        InflowConfiguration ifc = new InflowConfiguration();
+        
+        ifc.setActionItems("Encrypt Signature Timestamp");
+        ifc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        ifc.setSignaturePropRefId("key2");
+        
+        return ifc;
+    }
+
+    protected Hashtable getPropertyRefs() {
+        Properties prop1 =  new Properties();
+        prop1.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+
+        Properties prop2 =  new Properties();
+        prop2.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+        
+        Hashtable table = new Hashtable();
+        table.put("key1", prop1);
+        table.put("key2", prop2);
+        
+        return table;
+    }
+}
diff --git a/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario7Test.java b/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario7Test.java
new file mode 100644
index 0000000..af3e63f
--- /dev/null
+++ b/modules/rampart-integration/src/test/java/org/apache/axis2/security/Scenario7Test.java
@@ -0,0 +1,141 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.axis2.security;
+
+import org.apache.axiom.soap.SOAP11Constants;
+import org.apache.rampart.handler.WSSHandlerConstants;
+import org.apache.rampart.handler.config.InflowConfiguration;
+import org.apache.rampart.handler.config.OutflowConfiguration;
+import org.apache.ws.security.WSConstants;
+
+import java.util.Hashtable;
+import java.util.Properties;
+
+/**
+ * WS-Security interop scenario 7
+ */
+public class Scenario7Test extends InteropTestBase {
+
+  
+	protected OutflowConfiguration getOutflowConfiguration() {
+		OutflowConfiguration ofc = new OutflowConfiguration();
+		
+		ofc.setActionItems("Signature Encrypt Timestamp");
+		ofc.setUser("alice");
+		ofc.setEncryptionUser("bob");
+		ofc.setSignaturePropFile("interop.properties");
+		ofc.setEncryptionPropFile("interop.properties");
+		ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+		ofc.setEncryptionSymAlgorithm(WSConstants.TRIPLE_DES);
+		ofc.setSignatureKeyIdentifier(WSSHandlerConstants.BST_DIRECT_REFERENCE);
+		ofc.setEncryptionKeyIdentifier(WSSHandlerConstants.SKI_KEY_IDENTIFIER);
+		ofc.setEmbeddedKeyCallbackClass("rg.apache.axis2.security.PWCallback");
+		ofc.setSignatureParts("{}{" + 
+                                SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI + 
+                                "}Body;STRTransform");
+		
+		return ofc;
+	}
+
+	protected InflowConfiguration getInflowConfiguration() {
+		InflowConfiguration ifc = new InflowConfiguration();
+		
+		ifc.setActionItems("Signature Encrypt Timestamp");
+		ifc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+		ifc.setSignaturePropFile("interop.properties");
+		ifc.setDecryptionPropFile("interop.properties");
+		
+		return ifc;
+	}
+
+	protected String getClientRepo() {
+		return SCENARIO7_CLIENT_REPOSITORY;
+	}
+
+	protected String getServiceRepo() {
+		return SCENARIO7_SERVICE_REPOSITORY;
+	}
+
+	protected boolean isUseSOAP12InStaticConfigTest() {
+		return false;
+	}
+
+    protected OutflowConfiguration getOutflowConfigurationWithRefs() {
+        OutflowConfiguration ofc = new OutflowConfiguration();
+        
+        ofc.setActionItems("Signature Encrypt Timestamp");
+        ofc.setUser("alice");
+        ofc.setEncryptionUser("bob");
+        ofc.setSignaturePropRefId("key1");
+        ofc.setEncryptionPropRefId("key2");
+        ofc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        ofc.setEncryptionSymAlgorithm(WSConstants.TRIPLE_DES);
+        ofc.setSignatureKeyIdentifier(WSSHandlerConstants.BST_DIRECT_REFERENCE);
+        ofc.setEncryptionKeyIdentifier(WSSHandlerConstants.SKI_KEY_IDENTIFIER);
+        ofc.setEmbeddedKeyCallbackClass("rg.apache.axis2.security.PWCallback");
+        ofc.setSignatureParts("{}{" + 
+                                SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI + 
+                                "}Body;STRTransform");
+        
+        return ofc;
+    }
+
+    protected InflowConfiguration getInflowConfigurationWithRefs() {
+        InflowConfiguration ifc = new InflowConfiguration();
+        
+        ifc.setActionItems("Signature Encrypt Timestamp");
+        ifc.setPasswordCallbackClass("org.apache.axis2.security.PWCallback");
+        ifc.setSignaturePropRefId("key3");
+        ifc.setDecryptionPropRefKey("key4");
+        
+        return ifc;
+    }
+
+    protected Hashtable getPropertyRefs() {
+        Properties prop1 =  new Properties();
+        prop1.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop1.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+
+        Properties prop2 =  new Properties();
+        prop2.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop2.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+        
+        Properties prop3 =  new Properties();
+        prop3.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop3.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop3.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop3.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+
+        Properties prop4 =  new Properties();
+        prop4.setProperty("org.apache.ws.security.crypto.provider", "org.apache.ws.security.components.crypto.Merlin");
+        prop4.setProperty("org.apache.ws.security.crypto.merlin.keystore.type", "jks");
+        prop4.setProperty("org.apache.ws.security.crypto.merlin.keystore.password", "password");
+        prop4.setProperty("org.apache.ws.security.crypto.merlin.file", "interop2.jks");
+        
+        Hashtable table = new Hashtable();
+        table.put("key1", prop1);
+        table.put("key2", prop2);
+        table.put("key3", prop3);
+        table.put("key4", prop4);
+        
+        return table;
+    }
+}
diff --git a/modules/rampart-integration/src/test/resources/security/complete.client.axis2.xml b/modules/rampart-integration/src/test/resources/security/complete.client.axis2.xml
new file mode 100644
index 0000000..c1cf806
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/complete.client.axis2.xml
@@ -0,0 +1,143 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+   

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <module ref="addressing"/>

+

+    <!--Configuring module , providing parameters for modules whether they refer or not-->

+    <moduleConfig name="addressing">

+        <parameter name="includeOptionalHeaders" locked="false">true</parameter>

+    </moduleConfig>

+

+    <!-- Test with addressing and MTOM: Client's Configuration:START-->

+

+    <parameter name="OutflowSecurity">

+      <action>

+        <items>Timestamp Signature Encrypt</items>

+        <user>alice</user>

+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>

+        <signaturePropFile>interop.properties</signaturePropFile>

+        <signatureKeyIdentifier>SKIKeyIdentifier</signatureKeyIdentifier>

+        <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>

+        <encryptionUser>bob</encryptionUser>

+        <signatureParts>{Element}{http://www.w3.org/2005/08/addressing}To;{Element}{http://www.w3.org/2005/08/addressing}MessageID;{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp</signatureParts>

+

+        <optimizeParts>//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</optimizeParts>

+      </action>

+    </parameter>

+

+    <parameter name="InflowSecurity">

+      <action>

+        <items>Timestamp Signature Encrypt</items>

+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>

+        <signaturePropFile>interop.properties</signaturePropFile>

+      </action>

+    </parameter>

+

+    <!-- Test with addressing and MTOM: Client's Configuration:END-->

+

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+

+

+  <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/complete.service.axis2.xml b/modules/rampart-integration/src/test/resources/security/complete.service.axis2.xml
new file mode 100644
index 0000000..7759bd7
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/complete.service.axis2.xml
@@ -0,0 +1,152 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+    <parameter name="enableMTOM" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Engage the addressing module -->

+    <module ref="addressing"/>

+

+    <!-- Engage the security module -->

+    <module ref="rampart"/>

+

+    <!--Configuring module , providing parameters for modules whether they refer or not-->

+    <moduleConfig name="addressing">

+        <parameter name="includeOptionalHeaders" locked="false">true</parameter>

+    </moduleConfig>

+

+    <!-- ================================================= -->

+    <!-- Transport Ins -->

+    <!-- ================================================= -->

+    <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">

+        <parameter name="port" locked="false">6060</parameter>

+    </transportReceiver>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">

+          <parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>

+          <parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.port" locked="false">110</parameter>

+          <parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>

+      </transportReceiver> -->

+

+    <!-- ================================================= -->

+    <!-- Transport Outs -->

+    <!-- ================================================= -->

+

+    <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+    <transportSender name="https" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>

+    </transportSender>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+   <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">

+       <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>

+       <parameter name="transport.mail.smtp.user" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.password" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.port" locked="false">25</parameter>

+   </transportSender>

+   -->

+  <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/complete.service.xml b/modules/rampart-integration/src/test/resources/security/complete.service.xml
new file mode 100644
index 0000000..7988cb1
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/complete.service.xml
@@ -0,0 +1,31 @@
+<service name="PingPort">
+	<parameter locked="false" name="ServiceClass">org.apache.axis2.oasis.ping.PingPortSkeleton</parameter>
+	<!--Mounting the method Ping-->
+	<operation name="Ping">
+		<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiverInOut"/>
+	</operation>    
+
+    <parameter name="InflowSecurity">
+      <action>
+        <items>Timestamp Signature Encrypt</items>
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+        <signaturePropFile>interop.properties</signaturePropFile>
+      </action>
+    </parameter>
+
+    <parameter name="OutflowSecurity">
+      <action>
+        <items>Timestamp Signature Encrypt</items>
+        <user>bob</user>
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+        <signaturePropFile>interop.properties</signaturePropFile>
+        <signatureKeyIdentifier>SKIKeyIdentifier</signatureKeyIdentifier>
+        <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+        <encryptionUser>alice</encryptionUser>
+        <signatureParts>{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp</signatureParts>
+
+        <optimizeParts>//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</optimizeParts>
+      </action>
+    </parameter>
+
+</service>
diff --git a/modules/rampart-integration/src/test/resources/security/s1.client.axis2.xml b/modules/rampart-integration/src/test/resources/security/s1.client.axis2.xml
new file mode 100644
index 0000000..256b7eb
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s1.client.axis2.xml
@@ -0,0 +1,119 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Scenario 1: Client's Configuration:START-->

+    <parameter name="OutflowSecurity">

+      <action>

+        <items>UsernameToken</items>

+        <user>Chris</user>

+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>

+        <passwordType>PasswordText</passwordType>

+      </action>

+    </parameter>

+    <!-- Scenario 1: Client's Configuration:END-->

+

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+

+   <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/s1.service.axis2.xml b/modules/rampart-integration/src/test/resources/security/s1.service.axis2.xml
new file mode 100644
index 0000000..1c5bbf0
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s1.service.axis2.xml
@@ -0,0 +1,144 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Engage the security module -->

+    <module ref="rampart"/>

+

+    <!-- ================================================= -->

+    <!-- Transport Ins -->

+    <!-- ================================================= -->

+    <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">

+        <parameter name="port" locked="false">6060</parameter>

+    </transportReceiver>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">

+          <parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>

+          <parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.port" locked="false">110</parameter>

+          <parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>

+      </transportReceiver> -->

+

+    <!-- ================================================= -->

+    <!-- Transport Outs -->

+    <!-- ================================================= -->

+

+    <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+    <transportSender name="https"

+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>

+    </transportSender>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+   <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">

+       <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>

+       <parameter name="transport.mail.smtp.user" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.password" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.port" locked="false">25</parameter>

+   </transportSender>

+   -->

+   <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/s1.service.xml b/modules/rampart-integration/src/test/resources/security/s1.service.xml
new file mode 100644
index 0000000..d6afa98
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s1.service.xml
@@ -0,0 +1,15 @@
+<service name="PingPort">
+	<parameter locked="false" name="ServiceClass">org.apache.axis2.oasis.ping.PingPortSkeleton</parameter>
+	<!--Mounting the method Ping-->
+	<operation name="Ping">
+		<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiverInOut"/>
+	</operation>    
+
+    <parameter name="InflowSecurity">
+      <action>
+        <items>UsernameToken</items>
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+      </action>
+    </parameter>
+
+</service>
diff --git a/modules/rampart-integration/src/test/resources/security/s2.client.axis2.xml b/modules/rampart-integration/src/test/resources/security/s2.client.axis2.xml
new file mode 100644
index 0000000..334d060
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s2.client.axis2.xml
@@ -0,0 +1,128 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Scenario 2: Client's Configuration:START-->

+

+    <parameter name="OutflowSecurity">

+      <action>

+        <items>UsernameToken Encrypt</items>

+        <user>Chris</user>

+        <addUTElements>Nonce Created</addUTElements>

+        <encryptionParts>{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken</encryptionParts>

+        <encryptionUser>bob</encryptionUser>

+        <encryptionPropFile>interop.properties</encryptionPropFile>

+        <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>

+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>

+        <passwordType>PasswordText</passwordType>

+        <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>

+      </action>

+    </parameter>

+

+    <!-- Scenario 2: Client's Configuration:END-->

+

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+

+ <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/s2.service.axis2.xml b/modules/rampart-integration/src/test/resources/security/s2.service.axis2.xml
new file mode 100644
index 0000000..d0d3d19
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s2.service.axis2.xml
@@ -0,0 +1,144 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Engage the security module -->

+    <module ref="rampart"/>

+

+    <!-- ================================================= -->

+    <!-- Transport Ins -->

+    <!-- ================================================= -->

+    <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">

+        <parameter name="port" locked="false">6060</parameter>

+    </transportReceiver>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">

+          <parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>

+          <parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.port" locked="false">110</parameter>

+          <parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>

+      </transportReceiver> -->

+

+    <!-- ================================================= -->

+    <!-- Transport Outs -->

+    <!-- ================================================= -->

+

+    <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+    <transportSender name="https" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>

+    </transportSender>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+   <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">

+       <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>

+       <parameter name="transport.mail.smtp.user" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.password" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.port" locked="false">25</parameter>

+   </transportSender>

+   -->

+

+   <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/s2.service.xml b/modules/rampart-integration/src/test/resources/security/s2.service.xml
new file mode 100644
index 0000000..77c8eac
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s2.service.xml
@@ -0,0 +1,16 @@
+<service name="PingPort">
+	<parameter locked="false" name="ServiceClass">org.apache.axis2.oasis.ping.PingPortSkeleton</parameter>
+	<!--Mounting the method Ping-->
+	<operation name="Ping">
+		<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiverInOut"/>
+	</operation>
+
+    <parameter name="InflowSecurity">
+      <action>
+        <items>UsernameToken Encrypt</items>
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+        <decryptionPropFile>interop.properties</decryptionPropFile>
+      </action>
+    </parameter>
+
+</service>
diff --git a/modules/rampart-integration/src/test/resources/security/s2a.client.axis2.xml b/modules/rampart-integration/src/test/resources/security/s2a.client.axis2.xml
new file mode 100644
index 0000000..e2c8f86
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s2a.client.axis2.xml
@@ -0,0 +1,126 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Scenario 2: Client's Configuration:START-->

+

+    <parameter name="OutflowSecurity">

+      <action>

+        <items>UsernameTokenSignature Encrypt Timestamp</items>

+        <user>Chris</user>

+        <encryptionParts>{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken</encryptionParts>

+        <encryptionUser>bob</encryptionUser>

+        <encryptionPropFile>interop.properties</encryptionPropFile>

+        <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>

+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>

+        <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>

+      </action>

+    </parameter>

+

+    <!-- Scenario 2: Client's Configuration:END-->

+

+

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+

+<phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/s2a.service.axis2.xml b/modules/rampart-integration/src/test/resources/security/s2a.service.axis2.xml
new file mode 100644
index 0000000..5c1add2
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s2a.service.axis2.xml
@@ -0,0 +1,143 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Engage the security module -->

+    <module ref="rampart"/>

+

+    <!-- ================================================= -->

+    <!-- Transport Ins -->

+    <!-- ================================================= -->

+    <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">

+        <parameter name="port" locked="false">6060</parameter>

+    </transportReceiver>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">

+          <parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>

+          <parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.port" locked="false">110</parameter>

+          <parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>

+      </transportReceiver> -->

+

+    <!-- ================================================= -->

+    <!-- Transport Outs -->

+    <!-- ================================================= -->

+

+    <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+    <transportSender name="https" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>

+    </transportSender>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+   <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">

+       <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>

+       <parameter name="transport.mail.smtp.user" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.password" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.port" locked="false">25</parameter>

+   </transportSender>

+   -->

+  <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/s2a.service.xml b/modules/rampart-integration/src/test/resources/security/s2a.service.xml
new file mode 100644
index 0000000..4c5f6b3
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s2a.service.xml
@@ -0,0 +1,16 @@
+<service name="PingPort">
+	<parameter locked="false" name="ServiceClass">org.apache.axis2.oasis.ping.PingPortSkeleton</parameter>
+	<!--Mounting the method Ping-->
+	<operation name="Ping">
+		<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiverInOut"/>
+	</operation>    
+
+    <parameter name="InflowSecurity">
+      <action>
+        <items>UsernameTokenSignature UsernameTokenNoPassword Encrypt Timestamp</items>
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+        <decryptionPropFile>interop.properties</decryptionPropFile>
+      </action>
+    </parameter>
+
+</service>
diff --git a/modules/rampart-integration/src/test/resources/security/s3.client.axis2.xml b/modules/rampart-integration/src/test/resources/security/s3.client.axis2.xml
new file mode 100644
index 0000000..19ab019
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s3.client.axis2.xml
@@ -0,0 +1,137 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Scenario 3: Client's Configuration:START-->

+

+    <parameter name="OutflowSecurity">

+      <action>

+        <items>Signature Encrypt Timestamp</items>

+        <user>alice</user>

+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>

+        <signaturePropFile>interop.properties</signaturePropFile>

+        <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>

+        <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>

+        <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>

+        <encryptionUser>bob</encryptionUser>

+        <enableSignatureConfirmation>false</enableSignatureConfirmation>

+      </action>

+    </parameter>

+

+    <parameter name="InflowSecurity">

+      <action>

+        <items>Signature Encrypt Timestamp</items>

+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>

+        <signaturePropFile>interop.properties</signaturePropFile>

+        <enableSignatureConfirmation>false</enableSignatureConfirmation>

+      </action>

+    </parameter>

+

+    <!-- Scenario 3: Client's Configuration:END-->

+

+

+

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+

+  <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/s3.service.axis2.xml b/modules/rampart-integration/src/test/resources/security/s3.service.axis2.xml
new file mode 100644
index 0000000..8540d4e
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s3.service.axis2.xml
@@ -0,0 +1,143 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Engage the security module -->

+    <module ref="rampart"/>

+

+    <!-- ================================================= -->

+    <!-- Transport Ins -->

+    <!-- ================================================= -->

+    <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">

+        <parameter name="port" locked="false">6060</parameter>

+    </transportReceiver>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">

+          <parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>

+          <parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.port" locked="false">110</parameter>

+          <parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>

+      </transportReceiver> -->

+

+    <!-- ================================================= -->

+    <!-- Transport Outs -->

+    <!-- ================================================= -->

+

+    <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+    <transportSender name="https" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>

+    </transportSender>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+   <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">

+       <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>

+       <parameter name="transport.mail.smtp.user" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.password" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.port" locked="false">25</parameter>

+   </transportSender>

+   -->

+<phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/s3.service.xml b/modules/rampart-integration/src/test/resources/security/s3.service.xml
new file mode 100644
index 0000000..12cf1c7
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s3.service.xml
@@ -0,0 +1,31 @@
+<service name="PingPort">
+	<parameter locked="false" name="ServiceClass">org.apache.axis2.oasis.ping.PingPortSkeleton</parameter>
+	<!--Mounting the method Ping-->
+	<operation name="Ping">
+		<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiverInOut"/>
+	</operation>    
+
+    <parameter name="InflowSecurity">
+      <action>
+        <items>Signature Encrypt Timestamp</items>
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+        <signaturePropFile>interop.properties</signaturePropFile>
+        <enableSignatureConfirmation>false</enableSignatureConfirmation>
+      </action>
+    </parameter>
+
+    <parameter name="OutflowSecurity">
+      <action>
+        <items>Signature Encrypt Timestamp</items>
+        <user>bob</user>
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+        <signaturePropFile>interop.properties</signaturePropFile>
+        <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+        <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+        <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
+        <encryptionUser>alice</encryptionUser>
+        <enableSignatureConfirmation>false</enableSignatureConfirmation>
+      </action>
+    </parameter>
+
+</service>
diff --git a/modules/rampart-integration/src/test/resources/security/s4.client.axis2.xml b/modules/rampart-integration/src/test/resources/security/s4.client.axis2.xml
new file mode 100644
index 0000000..58a3c95
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s4.client.axis2.xml
@@ -0,0 +1,135 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Scenario 4: Client's Configuration:START-->

+

+    <parameter name="OutflowSecurity">

+        <action>

+            <items>Signature Encrypt Timestamp</items>

+            <user>alice</user>

+            <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>

+            <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>

+            <encryptionKeyIdentifier>EmbeddedKeyName</encryptionKeyIdentifier>

+            <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>

+            <signaturePropFile>interop.properties</signaturePropFile>

+            <embeddedKeyCallbackClass>org.apache.axis2.security.PWCallback</embeddedKeyCallbackClass>

+            <embeddedKeyName>SessionKey</embeddedKeyName>

+        </action>

+    </parameter>

+

+    <parameter name="InflowSecurity">

+        <action>

+            <items>Signature Encrypt Timestamp</items>

+            <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>

+            <signaturePropFile>interop.properties</signaturePropFile>

+	    <isBSPCompliant>false</isBSPCompliant>
+        </action>

+    </parameter>

+

+    <!-- Scenario 4: Client's Configuration:END-->

+

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+   <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/s4.service.axis2.xml b/modules/rampart-integration/src/test/resources/security/s4.service.axis2.xml
new file mode 100644
index 0000000..2425853
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s4.service.axis2.xml
@@ -0,0 +1,144 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Engage the security module -->

+    <module ref="rampart"/>

+

+    <!-- ================================================= -->

+    <!-- Transport Ins -->

+    <!-- ================================================= -->

+    <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">

+        <parameter name="port" locked="false">6060</parameter>

+    </transportReceiver>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">

+          <parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>

+          <parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.port" locked="false">110</parameter>

+          <parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>

+      </transportReceiver> -->

+

+    <!-- ================================================= -->

+    <!-- Transport Outs -->

+    <!-- ================================================= -->

+

+    <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+    <transportSender name="https"

+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>

+    </transportSender>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+   <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">

+       <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>

+       <parameter name="transport.mail.smtp.user" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.password" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.port" locked="false">25</parameter>

+   </transportSender>

+   -->

+    <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/s4.service.xml b/modules/rampart-integration/src/test/resources/security/s4.service.xml
new file mode 100644
index 0000000..f39ab3e
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s4.service.xml
@@ -0,0 +1,31 @@
+<service name="PingPort">
+	<parameter locked="false" name="ServiceClass">org.apache.axis2.oasis.ping.PingPortSkeleton</parameter>
+	<!--Mounting the method Ping-->
+	<operation name="Ping">
+		<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiverInOut"/>
+	</operation>    
+
+    <parameter name="InflowSecurity">
+      <action>
+        <items>Signature Encrypt Timestamp</items>
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+        <signaturePropFile>interop.properties</signaturePropFile>
+	<isBSPCompliant>false</isBSPCompliant>
+      </action>
+    </parameter>
+
+    <parameter name="OutflowSecurity">
+      <action>
+        <items>Signature Encrypt Timestamp</items>
+        <user>bob</user>
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+        <signatureKeyIdentifier>SKIKeyIdentifier</signatureKeyIdentifier>
+        <encryptionKeyIdentifier>EmbeddedKeyName</encryptionKeyIdentifier>
+        <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
+        <signaturePropFile>interop.properties</signaturePropFile>
+        <embeddedKeyCallbackClass>org.apache.axis2.security.PWCallback</embeddedKeyCallbackClass>
+        <embeddedKeyName>SessionKey</embeddedKeyName>
+      </action>
+    </parameter>
+
+</service>
diff --git a/modules/rampart-integration/src/test/resources/security/s5.client.axis2.xml b/modules/rampart-integration/src/test/resources/security/s5.client.axis2.xml
new file mode 100644
index 0000000..cab64a1
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s5.client.axis2.xml
@@ -0,0 +1,132 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Scenario 5: Client's Configuration:START-->

+

+    <parameter name="OutflowSecurity">

+

+        <action>

+            <items>Signature</items>

+            <user>alice</user>

+            <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>

+            <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>

+            <signatureParts>{}{http://xmlsoap.org/Ping}ticket</signatureParts>

+            <signaturePropFile>interop.properties</signaturePropFile>

+        </action>

+

+        <action>

+            <items>Signature Timestamp</items>

+            <user>alice</user>

+            <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>

+            <signaturePropFile>interop.properties</signaturePropFile>

+        </action>

+

+    </parameter>

+

+    <!-- Scenario 5: Client's Configuration:END-->

+   

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+

+    <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/s5.service.axis2.xml b/modules/rampart-integration/src/test/resources/security/s5.service.axis2.xml
new file mode 100644
index 0000000..c144ce2
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s5.service.axis2.xml
@@ -0,0 +1,145 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Engage the security module -->

+    <module ref="rampart"/>

+

+    <!-- ================================================= -->

+    <!-- Transport Ins -->

+    <!-- ================================================= -->

+    <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">

+        <parameter name="port" locked="false">6060</parameter>

+    </transportReceiver>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">

+          <parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>

+          <parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.port" locked="false">110</parameter>

+          <parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>

+      </transportReceiver> -->

+

+    <!-- ================================================= -->

+    <!-- Transport Outs -->

+    <!-- ================================================= -->

+

+    <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+    <transportSender name="https"

+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>

+    </transportSender>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+   <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">

+       <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>

+       <parameter name="transport.mail.smtp.user" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.password" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.port" locked="false">25</parameter>

+   </transportSender>

+   -->

+

+   <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/s5.service.xml b/modules/rampart-integration/src/test/resources/security/s5.service.xml
new file mode 100644
index 0000000..6c9089d
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s5.service.xml
@@ -0,0 +1,16 @@
+<service name="PingPort">
+	<parameter locked="false" name="ServiceClass">org.apache.axis2.oasis.ping.PingPortSkeleton</parameter>
+	<!--Mounting the method Ping-->
+	<operation name="Ping">
+		<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiverInOut"/>
+	</operation>    
+
+    <parameter name="InflowSecurity">
+      <action>
+        <items>Signature Signature Timestamp</items>
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+        <signaturePropFile>interop.properties</signaturePropFile>
+      </action>
+    </parameter>
+
+</service>
diff --git a/modules/rampart-integration/src/test/resources/security/s6.client.axis2.xml b/modules/rampart-integration/src/test/resources/security/s6.client.axis2.xml
new file mode 100644
index 0000000..38f768b
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s6.client.axis2.xml
@@ -0,0 +1,135 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Scenario 6: Client's Configuration:START-->

+

+    <parameter name="OutflowSecurity">

+        <action>

+            <items>Encrypt Signature Timestamp</items>

+            <user>alice</user>

+            <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>

+            <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>

+            <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>

+            <encryptionUser>bob</encryptionUser>

+            <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>

+            <signaturePropFile>interop.properties</signaturePropFile>

+        </action>

+    </parameter>

+

+    <parameter name="InflowSecurity">

+        <action>

+            <items>Encrypt Signature Timestamp</items>

+            <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>

+            <signaturePropFile>interop.properties</signaturePropFile>

+        </action>

+    </parameter>

+

+    <!-- Scenario 6: Client's Configuration:END-->

+

+

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+

+    <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/s6.service.axis2.xml b/modules/rampart-integration/src/test/resources/security/s6.service.axis2.xml
new file mode 100644
index 0000000..6130df0
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s6.service.axis2.xml
@@ -0,0 +1,145 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Engage the security module -->

+    <module ref="rampart"/>

+

+    <!-- ================================================= -->

+    <!-- Transport Ins -->

+    <!-- ================================================= -->

+    <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">

+        <parameter name="port" locked="false">6060</parameter>

+    </transportReceiver>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">

+          <parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>

+          <parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.port" locked="false">110</parameter>

+          <parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>

+      </transportReceiver> -->

+

+    <!-- ================================================= -->

+    <!-- Transport Outs -->

+    <!-- ================================================= -->

+

+    <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+    <transportSender name="https"

+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>

+    </transportSender>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+   <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">

+       <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>

+       <parameter name="transport.mail.smtp.user" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.password" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.port" locked="false">25</parameter>

+   </transportSender>

+   -->

+

+  <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/s6.service.xml b/modules/rampart-integration/src/test/resources/security/s6.service.xml
new file mode 100644
index 0000000..c67c3d8
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s6.service.xml
@@ -0,0 +1,29 @@
+<service name="PingPort">
+	<parameter locked="false" name="ServiceClass">org.apache.axis2.oasis.ping.PingPortSkeleton</parameter>
+	<!--Mounting the method Ping-->
+	<operation name="Ping">
+		<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiverInOut"/>
+	</operation>    
+
+    <parameter name="InflowSecurity">
+      <action>
+        <items>Encrypt Signature Timestamp</items>
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+        <signaturePropFile>interop.properties</signaturePropFile>
+      </action>
+    </parameter>
+
+    <parameter name="OutflowSecurity">
+      <action>
+        <items>Encrypt Signature Timestamp</items>
+        <user>bob</user>
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+        <encryptionKeyIdentifier>DirectReference</encryptionKeyIdentifier>
+        <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
+        <encryptionUser>alice</encryptionUser>
+        <signatureKeyIdentifier>SKIKeyIdentifier</signatureKeyIdentifier>
+        <signaturePropFile>interop.properties</signaturePropFile>
+      </action>
+    </parameter>
+
+</service>
diff --git a/modules/rampart-integration/src/test/resources/security/s7.client.axis2.xml b/modules/rampart-integration/src/test/resources/security/s7.client.axis2.xml
new file mode 100644
index 0000000..53086c2
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s7.client.axis2.xml
@@ -0,0 +1,135 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Scenario 7: Client's Configuration:START-->

+

+    <parameter name="OutflowSecurity">

+        <action>

+            <items>Signature Encrypt Timestamp</items>

+            <user>alice</user>

+            <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>

+            <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>

+            <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>

+            <encryptionUser>bob</encryptionUser>

+            <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>

+            <signaturePropFile>interop.properties</signaturePropFile>

+            <encryptionPropFile>interop.properties</encryptionPropFile>

+            <signatureParts>{}{http://schemas.xmlsoap.org/soap/envelope/}Body;STRTransform</signatureParts>

+        </action>

+    </parameter>

+

+    <parameter name="InflowSecurity">

+        <action>

+            <items>Signature Encrypt Timestamp</items>

+            <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>

+            <signaturePropFile>interop.properties</signaturePropFile>

+            <decryptionPropFile>interop.properties</decryptionPropFile>

+        </action>

+    </parameter>

+

+    <!-- Scenario 7: Client's Configuration:END-->

+

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+   <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/s7.service.axis2.xml b/modules/rampart-integration/src/test/resources/security/s7.service.axis2.xml
new file mode 100644
index 0000000..7d39a93
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s7.service.axis2.xml
@@ -0,0 +1,146 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Engage the security module -->

+    <module ref="rampart"/>

+

+

+    <!-- ================================================= -->

+    <!-- Transport Ins -->

+    <!-- ================================================= -->

+    <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">

+        <parameter name="port" locked="false">6060</parameter>

+    </transportReceiver>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">

+          <parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>

+          <parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.port" locked="false">110</parameter>

+          <parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>

+      </transportReceiver> -->

+

+    <!-- ================================================= -->

+    <!-- Transport Outs -->

+    <!-- ================================================= -->

+

+    <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+    <transportSender name="https"

+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>

+    </transportSender>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+   <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">

+       <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>

+       <parameter name="transport.mail.smtp.user" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.password" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.port" locked="false">25</parameter>

+   </transportSender>

+   -->

+   <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/s7.service.xml b/modules/rampart-integration/src/test/resources/security/s7.service.xml
new file mode 100644
index 0000000..f8111e7
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/s7.service.xml
@@ -0,0 +1,31 @@
+<service name="PingPort">
+	<parameter locked="false" name="ServiceClass">org.apache.axis2.oasis.ping.PingPortSkeleton</parameter>
+	<!--Mounting the method Ping-->
+	<operation name="Ping">
+		<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiverInOut"/>
+	</operation> 
+
+    <parameter name="InflowSecurity">
+      <action>
+        <items>Signature Encrypt Timestamp</items>
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+        <signaturePropFile>interop.properties</signaturePropFile>
+        <decryptionPropFile>interop.properties</decryptionPropFile>
+      </action>
+    </parameter>
+
+    <parameter name="OutflowSecurity">
+      <action>
+        <items>Signature Encrypt Timestamp</items>
+        <user>bob</user>
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+        <encryptionKeyIdentifier>DirectReference</encryptionKeyIdentifier>
+        <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
+        <encryptionUser>alice</encryptionUser>
+        <signatureKeyIdentifier>SKIKeyIdentifier</signatureKeyIdentifier>
+        <signaturePropFile>interop.properties</signaturePropFile>
+        <encryptionPropFile>interop.properties</encryptionPropFile>
+      </action>
+    </parameter>
+
+</service>
diff --git a/modules/rampart-integration/src/test/resources/security/sST1.client.axis2.xml b/modules/rampart-integration/src/test/resources/security/sST1.client.axis2.xml
new file mode 100644
index 0000000..6af6407
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/sST1.client.axis2.xml
@@ -0,0 +1,119 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Scenario ST1: Client's Configuration:START-->

+

+    <parameter name="OutflowSecurity">

+        <action>

+            <items>Timestamp SAMLTokenUnsigned</items>

+            <samlPropFile>axis2.saml.properties</samlPropFile>

+        </action>

+    </parameter>

+

+    <!-- Scenario ST1: Client's Configuration:END-->

+   

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+

+    <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/sST1.service.axis2.xml b/modules/rampart-integration/src/test/resources/security/sST1.service.axis2.xml
new file mode 100644
index 0000000..4a0c614
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/sST1.service.axis2.xml
@@ -0,0 +1,145 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Engage the security module -->

+    <module ref="rampart"/>

+

+    <!-- ================================================= -->

+    <!-- Transport Ins -->

+    <!-- ================================================= -->

+    <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">

+        <parameter name="port" locked="false">6060</parameter>

+    </transportReceiver>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">

+          <parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>

+          <parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.port" locked="false">110</parameter>

+          <parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>

+      </transportReceiver> -->

+

+    <!-- ================================================= -->

+    <!-- Transport Outs -->

+    <!-- ================================================= -->

+

+    <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+    <transportSender name="https"

+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>

+    </transportSender>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+   <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">

+       <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>

+       <parameter name="transport.mail.smtp.user" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.password" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.port" locked="false">25</parameter>

+   </transportSender>

+   -->

+    <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/sST1.service.xml b/modules/rampart-integration/src/test/resources/security/sST1.service.xml
new file mode 100644
index 0000000..1bb5dc7
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/sST1.service.xml
@@ -0,0 +1,14 @@
+<service name="PingPort">
+	<parameter locked="false" name="ServiceClass">org.apache.axis2.oasis.ping.PingPortSkeleton</parameter>
+	<!--Mounting the method Ping-->
+	<operation name="Ping">
+		<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiverInOut"/>
+	</operation>    
+
+    <parameter name="InflowSecurity">
+      <action>
+        <items>Timestamp SAMLTokenUnsigned</items>
+      </action>
+    </parameter>
+
+</service>
diff --git a/modules/rampart-integration/src/test/resources/security/sc/s1-services.xml b/modules/rampart-integration/src/test/resources/security/sc/s1-services.xml
new file mode 100644
index 0000000..1d92054
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/sc/s1-services.xml
@@ -0,0 +1,84 @@
+<service name="SecureService">

+

+	<module ref="rampart"/>

+	<module ref="rahas"/>

+

+	<parameter locked="false" name="ServiceClass">org.apache.axis2.security.sc.Service</parameter>

+

+	<operation name="echo">

+		<messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+		<actionMapping>urn:echo</actionMapping>

+	</operation>

+

+ <!--   <parameter name="sct-issuer-config">

+		<sct-issuer-config>

+			<proofToken>EncryptedKey</proofToken>

+			<cryptoProperties>sctIssuer.properties</cryptoProperties>

+			<addRequestedAttachedRef />

+		</sct-issuer-config>

+    </parameter>-->

+

+    <parameter name="sct-issuer-config">

+        <sct-issuer-config>

+            <addRequestedAttachedRef/>

+            <addRequestedUnattachedRef/>

+            <cryptoProperties>

+               <crypto provider="org.apache.ws.security.components.crypto.Merlin">

+                    <property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</property>

+                    <property name="org.apache.ws.security.crypto.merlin.file">sts.jks</property>

+                    <property name="org.apache.ws.security.crypto.merlin.keystore.password">password</property>

+                </crypto>

+            </cryptoProperties>

+

+            <!--

+               Key computation mechanism

+               1 - Use Request Entropy

+               2 - Provide Entropy

+               3 - Use Own Key

+            -->

+            <keyComputation>3</keyComputation>

+

+            <!--

+               proofKeyType element is valid only if the keyComputation is set to 3

+               i.e. Use Own Key

+

+               Valid values are: EncryptedKey & BinarySecret

+            -->

+            <proofKeyType>EncryptedKey</proofKeyType>

+        </sct-issuer-config>

+    </parameter>

+

+     <parameter name="token-canceler-config">

+		<token-canceler-config>

+			<!--<proofToken>EncryptedKey</proofToken>-->

+			<!--<cryptoProperties>sctIssuer.properties</cryptoProperties>-->

+			<!--<addRequestedAttachedRef />-->

+		</token-canceler-config>

+    </parameter>

+

+    <parameter xmlns="" name="sc-configuration">

+		<sc-configuration xmlns="">

+			<scope xmlns="">service</scope>

+			<passwordCallbackClass xmlns="">org.apache.axis2.security.sc.PWCallback</passwordCallbackClass>

+			<cryptoProperties xmlns="">sctIssuer.properties</cryptoProperties>

+		</sc-configuration>

+    </parameter>

+

+    <parameter name="InflowSecurity">

+      <action>

+        <items>Timestamp Signature</items>

+        <signaturePropFile>sctIssuer.properties</signaturePropFile>

+      </action>

+    </parameter>

+

+    <parameter name="OutflowSecurity">

+      <action>

+        <items>Timestamp Signature Encrypt</items>

+        <encryptionUser>useReqSigCert</encryptionUser>

+        <user>sts</user>

+        <signaturePropFile xmlns="">sctIssuer.properties</signaturePropFile>

+	<passwordCallbackClass xmlns="">org.apache.axis2.security.sc.PWCallback</passwordCallbackClass>

+      </action>

+    </parameter>

+

+</service>

diff --git a/modules/rampart-integration/src/test/resources/security/sc/s2-services.xml b/modules/rampart-integration/src/test/resources/security/sc/s2-services.xml
new file mode 100644
index 0000000..8c942a6
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/sc/s2-services.xml
@@ -0,0 +1,64 @@
+<service name="SecureService">

+

+	<module ref="rampart"/>

+	<module ref="rahas"/>

+

+	<parameter locked="false" name="ServiceClass">org.apache.axis2.security.sc.Service</parameter>

+

+	<operation name="echo">

+		<messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+		<actionMapping>urn:echo</actionMapping>

+	</operation>    

+

+    <parameter name="sct-issuer-config">

+		<sct-issuer-config>

+			<addRequestedAttachedRef />

+			<addRequestedUnattachedRef />

+            <cryptoProperties>

+               <crypto provider="org.apache.ws.security.components.crypto.Merlin">

+                    <property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</property>

+                    <property name="org.apache.ws.security.crypto.merlin.file">sts.jks</property>

+                    <property name="org.apache.ws.security.crypto.merlin.keystore.password">password</property>

+                </crypto>

+            </cryptoProperties>

+

+            <!--

+               Key computation mechanism

+               1 - Use Request Entropy

+               2 - Provide Entropy

+               3 - Use Own Key

+            -->

+            <keyComputation>3</keyComputation>

+

+            <!--

+               proofKeyType element is valid only if the keyComputation is set to 3

+               i.e. Use Own Key

+

+               Valid values are: EncryptedKey & BinarySecret

+            -->

+            <proofKeyType>BinarySecret</proofKeyType>

+        </sct-issuer-config>

+    </parameter>

+    

+    <parameter xmlns="" name="sc-configuration">

+		<sc-configuration xmlns="">

+			<scope xmlns="">service</scope>

+			<passwordCallbackClass xmlns="">org.apache.axis2.security.sc.PWCallback</passwordCallbackClass>

+			<cryptoProperties xmlns="">sctIssuer.properties</cryptoProperties>

+		</sc-configuration>

+	</parameter>

+

+    <parameter name="InflowSecurity">

+      <action>

+        <items>Timestamp Signature</items>

+        <signaturePropFile>sctIssuer.properties</signaturePropFile>

+      </action>

+    </parameter>

+

+    <parameter name="OutflowSecurity">

+      <action>

+        <items>Timestamp</items>

+      </action>

+    </parameter>

+    

+</service>

diff --git a/modules/rampart-integration/src/test/resources/security/sc/s3-services.xml b/modules/rampart-integration/src/test/resources/security/sc/s3-services.xml
new file mode 100644
index 0000000..754a0ca
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/sc/s3-services.xml
@@ -0,0 +1,66 @@
+<service name="SecureService">

+

+	<module ref="rampart"/>

+

+	<parameter locked="false" name="ServiceClass">org.apache.axis2.security.sc.Service</parameter>

+

+	<operation name="echo">

+		<messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+		<actionMapping>urn:echo</actionMapping>

+	</operation>    

+

+    <parameter name="sct-issuer-config">

+		<sct-issuer-config>

+            <cryptoProperties>

+               <crypto provider="org.apache.ws.security.components.crypto.Merlin">

+                    <property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</property>

+                    <property name="org.apache.ws.security.crypto.merlin.file">sts.jks</property>

+                    <property name="org.apache.ws.security.crypto.merlin.keystore.password">password</property>

+                </crypto>

+            </cryptoProperties>

+            <addRequestedAttachedRef />

+

+            <!--

+               Key computation mechanism

+               1 - Use Request Entropy

+               2 - Provide Entropy

+               3 - Use Own Key

+            -->

+            <keyComputation>3</keyComputation>

+

+            <!--

+               proofKeyType element is valid only if the keyComputation is set to 3

+               i.e. Use Own Key

+

+               Valid values are: EncryptedKey & BinarySecret

+            -->

+            <proofKeyType>BinarySecret</proofKeyType>

+        </sct-issuer-config>

+    </parameter>

+    

+    <parameter xmlns="" name="sc-configuration">

+		<sc-configuration xmlns="">

+			<scope xmlns="">service</scope>

+			<passwordCallbackClass xmlns="">org.apache.axis2.security.sc.PWCallback</passwordCallbackClass>

+			<cryptoProperties xmlns="">sctIssuer.properties</cryptoProperties>

+		</sc-configuration>

+    </parameter>

+

+    <parameter name="InflowSecurity">

+      <action>

+        <items>Timestamp Signature</items>

+        <signaturePropFile>sctIssuer.properties</signaturePropFile>

+      </action>

+    </parameter>

+

+    <parameter name="OutflowSecurity">

+      <action>

+        <items>Timestamp Signature Encrypt</items>

+        <encryptionUser>useReqSigCert</encryptionUser>

+        <user>sts</user>

+        <signaturePropFile xmlns="">sctIssuer.properties</signaturePropFile>

+	<passwordCallbackClass xmlns="">org.apache.axis2.security.sc.PWCallback</passwordCallbackClass>

+      </action>

+    </parameter>

+    

+</service>

diff --git a/modules/rampart-integration/src/test/resources/security/sc/s4-services.xml b/modules/rampart-integration/src/test/resources/security/sc/s4-services.xml
new file mode 100644
index 0000000..50b850a
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/sc/s4-services.xml
@@ -0,0 +1,67 @@
+<service name="SecureService">

+

+	<module ref="rampart"/>

+	<module ref="rahas"/>

+

+	<parameter locked="false" name="ServiceClass">org.apache.axis2.security.sc.Service</parameter>

+

+	<operation name="echo">

+		<messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+		<actionMapping>urn:echo</actionMapping>

+	</operation>    

+

+    <parameter name="sct-issuer-config">

+		<sct-issuer-config>

+            <cryptoProperties>

+               <crypto provider="org.apache.ws.security.components.crypto.Merlin">

+                    <property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</property>

+                    <property name="org.apache.ws.security.crypto.merlin.file">sts.jks</property>

+                    <property name="org.apache.ws.security.crypto.merlin.keystore.password">password</property>

+                </crypto>

+            </cryptoProperties>

+            <addRequestedAttachedRef />

+

+            <!--

+               Key computation mechanism

+               1 - Use Request Entropy

+               2 - Provide Entropy

+               3 - Use Own Key

+            -->

+            <keyComputation>3</keyComputation>

+

+            <!--

+               proofKeyType element is valid only if the keyComputation is set to 3

+               i.e. Use Own Key

+

+               Valid values are: EncryptedKey & BinarySecret

+            -->

+            <proofKeyType>BinarySecret</proofKeyType>

+        </sct-issuer-config>

+    </parameter>

+    

+    <parameter xmlns="" name="sc-configuration">

+		<sc-configuration xmlns="">

+			<scope xmlns="">service</scope>

+			<passwordCallbackClass xmlns="">org.apache.axis2.security.sc.PWCallback</passwordCallbackClass>

+			<cryptoProperties xmlns="">sctIssuer.properties</cryptoProperties>

+		</sc-configuration>

+    </parameter>

+

+    <parameter name="InflowSecurity">

+      <action>

+        <items>Timestamp Signature</items>

+        <signaturePropFile>sctIssuer.properties</signaturePropFile>

+      </action>

+    </parameter>

+

+    <parameter name="OutflowSecurity">

+      <action>

+        <items>Timestamp Signature Encrypt</items>

+        <encryptionUser>useReqSigCert</encryptionUser>

+        <user>sts</user>

+        <signaturePropFile xmlns="">sctIssuer.properties</signaturePropFile>

+	<passwordCallbackClass xmlns="">org.apache.axis2.security.sc.PWCallback</passwordCallbackClass>

+      </action>

+    </parameter>

+    

+</service>

diff --git a/modules/rampart-integration/src/test/resources/security/sc/sctIssuer.properties b/modules/rampart-integration/src/test/resources/security/sc/sctIssuer.properties
new file mode 100755
index 0000000..c126c57
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/sc/sctIssuer.properties
@@ -0,0 +1,4 @@
+org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=password
+org.apache.ws.security.crypto.merlin.file=sts.jks
diff --git a/modules/rampart-integration/src/test/resources/security/sc/sec.jks b/modules/rampart-integration/src/test/resources/security/sc/sec.jks
new file mode 100755
index 0000000..7af24b2
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/sc/sec.jks
Binary files differ
diff --git a/modules/rampart-integration/src/test/resources/security/sc/sec.properties b/modules/rampart-integration/src/test/resources/security/sc/sec.properties
new file mode 100755
index 0000000..3c3298d
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/sc/sec.properties
@@ -0,0 +1,5 @@
+org.apache.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=password
+org.apache.ws.security.crypto.merlin.file=sec.jks
+
diff --git a/modules/rampart-integration/src/test/resources/security/sc/sts.jks b/modules/rampart-integration/src/test/resources/security/sc/sts.jks
new file mode 100644
index 0000000..2db0a7c
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/sc/sts.jks
Binary files differ
diff --git a/modules/rampart-integration/src/test/resources/security/secMtom.client.axis2.xml b/modules/rampart-integration/src/test/resources/security/secMtom.client.axis2.xml
new file mode 100644
index 0000000..9d1a37b
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/secMtom.client.axis2.xml
@@ -0,0 +1,136 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+    

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Scenario 3 with MTOM: Client's Configuration:START-->

+

+    <parameter name="OutflowSecurity">

+        <action>

+            <items>Signature Encrypt Timestamp</items>

+            <user>alice</user>

+            <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>

+            <signaturePropFile>interop.properties</signaturePropFile>

+            <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>

+            <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>

+            <encryptionUser>bob</encryptionUser>

+

+            <optimizeParts>//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</optimizeParts>

+        </action>

+    </parameter>

+

+    <parameter name="InflowSecurity">

+        <action>

+            <items>Signature Encrypt Timestamp</items>

+            <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>

+            <signaturePropFile>interop.properties</signaturePropFile>

+        </action>

+    </parameter>

+

+    <!-- Scenario 3 with MTOM: Client's Configuration:END-->

+

+

+   

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.0</parameter>

+    </transportSender>

+

+  <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/secMtom.service.axis2.xml b/modules/rampart-integration/src/test/resources/security/secMtom.service.axis2.xml
new file mode 100644
index 0000000..092a6d7
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/secMtom.service.axis2.xml
@@ -0,0 +1,146 @@
+<axisconfig name="AxisJava2.0">

+    <parameter name="hotdeployment" locked="false">true</parameter>

+    <parameter name="hotupdate" locked="false">true</parameter>

+    <parameter name="enableMTOM" locked="false">true</parameter>

+

+    <!-- ================================================= -->

+    <!-- Deployers -->

+    <!-- ================================================= -->

+

+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->

+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">

+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>

+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>

+    </deployer>

+    

+    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>

+

+    <!-- Engage the security module -->

+    <module ref="rampart"/>

+

+    <!-- ================================================= -->

+    <!-- Transport Ins -->

+    <!-- ================================================= -->

+    <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">

+        <parameter name="port" locked="false">6060</parameter>

+    </transportReceiver>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">

+          <parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>

+          <parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>

+          <parameter name="transport.mail.pop3.port" locked="false">110</parameter>

+          <parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>

+      </transportReceiver> -->

+

+    <!-- ================================================= -->

+    <!-- Transport Outs -->

+    <!-- ================================================= -->

+

+    <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>

+    <transportSender name="http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>

+    </transportSender>

+    <transportSender name="https"

+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">

+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>

+    </transportSender>

+

+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver

+   <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">

+       <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>

+       <parameter name="transport.mail.smtp.user" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.password" locked="false">axis2</parameter>

+       <parameter name="transport.mail.smtp.port" locked="false">25</parameter>

+   </transportSender>

+   -->

+

+   <phaseOrder type="InFlow">

+        <!--  System predefined phases       -->

+        <phase name="Transport">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">

+                <order phase="Transport"/>

+            </handler>

+        </phase>

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--  System predefined phases       -->

+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->

+        <phase name="OperationInPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutPhase"/>

+        <!--system predefined phase-->

+        <!--these phase will run irrespective of the service-->

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>

+        <phase name="Security"/>

+    </phaseOrder>

+    <phaseOrder type="InFaultFlow">

+        <phase name="Addressing">

+             <handler name="AddressingBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">

+                 <order phase="Addressing"/>

+            </handler>

+        </phase>

+        <phase name="Security"/>

+        <phase name="PreDispatch"/>

+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">

+            <handler name="RequestURIBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>

+            <handler name="SOAPActionBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>

+            <handler name="RequestURIOperationDispatcher"

+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>

+            <handler name="SOAPMessageBodyBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>

+

+            <handler name="HTTPLocationBasedDispatcher"

+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>

+        </phase>

+        <phase name="RMPhase"/>

+        <!--      user can add his own phases to this area  -->

+        <phase name="OperationInFaultPhase"/>

+        <phase name="soapmonitorPhase"/>

+    </phaseOrder>

+    <phaseOrder type="OutFaultFlow">

+        <!--      user can add his own phases to this area  -->

+        <phase name="soapmonitorPhase"/>

+        <phase name="OperationOutFaultPhase"/>

+        <phase name="RMPhase"/>

+        <phase name="PolicyDetermination"/>

+        <phase name="MessageOut"/>
+        <phase name="Security"/>

+    </phaseOrder>

+</axisconfig>

+

diff --git a/modules/rampart-integration/src/test/resources/security/secMtom.service.xml b/modules/rampart-integration/src/test/resources/security/secMtom.service.xml
new file mode 100644
index 0000000..45f7a1f
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/security/secMtom.service.xml
@@ -0,0 +1,31 @@
+<service name="PingPort">
+	<parameter locked="false" name="ServiceClass">org.apache.axis2.oasis.ping.PingPortSkeleton</parameter>
+	<!--Mounting the method Ping-->
+	<operation name="Ping">
+		<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiverInOut"/>
+	</operation>    
+
+
+    <parameter name="InflowSecurity">
+      <action>
+        <items>Signature Encrypt Timestamp</items>
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+        <signaturePropFile>interop.properties</signaturePropFile>
+      </action>
+    </parameter>
+
+    <parameter name="OutflowSecurity">
+      <action>
+        <items>Signature Encrypt Timestamp</items>
+        <user>bob</user>
+        <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+        <signaturePropFile>interop.properties</signaturePropFile>
+        <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+        <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+        <encryptionUser>alice</encryptionUser>
+
+        <optimizeParts>//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</optimizeParts>
+      </action>
+    </parameter>
+
+</service>
diff --git a/modules/rampart-mar/module.xml b/modules/rampart-mar/module.xml
index 4712a47..31a7f44 100644
--- a/modules/rampart-mar/module.xml
+++ b/modules/rampart-mar/module.xml
@@ -9,6 +9,9 @@
         <handler name="PolicyBasedSecurityInHandler" class="org.apache.rampart.handler.RampartReceiver">
             <order phase="Security" phaseFirst="true"/>
         </handler>
+        <handler name="SecurityInHandler" class="org.apache.rampart.handler.WSDoAllReceiver">
+            <order phase="Security"/>
+        </handler>
         <handler name="PostDispatchVerificationHandler" class="org.apache.rampart.handler.PostDispatchVerificationHandler">
             <order phase="Dispatch" phaseLast="true"/>
         </handler>
@@ -16,12 +19,18 @@
     </InFlow>
 
     <OutFlow>
+        <handler name="SecurityOutHandler" class="org.apache.rampart.handler.WSDoAllSender">
+            <order phase="Security"/>
+        </handler>
         <handler name="PolicyBasedSecurityOutHandler" class="org.apache.rampart.handler.RampartSender">
             <order phase="Security" phaseLast="true"/>
         </handler>
     </OutFlow>
     
     <OutFaultFlow>
+        <handler name="SecurityOutHandler" class="org.apache.rampart.handler.WSDoAllSender">
+            <order phase="Security"/>
+        </handler>
         <handler name="PolicyBasedSecurityOutHandler" class="org.apache.rampart.handler.RampartSender">
             <order phase="Security" phaseLast="true"/>
         </handler>
@@ -31,9 +40,12 @@
         <handler name="PolicyBasedSecurityInHandler" class="org.apache.rampart.handler.RampartReceiver">
             <order phase="Security" phaseFirst="true"/>
         </handler>
+        <handler name="SecurityInHandler" class="org.apache.rampart.handler.WSDoAllReceiver">
+            <order phase="Security"/>
+        </handler>
     </InFaultFlow>
     
-    <supported-policy-namespaces namespaces="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"/>
+    <supported-policy-namespaces namespaces="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"/>
     <local-policy-assertions>
     	<rampart:RampartConfig xmlns:rampart="http://ws.apache.org/rampart/policy" />
     </local-policy-assertions>
diff --git a/modules/rampart-samples/README.txt b/modules/rampart-samples/README.txt
index a0cb26a..136798c 100644
--- a/modules/rampart-samples/README.txt
+++ b/modules/rampart-samples/README.txt
@@ -4,6 +4,9 @@
 
 This directory contains three sub directories:
 
+    - basic - A set of samples that uses basic rampart configuration using 
+    	          parameters
+
     - policy - A set of samples that uses rampart with WS-SecurityPolicy
     
     - keys   - The keystore files that contains the keys used by the samples
diff --git a/modules/rampart-samples/basic/README.txt b/modules/rampart-samples/basic/README.txt
new file mode 100644
index 0000000..18f66b1
--- /dev/null
+++ b/modules/rampart-samples/basic/README.txt
@@ -0,0 +1,44 @@
+********************************************************************************
+**************************** Apache Rampart Samples ****************************
+********************************************************************************
+
+This is a set of Apache Rampart samples which uses configuraiton parameters 
+to configure rampart.
+
+Each "sampleX" directory contains :
+
+    - client.axis2.xml - Client configuration
+    - services.xml - Service configuration
+    - src - Source of the sample
+    - README.txt - you have to read this :-)
+
+We use two parameters named "InflowSecurity" and "OutflowSecurity" within
+these files to configure rampart.
+
+01.) Rampart Engaged and no configuration
+02.) UsernameToken authentication
+03.) UsernameToken authentication with a plain text password
+04.) Message integrity and non-repudiation with signature
+05.) Encryption
+06.) Sign and encrypt a messages
+07.) Encrypt and sign messages
+08.) Signing twice
+09.) Encryption with a key known to both parties
+10.) MTOM Optimizing base64 content in the secured message
+11.) Dynamic configuration : Get rid of the config files ... let's use code!
+
+You can use the ant build script provided here to run these samples.
+
+Exmaple: Running sample - 01
+    - Start two shell instnaces and change to the directory where this file is
+    - To start the service: 
+      $ ant service.01
+    - To run client: 
+      $ ant client.01
+
+--------------------------------------------------------------------------------
+NOTE: To view the messages exchanged
+    - Change the "client.port" property in the "build.xml" to an available port
+    	  E.g. : <property name="client.port" value="9080"/>
+    	- Setup tcpmon (http://ws.apache.org/commons/tcpmon/) to listen on the above
+    	  port and to point to port 8080 (value of the service.port property)
\ No newline at end of file
diff --git a/modules/rampart-samples/basic/build.xml b/modules/rampart-samples/basic/build.xml
new file mode 100644
index 0000000..294e020
--- /dev/null
+++ b/modules/rampart-samples/basic/build.xml
@@ -0,0 +1,265 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ !
+ ! Copyright 2006 The Apache Software Foundation.
+ !
+ ! Licensed under the Apache License, Version 2.0 (the "License");
+ ! you may not use this file except in compliance with the License.
+ ! You may obtain a copy of the License at
+ !
+ !      http://www.apache.org/licenses/LICENSE-2.0
+ !
+ ! Unless required by applicable law or agreed to in writing, software
+ ! distributed under the License is distributed on an "AS IS" BASIS,
+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ ! See the License for the specific language governing permissions and
+ ! limitations under the License.
+ !-->
+<project basedir="." default="clean">
+
+	<property name="service.repos.dir" value="build/service_repositories"/>
+	<property name="client.repos.dir" value="build/client_repositories"/>
+	<property name="temp.dir" value="build/temp"/>
+	<property name="keys.dir" value="../keys"/>
+	<property name="temp.client.dir" value="build/temp_client"/>
+	
+	<property name="client.port" value="8080"/>
+	<property name="server.port" value="8080"/>
+	
+	<property name="sample.services.url" value="http://localhost:${client.port}/axis2/services"/>
+	
+    <property environment="env"/>
+    	
+    <property name="lib.dir" value="${env.AXIS2_HOME}/lib"/>
+    
+    <path id="runtime.classpath">
+        <fileset dir="${lib.dir}">
+            <include name="**/*.jar"/>
+        </fileset>
+        <pathelement location="${env.AXIS2_HOME}/conf"/>
+    </path>
+    
+	<target name="check.dependency" unless="env.AXIS2_HOME">
+        <echo message="AXIS2_HOME must be set"/>
+    </target>
+	
+	<!-- Sample Service 01 -->
+	<target name="service.01" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.service.repo sample.number="01"/>
+	</target>
+
+	<!-- Sample Client 01 -->
+	<target name="client.01" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.and.run.client sample.number="01"/>
+	</target>
+	
+	<!-- Sample Service 02 -->
+	<target name="service.02" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.service.repo sample.number="02"/>
+	</target>
+
+	<!-- Sample Client 02 -->
+	<target name="client.02" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.and.run.client sample.number="02"/>
+	</target>
+
+	<!-- Sample Service 03 -->
+	<target name="service.03" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.service.repo sample.number="03"/>
+	</target>
+
+	<!-- Sample Client 03 -->
+	<target name="client.03" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.and.run.client sample.number="03"/>
+	</target>
+
+	<!-- Sample Service 04 -->
+	<target name="service.04" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.service.repo sample.number="04"/>
+	</target>
+
+	<!-- Sample Client 04 -->
+	<target name="client.04" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.and.run.client sample.number="04"/>
+	</target>
+
+	<!-- Sample Service 05 -->
+	<target name="service.05" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.service.repo sample.number="05"/>
+	</target>
+
+	<!-- Sample Client 05 -->
+	<target name="client.05" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.and.run.client sample.number="05"/>
+	</target>
+	
+	<!-- Sample Service 06 -->
+	<target name="service.06" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.service.repo sample.number="06"/>
+	</target>
+
+	<!-- Sample Client 06 -->
+	<target name="client.06" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.and.run.client sample.number="06"/>
+	</target>
+	
+	<!-- Sample Service 07 -->
+	<target name="service.07" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.service.repo sample.number="07"/>
+	</target>
+
+	<!-- Sample Client 07 -->
+	<target name="client.07" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.and.run.client sample.number="07"/>
+	</target>
+
+	<!-- Sample Service 08 -->
+	<target name="service.08" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.service.repo sample.number="08"/>
+	</target>
+
+	<!-- Sample Client 08 -->
+	<target name="client.08" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.and.run.client sample.number="08"/>
+	</target>
+
+	<!-- Sample Service 09 -->
+	<target name="service.09" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.service.repo sample.number="09"/>
+	</target>
+
+	<!-- Sample Client 09 -->
+	<target name="client.09" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.and.run.client sample.number="09"/>
+	</target>
+
+	<!-- Sample Service 10 -->
+	<target name="service.10" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.service.repo sample.number="10"/>
+	</target>
+
+	<!-- Sample Client 10 -->
+	<target name="client.10" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.and.run.client sample.number="10"/>
+	</target>
+	
+	<!-- Sample Service 11 -->
+	<target name="service.11" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.service.repo sample.number="11"/>
+	</target>
+
+	<!-- Sample Client 11 -->
+	<target name="client.11" if="env.AXIS2_HOME" depends="check.dependency">
+		<create.and.run.client sample.number="11"/>
+	</target>
+	
+	
+	<target name="clean">
+		<delete dir="build" />
+	</target>
+	
+	<!-- Macro to create a service repo for a given sample -->
+	<macrodef name="create.service.repo">
+	   	<attribute name="sample.number" default="sample"/>
+	   	<sequential>
+	   		
+	   		<property name="modules.dir" value="${env.AXIS2_HOME}/repository/modules/"/>
+	   		
+	   		<mkdir dir="${service.repos.dir}/sample@{sample.number}"/>
+	   		<mkdir dir="${service.repos.dir}/sample@{sample.number}/services"/>
+	   		<mkdir dir="${service.repos.dir}/sample@{sample.number}/modules"/>
+	   		
+	   		<!-- copy modules -->
+	   		<copy todir="${service.repos.dir}/sample@{sample.number}/modules">
+	   		    <fileset dir="${modules.dir}">
+	   		        <include name="addressing-*.mar"/>
+	   		        <include name="rampart-*.mar"/>
+	   		    </fileset>
+	   		</copy>
+	   		
+	   		<!-- create service -->
+	   		<mkdir dir="${temp.dir}"/>
+	   		<mkdir dir="${temp.dir}/META-INF"/>
+	   		
+	   		<!-- Compile service -->
+            <javac srcdir="sample@{sample.number}/src" destdir="${temp.dir}">
+                    <classpath>
+                            <fileset dir="${lib.dir}">
+                                    <include name="**/*.jar"/>
+                            </fileset>
+                    </classpath>
+                    <exclude name="**/Client.java"/>
+            </javac>
+	   		
+	   		<copy file="sample@{sample.number}/services.xml" tofile="${temp.dir}/META-INF/services.xml" overwrite="true"/>
+	   		<copy file="${keys.dir}/service.jks" tofile="${temp.dir}/service.jks" overwrite="true"/>
+	   		<copy file="${keys.dir}/service.properties" tofile="${temp.dir}/service.properties" overwrite="true"/>
+
+	   		<jar destfile="${service.repos.dir}/sample@{sample.number}/services/sample@{sample.number}.aar">
+				<fileset dir="${temp.dir}"></fileset>
+			</jar>
+	   		
+			<delete dir="${temp.dir}" />
+	   		<!-- start SimpleHTTPserver -->
+            <java classname="org.apache.axis2.transport.http.SimpleHTTPServer" fork="true">
+                    <arg value="${service.repos.dir}/sample@{sample.number}"/>
+                    <arg value="-p${server.port}"/>
+                	<classpath refid="runtime.classpath"/>
+            </java>
+
+	   </sequential>
+	</macrodef>
+
+	<macrodef name="create.and.run.client">
+	   	<attribute name="sample.number" default="sample"/>
+	   	<sequential>
+	   		
+	   		<property name="modules.dir" value="${env.AXIS2_HOME}/repository/modules/"/>
+	   		
+	   		<!-- Create the client repo -->
+	   		<mkdir dir="${client.repos.dir}/sample@{sample.number}"/>
+	   		<mkdir dir="${client.repos.dir}/sample@{sample.number}/conf"/>
+	   		<mkdir dir="${client.repos.dir}/sample@{sample.number}/modules"/>
+	   		
+	   		<!-- Copy axis2.xml file -->
+	   		<copy file="sample@{sample.number}/client.axis2.xml" tofile="${client.repos.dir}/sample@{sample.number}/conf/axis2.xml" overwrite="true"/>
+	   		
+	   		<!-- copy modules -->
+	   		<copy todir="${client.repos.dir}/sample@{sample.number}/modules">
+	   		    <fileset dir="${modules.dir}">
+	   		        <include name="addressing-*.mar"/>
+	   		        <include name="rampart-*.mar"/>
+	   		    </fileset>
+	   		</copy>
+	   		
+	   		<mkdir dir="${temp.client.dir}"/>
+	   		
+	   		<!-- Compile client -->
+            <javac srcdir="sample@{sample.number}/src" destdir="${temp.client.dir}">
+                    <classpath>
+	                    <fileset dir="${lib.dir}">
+                            <include name="**/*.jar"/>
+	                    </fileset>
+                    </classpath>
+                    <exclude name="**/SimpleService.java"/>
+            </javac>
+
+	   		<copy file="${keys.dir}/client.jks" tofile="${temp.client.dir}/client.jks" overwrite="true"/>
+	   		<copy file="${keys.dir}/client.properties" tofile="${temp.client.dir}/client.properties" overwrite="true"/>
+
+	   		
+	   		<!-- Run client -->
+            <java classname="org.apache.rampart.samples.sample@{sample.number}.Client" fork="true">
+                    <arg value="${sample.services.url}/sample@{sample.number}"/>
+                    <arg value="${client.repos.dir}/sample@{sample.number}"/>
+                    <classpath>
+                        <path refid="runtime.classpath"/>
+                  		<dirset dir="${temp.client.dir}" />
+                    </classpath>
+            </java>
+
+<!--	   		<delete dir="${temp.client.dir}"/> -->
+		</sequential>		
+	</macrodef>
+
+</project>
diff --git a/modules/rampart-samples/basic/sample01/README.txt b/modules/rampart-samples/basic/sample01/README.txt
new file mode 100644
index 0000000..a4c35f9
--- /dev/null
+++ b/modules/rampart-samples/basic/sample01/README.txt
@@ -0,0 +1,6 @@
+Rampart Engaged and no configuration
+
+This sample shows that Apache Rampart does not work on the messages when simply
+engagd without any configuration
+
+Note: <module ref="rampart"/> in both client.axis2.xml and services.xml
\ No newline at end of file
diff --git a/modules/rampart-samples/basic/sample01/client.axis2.xml b/modules/rampart-samples/basic/sample01/client.axis2.xml
new file mode 100644
index 0000000..5a1988b
--- /dev/null
+++ b/modules/rampart-samples/basic/sample01/client.axis2.xml
@@ -0,0 +1,465 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<axisconfig name="AxisJava2.0">
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment">true</parameter>
+    <parameter name="hotupdate">false</parameter>
+    <parameter name="enableMTOM">false</parameter>
+    <parameter name="enableSwA">false</parameter>
+
+    <!--Uncomment if you want to enable file caching for attachments -->
+    <!--parameter name="cacheAttachments">true</parameter>
+    <parameter name="attachmentDIR"></parameter>
+    <parameter name="sizeThreshold">4000</parameter-->
+
+    <!--Uncomment if you want to enable the reduction of the in-memory cache of WSDL definitions -->
+    <!--In some server environments, the available memory heap is limited and can fill up under load -->
+    <!--Since in-memory copies of WSDL definitions can be large, some steps can be taken-->
+    <!--to reduce the memory needed for the cached WSDL definitions. -->
+    <!--parameter name="reduceWSDLMemoryCache">true</parameter-->
+                                                       
+    <!--This will give out the timout of the configuration contexts, in milliseconds-->
+    <parameter name="ConfigContextTimeoutInterval">30000</parameter>
+
+    <!--During a fault, stack trace can be sent with the fault message. The following flag will control -->
+    <!--that behavior.-->
+    <parameter name="sendStacktraceDetailsWithFaults">false</parameter>
+
+    <!--If there aren't any information available to find out the fault reason, we set the message of the exception-->
+    <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
+    <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
+    <!--is set, then Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
+    <parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
+
+    <parameter name="userName">admin</parameter>
+    <parameter name="password">axis2</parameter>
+
+    <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
+    <!--ServicesDirectory only works on the following cases-->
+    <!---File based configurator and in that case the value should be a file URL (http:// not allowed)-->
+    <!---When creating URL Based configurator with URL “file://”  -->
+    <!--- War based configurator with expanded case , -->
+
+    <!--All the other scenarios it will be ignored.-->
+    <!--<parameter name="ServicesDirectory">service</parameter>-->
+    <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
+    <!--<parameter name="ModulesDirectory">modules</parameter>-->
+
+
+
+    <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
+    <!--root which can configured using the following contextRoot parameter-->
+    <!--<parameter name="contextRoot">axis2</parameter>-->
+
+    <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints-->
+    <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -->
+    <!--context path to proper Axis2 servlets-->
+    <!--<parameter name="servicePath">services</parameter>-->
+    <!--<parameter name="restPath">rest</parameter>-->
+
+    <!-- Following parameter will completely disable REST handling in Axis2-->
+    <parameter name="disableREST" locked="true">false</parameter>
+    
+    <!-- Following parameter will suppress generation of SOAP 1.2 bindings in auto-generated WSDL files -->
+    <parameter name="disableSOAP12" locked="true">false</parameter>
+
+    <!-- ================================================= -->
+    <!-- Deployers -->
+    <!-- ================================================= -->
+
+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->
+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">
+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>
+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>
+    </deployer>
+    
+    <!--POJO deployer , this will alow users to drop .class file and make that into a service-->
+    <deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
+    <!--<deployer extension=".jsa" directory="rmiservices" class="org.apache.axis2.rmi.deploy.RMIServiceDeployer"/>-->
+    
+
+    <!-- Following parameter will set the host name for the epr-->
+    <!--<parameter name="hostname" locked="true">myhost.com</parameter>-->
+
+    <!-- If you have a front end host which exposes this webservice using a different public URL  -->
+    <!-- use this parameter to override autodetected url -->
+    <!--<parameter name="httpFrontendHostUrl">https://someotherhost/context</parameter>-->
+
+
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the deafult MessageReceiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovrride this for a particular service by adding the same element with your requirement-->
+     <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+
+    <!-- ================================================= -->
+    <!-- Message Formatter -->
+    <!-- ================================================= -->
+    <!--Following content type to message formatter mapping can be used to implement support for different message -->
+    <!--format  serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageFormatters>
+        <messageFormatter contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+        <messageFormatter contentType="multipart/form-data"
+                         class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
+        <messageFormatter contentType="application/xml"
+                         class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+        <messageFormatter contentType="text/xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+        <messageFormatter contentType="application/soap+xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+    </messageFormatters>
+
+    <!-- ================================================= -->
+    <!-- Message Builders -->
+    <!-- ================================================= -->
+    <!--Following content type to builder mapping can be used to implement support for different message -->
+    <!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageBuilders>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
+        <messageBuilder contentType="multipart/form-data"
+                         class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
+    </messageBuilders>
+
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port">8080</parameter>
+        <!-- Here is the complete list of supported parameters (see example settings further below):
+            port: the port to listen on (default 6060)
+            hostname:  if non-null, url prefix used in reply-to endpoint references                                 (default null)
+            originServer:  value of http Server header in outgoing messages                                         (default "Simple-Server/1.1")
+            requestTimeout:  value in millis of time that requests can wait for data                                (default 20000)
+            requestTcpNoDelay:  true to maximize performance and minimize latency                                   (default true)
+                                false to minimize bandwidth consumption by combining segments
+            requestCoreThreadPoolSize:  number of threads available for request processing (unless queue fills up)  (default 25)
+            requestMaxThreadPoolSize:  number of threads available for request processing if queue fills up         (default 150)
+                                       note that default queue never fills up:  see HttpFactory
+            threadKeepAliveTime:  time to keep threads in excess of core size alive while inactive                  (default 180)
+                                  note that no such threads can exist with default unbounded request queue
+            threadKeepAliveTimeUnit:  TimeUnit of value in threadKeepAliveTime (default SECONDS)                    (default SECONDS)
+        -->
+        <!-- <parameter name="hostname">http://www.myApp.com/ws</parameter> -->
+        <!-- <parameter name="originServer">My-Server/1.1</parameter>           -->
+        <!-- <parameter name="requestTimeout">10000</parameter>                   -->
+        <!-- <parameter name="requestTcpNoDelay">false</parameter>                   -->
+        <!-- <parameter name="requestCoreThreadPoolSize">50</parameter>                      -->
+        <!-- <parameter name="RequestMaxThreadPoolSize">100</parameter>                     -->
+        <!-- <parameter name="threadKeepAliveTime">240000</parameter>                  -->
+        <!-- <parameter name="threadKeepAliveTimeUnit">MILLISECONDS</parameter>            -->
+    </transportReceiver>
+
+    <!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)
+    <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
+        <parameter name="myTopicConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="myQueueConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="default">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+    </transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Listener  -->
+
+    <!-- the non blocking http transport based on HttpCore + NIO extensions
+    <transportReceiver name="http" class="org.apache.axis2.transport.nhttp.HttpCoreNIOListener">
+        <parameter name="port" locked="false">9000</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportReceiver>-->
+
+    <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions
+    <transportReceiver name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
+        <parameter name="port" locked="false">9002</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="SSLVerifyClient">require</parameter>
+            supports optional|require or defaults to none -->
+    <!--</transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Listener  -->
+    <!-- This is a sample configuration. It assumes a mail server running in localhost.
+         Listener pops  messages that comes to the email address red@localhost. Users
+         password is red. Listener connect to the server every 3000 milliseconds.
+         Parameters with "transport." prefix is Axis2 specific. Others are all from Java Mail API. 
+         http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+     -->
+    <!-- ================================================= -->
+    <!--<transportReceiver name="mailto" class="org.apache.axis2.transport.mail.SimpleMailListener">
+        <parameter name="mail.pop3.host">localhost</parameter>
+        <parameter name="mail.pop3.user">red</parameter>
+        <parameter name="mail.store.protocol">pop3</parameter>
+        <parameter name="transport.mail.pop3.password">red</parameter>
+        <parameter name="transport.mail.replyToAddress">red@localhost</parameter>
+        <parameter name="transport.listener.interval">3000</parameter>
+    </transportReceiver>-->
+
+    <!--Uncomment if you want to have TCP transport support-->
+    <!--transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port">6060</parameter-->>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncomment the following paramter , and set it as you required.-->
+        <!--<parameter name="hostname">tcp://myApp.com/ws</parameter>-->
+    <!-- /transportReceiver -->
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <!-- transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/ -->
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+
+        <!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages -->
+        <!--  <parameter name="OmitSOAP12Action">true</parameter>  -->
+    </transportSender>
+
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+    </transportSender>
+    <transportSender name="java"
+                     class="org.apache.axis2.transport.java.JavaTransportSender"/>
+
+    <!--<transportSender name="jms"-->
+                     <!--class="org.apache.axis2.transport.jms.JMSSender"/>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Sender  -->
+
+    <!-- the non-blocking http transport sender based on HttpCore + NIO extensions
+    <transportSender name="http"  class="org.apache.axis2.transport.nhttp.HttpCoreNIOSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportSender>-->
+
+    <!-- the non-blocking https transport sender based on HttpCore + NIO SSL extensions
+    <transportSender name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
+            supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
+    <!--</transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Sender  -->
+    <!--Only need to uncomment the sender. Configuration is achieved with every client.
+        At any instant mail host should be given. Sample configuration has been given.
+        http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+   -->
+    <!-- ================================================= -->
+   <!--<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
+        <parameter name="mail.smtp.host">localhost</parameter>
+    </transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
+    <!-- Comment this to disable Addressing -->
+    <module ref="addressing"/>
+    <module ref="rampart"/>
+
+    <!--Configuring module , providing parameters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
+    <!-- ================================================= -->
+    <!-- Clustering  -->
+    <!-- ================================================= -->
+    <!-- Configure and uncomment following for preparing Axis2 to a clustered environment -->
+    <!--
+    <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
+        <parameter name="param1">value1</parameter>
+        <parameter name="domain">apache.axis2.domain</parameter>
+        <parameter name="synchronizeAll">true</parameter>
+        <parameter name="maxRetries">10</parameter>
+        <configurationManager class="org.apache.axis2.cluster.configuration.TribesConfigurationManager">
+            <listener class="org.apache.axis2.cluster.configuration.DefaultConfigurationManagerListener"/>
+        </configurationManager>
+        <contextManager class="org.apache.axis2.cluster.context.TribesContextManager">
+            <listener class="org.apache.axis2.cluster.context.DefaultContextManagerListener"/>
+        </contextManager>
+    </cluster>
+    -->
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="InFlow">
+        <!--  System predefined phases       -->
+        <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+        </phase>
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--  System predefined phases       -->
+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->
+        <phase name="OperationInPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+    <phaseOrder type="InFaultFlow">
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationInFaultPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFaultFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+</axisconfig>
+
diff --git a/modules/rampart-samples/basic/sample01/services.xml b/modules/rampart-samples/basic/sample01/services.xml
new file mode 100644
index 0000000..f76daf9
--- /dev/null
+++ b/modules/rampart-samples/basic/sample01/services.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!--

+ !

+ ! Copyright 2006 The Apache Software Foundation.

+ !

+ ! Licensed under the Apache License, Version 2.0 (the "License");

+ ! you may not use this file except in compliance with the License.

+ ! You may obtain a copy of the License at

+ !

+ !      http://www.apache.org/licenses/LICENSE-2.0

+ !

+ ! Unless required by applicable law or agreed to in writing, software

+ ! distributed under the License is distributed on an "AS IS" BASIS,

+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ! See the License for the specific language governing permissions and

+ ! limitations under the License.

+ !-->

+<!-- services.xml of sample-1 : No Security-->

+<service>

+	<operation name="echo">

+		<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>

+	</operation>    

+	<parameter name="ServiceClass" locked="false">org.apache.rampart.samples.sample01.SimpleService</parameter>

+	

+	<module ref="rampart" />

+	

+</service>

diff --git a/modules/rampart-samples/basic/sample01/src/org/apache/rampart/samples/sample01/Client.java b/modules/rampart-samples/basic/sample01/src/org/apache/rampart/samples/sample01/Client.java
new file mode 100644
index 0000000..b47c6be
--- /dev/null
+++ b/modules/rampart-samples/basic/sample01/src/org/apache/rampart/samples/sample01/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample01;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+
+public class Client {
+
+    public static void main(String[] args) throws Exception {
+        
+        if(args.length != 2) {
+            System.out.println("Usage: $java Client endpoint_address client_repo_path");
+        }
+        
+        ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[1], args[1] + "/conf/axis2.xml");
+        
+        ServiceClient client = new ServiceClient(ctx, null);
+        Options options = new Options();
+        options.setAction("urn:echo");
+        options.setTo(new EndpointReference(args[0]));
+        client.setOptions(options);
+        
+        OMElement response = client.sendReceive(getPayload("Hello world"));
+        
+        System.out.println(response);
+        
+    }
+    
+    private static OMElement getPayload(String value) {
+        OMFactory factory = OMAbstractFactory.getOMFactory();
+        OMNamespace ns = factory.createOMNamespace("http://sample01.samples.rampart.apache.org","ns1");
+        OMElement elem = factory.createOMElement("echo", ns);
+        OMElement childElem = factory.createOMElement("param0", null);
+        childElem.setText(value);
+        elem.addChild(childElem);
+        
+        return elem;
+    }
+    
+}
diff --git a/modules/rampart-samples/basic/sample01/src/org/apache/rampart/samples/sample01/SimpleService.java b/modules/rampart-samples/basic/sample01/src/org/apache/rampart/samples/sample01/SimpleService.java
new file mode 100644
index 0000000..3247722
--- /dev/null
+++ b/modules/rampart-samples/basic/sample01/src/org/apache/rampart/samples/sample01/SimpleService.java
@@ -0,0 +1,24 @@
+/*
+ * Copyright  2003-2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.rampart.samples.sample01;
+
+public class SimpleService {
+    
+    public String echo(String arg) {
+        return arg;
+    }
+}
diff --git a/modules/rampart-samples/basic/sample02/README.txt b/modules/rampart-samples/basic/sample02/README.txt
new file mode 100644
index 0000000..de24747
--- /dev/null
+++ b/modules/rampart-samples/basic/sample02/README.txt
@@ -0,0 +1,10 @@
+UsernameToken authentication
+
+The client is configured to add a UsernameToken to the outgoing message.
+	- See the "OutflowSecurity" parameter in the client.axis2.xml
+	
+The service is configured to process it.
+	- See the "InflowSecurity" parameter in the services.xml
+
+Note how org.apache.rampart.samples.sample02.PWCBHandler supplies the password 
+to wss4j to compute the digest for comparison.
diff --git a/modules/rampart-samples/basic/sample02/client.axis2.xml b/modules/rampart-samples/basic/sample02/client.axis2.xml
new file mode 100644
index 0000000..f292c27
--- /dev/null
+++ b/modules/rampart-samples/basic/sample02/client.axis2.xml
@@ -0,0 +1,474 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<axisconfig name="AxisJava2.0">
+    <module ref="rampart" />
+    
+    <parameter name="OutflowSecurity">
+        <action>
+            <items>UsernameToken Timestamp</items>
+            <user>bob</user>
+            <passwordCallbackClass>org.apache.rampart.samples.sample02.PWCBHandler</passwordCallbackClass>
+        </action>
+    </parameter>
+    
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment">true</parameter>
+    <parameter name="hotupdate">false</parameter>
+    <parameter name="enableMTOM">false</parameter>
+    <parameter name="enableSwA">false</parameter>
+
+    <!--Uncomment if you want to enable file caching for attachments -->
+    <!--parameter name="cacheAttachments">true</parameter>
+    <parameter name="attachmentDIR"></parameter>
+    <parameter name="sizeThreshold">4000</parameter-->
+
+    <!--Uncomment if you want to enable the reduction of the in-memory cache of WSDL definitions -->
+    <!--In some server environments, the available memory heap is limited and can fill up under load -->
+    <!--Since in-memory copies of WSDL definitions can be large, some steps can be taken-->
+    <!--to reduce the memory needed for the cached WSDL definitions. -->
+    <!--parameter name="reduceWSDLMemoryCache">true</parameter-->
+                                                       
+    <!--This will give out the timout of the configuration contexts, in milliseconds-->
+    <parameter name="ConfigContextTimeoutInterval">30000</parameter>
+
+    <!--During a fault, stack trace can be sent with the fault message. The following flag will control -->
+    <!--that behavior.-->
+    <parameter name="sendStacktraceDetailsWithFaults">false</parameter>
+
+    <!--If there aren't any information available to find out the fault reason, we set the message of the exception-->
+    <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
+    <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
+    <!--is set, then Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
+    <parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
+
+    <parameter name="userName">admin</parameter>
+    <parameter name="password">axis2</parameter>
+
+    <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
+    <!--ServicesDirectory only works on the following cases-->
+    <!---File based configurator and in that case the value should be a file URL (http:// not allowed)-->
+    <!---When creating URL Based configurator with URL “file://”  -->
+    <!--- War based configurator with expanded case , -->
+
+    <!--All the other scenarios it will be ignored.-->
+    <!--<parameter name="ServicesDirectory">service</parameter>-->
+    <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
+    <!--<parameter name="ModulesDirectory">modules</parameter>-->
+
+
+
+    <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
+    <!--root which can configured using the following contextRoot parameter-->
+    <!--<parameter name="contextRoot">axis2</parameter>-->
+
+    <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints-->
+    <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -->
+    <!--context path to proper Axis2 servlets-->
+    <!--<parameter name="servicePath">services</parameter>-->
+    <!--<parameter name="restPath">rest</parameter>-->
+
+    <!-- Following parameter will completely disable REST handling in Axis2-->
+    <parameter name="disableREST" locked="true">false</parameter>
+    
+    <!-- Following parameter will suppress generation of SOAP 1.2 bindings in auto-generated WSDL files -->
+    <parameter name="disableSOAP12" locked="true">false</parameter>
+
+    <!-- ================================================= -->
+    <!-- Deployers -->
+    <!-- ================================================= -->
+
+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->
+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">
+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>
+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>
+    </deployer>
+    
+    <!--POJO deployer , this will alow users to drop .class file and make that into a service-->
+    <deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
+    <!--<deployer extension=".jsa" directory="rmiservices" class="org.apache.axis2.rmi.deploy.RMIServiceDeployer"/>-->
+    
+
+    <!-- Following parameter will set the host name for the epr-->
+    <!--<parameter name="hostname" locked="true">myhost.com</parameter>-->
+
+    <!-- If you have a front end host which exposes this webservice using a different public URL  -->
+    <!-- use this parameter to override autodetected url -->
+    <!--<parameter name="httpFrontendHostUrl">https://someotherhost/context</parameter>-->
+
+
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the deafult MessageReceiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovrride this for a particular service by adding the same element with your requirement-->
+     <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+
+    <!-- ================================================= -->
+    <!-- Message Formatter -->
+    <!-- ================================================= -->
+    <!--Following content type to message formatter mapping can be used to implement support for different message -->
+    <!--format  serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageFormatters>
+        <messageFormatter contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+        <messageFormatter contentType="multipart/form-data"
+                         class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
+        <messageFormatter contentType="application/xml"
+                         class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+        <messageFormatter contentType="text/xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+        <messageFormatter contentType="application/soap+xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+    </messageFormatters>
+
+    <!-- ================================================= -->
+    <!-- Message Builders -->
+    <!-- ================================================= -->
+    <!--Following content type to builder mapping can be used to implement support for different message -->
+    <!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageBuilders>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
+        <messageBuilder contentType="multipart/form-data"
+                         class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
+    </messageBuilders>
+
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port">8080</parameter>
+        <!-- Here is the complete list of supported parameters (see example settings further below):
+            port: the port to listen on (default 6060)
+            hostname:  if non-null, url prefix used in reply-to endpoint references                                 (default null)
+            originServer:  value of http Server header in outgoing messages                                         (default "Simple-Server/1.1")
+            requestTimeout:  value in millis of time that requests can wait for data                                (default 20000)
+            requestTcpNoDelay:  true to maximize performance and minimize latency                                   (default true)
+                                false to minimize bandwidth consumption by combining segments
+            requestCoreThreadPoolSize:  number of threads available for request processing (unless queue fills up)  (default 25)
+            requestMaxThreadPoolSize:  number of threads available for request processing if queue fills up         (default 150)
+                                       note that default queue never fills up:  see HttpFactory
+            threadKeepAliveTime:  time to keep threads in excess of core size alive while inactive                  (default 180)
+                                  note that no such threads can exist with default unbounded request queue
+            threadKeepAliveTimeUnit:  TimeUnit of value in threadKeepAliveTime (default SECONDS)                    (default SECONDS)
+        -->
+        <!-- <parameter name="hostname">http://www.myApp.com/ws</parameter> -->
+        <!-- <parameter name="originServer">My-Server/1.1</parameter>           -->
+        <!-- <parameter name="requestTimeout">10000</parameter>                   -->
+        <!-- <parameter name="requestTcpNoDelay">false</parameter>                   -->
+        <!-- <parameter name="requestCoreThreadPoolSize">50</parameter>                      -->
+        <!-- <parameter name="RequestMaxThreadPoolSize">100</parameter>                     -->
+        <!-- <parameter name="threadKeepAliveTime">240000</parameter>                  -->
+        <!-- <parameter name="threadKeepAliveTimeUnit">MILLISECONDS</parameter>            -->
+    </transportReceiver>
+
+    <!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)
+    <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
+        <parameter name="myTopicConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="myQueueConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="default">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+    </transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Listener  -->
+
+    <!-- the non blocking http transport based on HttpCore + NIO extensions
+    <transportReceiver name="http" class="org.apache.axis2.transport.nhttp.HttpCoreNIOListener">
+        <parameter name="port" locked="false">9000</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportReceiver>-->
+
+    <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions
+    <transportReceiver name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
+        <parameter name="port" locked="false">9002</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="SSLVerifyClient">require</parameter>
+            supports optional|require or defaults to none -->
+    <!--</transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Listener  -->
+    <!-- This is a sample configuration. It assumes a mail server running in localhost.
+         Listener pops  messages that comes to the email address red@localhost. Users
+         password is red. Listener connect to the server every 3000 milliseconds.
+         Parameters with "transport." prefix is Axis2 specific. Others are all from Java Mail API. 
+         http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+     -->
+    <!-- ================================================= -->
+    <!--<transportReceiver name="mailto" class="org.apache.axis2.transport.mail.SimpleMailListener">
+        <parameter name="mail.pop3.host">localhost</parameter>
+        <parameter name="mail.pop3.user">red</parameter>
+        <parameter name="mail.store.protocol">pop3</parameter>
+        <parameter name="transport.mail.pop3.password">red</parameter>
+        <parameter name="transport.mail.replyToAddress">red@localhost</parameter>
+        <parameter name="transport.listener.interval">3000</parameter>
+    </transportReceiver>-->
+
+    <!--Uncomment if you want to have TCP transport support-->
+    <!--transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port">6060</parameter-->>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncomment the following paramter , and set it as you required.-->
+        <!--<parameter name="hostname">tcp://myApp.com/ws</parameter>-->
+    <!-- /transportReceiver -->
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <!-- transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/ -->
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+
+        <!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages -->
+        <!--  <parameter name="OmitSOAP12Action">true</parameter>  -->
+    </transportSender>
+
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+    </transportSender>
+    <transportSender name="java"
+                     class="org.apache.axis2.transport.java.JavaTransportSender"/>
+
+    <!--<transportSender name="jms"-->
+                     <!--class="org.apache.axis2.transport.jms.JMSSender"/>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Sender  -->
+
+    <!-- the non-blocking http transport sender based on HttpCore + NIO extensions
+    <transportSender name="http"  class="org.apache.axis2.transport.nhttp.HttpCoreNIOSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportSender>-->
+
+    <!-- the non-blocking https transport sender based on HttpCore + NIO SSL extensions
+    <transportSender name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
+            supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
+    <!--</transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Sender  -->
+    <!--Only need to uncomment the sender. Configuration is achieved with every client.
+        At any instant mail host should be given. Sample configuration has been given.
+        http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+   -->
+    <!-- ================================================= -->
+   <!--<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
+        <parameter name="mail.smtp.host">localhost</parameter>
+    </transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
+    <!-- Comment this to disable Addressing -->
+    <module ref="addressing"/>
+
+    <!--Configuring module , providing parameters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
+    <!-- ================================================= -->
+    <!-- Clustering  -->
+    <!-- ================================================= -->
+    <!-- Configure and uncomment following for preparing Axis2 to a clustered environment -->
+    <!--
+    <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
+        <parameter name="param1">value1</parameter>
+        <parameter name="domain">apache.axis2.domain</parameter>
+        <parameter name="synchronizeAll">true</parameter>
+        <parameter name="maxRetries">10</parameter>
+        <configurationManager class="org.apache.axis2.cluster.configuration.TribesConfigurationManager">
+            <listener class="org.apache.axis2.cluster.configuration.DefaultConfigurationManagerListener"/>
+        </configurationManager>
+        <contextManager class="org.apache.axis2.cluster.context.TribesContextManager">
+            <listener class="org.apache.axis2.cluster.context.DefaultContextManagerListener"/>
+        </contextManager>
+    </cluster>
+    -->
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="InFlow">
+        <!--  System predefined phases       -->
+        <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+        </phase>
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--  System predefined phases       -->
+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->
+        <phase name="OperationInPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+    <phaseOrder type="InFaultFlow">
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationInFaultPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFaultFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+</axisconfig>
+
diff --git a/modules/rampart-samples/basic/sample02/services.xml b/modules/rampart-samples/basic/sample02/services.xml
new file mode 100644
index 0000000..ac94b4b
--- /dev/null
+++ b/modules/rampart-samples/basic/sample02/services.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!--

+ !

+ ! Copyright 2006 The Apache Software Foundation.

+ !

+ ! Licensed under the Apache License, Version 2.0 (the "License");

+ ! you may not use this file except in compliance with the License.

+ ! You may obtain a copy of the License at

+ !

+ !      http://www.apache.org/licenses/LICENSE-2.0

+ !

+ ! Unless required by applicable law or agreed to in writing, software

+ ! distributed under the License is distributed on an "AS IS" BASIS,

+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ! See the License for the specific language governing permissions and

+ ! limitations under the License.

+ !-->

+<!-- services.xml of sample-2 : Timestamp and UsernameToken-->

+<service>

+	<operation name="echo">

+		<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>

+	</operation>    

+	<parameter name="ServiceClass" locked="false">org.apache.rampart.samples.sample02.SimpleService</parameter>

+	

+	<module ref="rampart" />

+	

+	<parameter name="InflowSecurity">

+      <action>

+        <items>UsernameToken Timestamp</items>

+        <passwordCallbackClass>org.apache.rampart.samples.sample02.PWCBHandler</passwordCallbackClass>

+      </action>

+    </parameter>

+</service>

diff --git a/modules/rampart-samples/basic/sample02/src/org/apache/rampart/samples/sample02/Client.java b/modules/rampart-samples/basic/sample02/src/org/apache/rampart/samples/sample02/Client.java
new file mode 100644
index 0000000..542ed61
--- /dev/null
+++ b/modules/rampart-samples/basic/sample02/src/org/apache/rampart/samples/sample02/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample02;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+
+public class Client {
+
+    public static void main(String[] args) throws Exception {
+        
+        if(args.length != 2) {
+            System.out.println("Usage: $java Client endpoint_address client_repo_path");
+        }
+        
+        ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[1], args[1] + "/conf/axis2.xml");
+        
+        ServiceClient client = new ServiceClient(ctx, null);
+        Options options = new Options();
+        options.setAction("urn:echo");
+        options.setTo(new EndpointReference(args[0]));
+        client.setOptions(options);
+        
+        OMElement response = client.sendReceive(getPayload("Hello world"));
+        
+        System.out.println(response);
+        
+    }
+    
+    private static OMElement getPayload(String value) {
+        OMFactory factory = OMAbstractFactory.getOMFactory();
+        OMNamespace ns = factory.createOMNamespace("http://sample02.samples.rampart.apache.org","ns1");
+        OMElement elem = factory.createOMElement("echo", ns);
+        OMElement childElem = factory.createOMElement("param0", null);
+        childElem.setText(value);
+        elem.addChild(childElem);
+        
+        return elem;
+    }
+    
+}
diff --git a/modules/rampart-samples/basic/sample02/src/org/apache/rampart/samples/sample02/PWCBHandler.java b/modules/rampart-samples/basic/sample02/src/org/apache/rampart/samples/sample02/PWCBHandler.java
new file mode 100644
index 0000000..84c3c5d
--- /dev/null
+++ b/modules/rampart-samples/basic/sample02/src/org/apache/rampart/samples/sample02/PWCBHandler.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample02;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import java.io.IOException;
+
+public class PWCBHandler implements CallbackHandler {
+
+    public void handle(Callback[] callbacks) throws IOException,
+            UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
+            WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+            String id = pwcb.getIdentifier();
+            if("bob".equals(id)) {
+                pwcb.setPassword("bobPW");
+            }
+        }
+    }
+
+}
diff --git a/modules/rampart-samples/basic/sample02/src/org/apache/rampart/samples/sample02/SimpleService.java b/modules/rampart-samples/basic/sample02/src/org/apache/rampart/samples/sample02/SimpleService.java
new file mode 100644
index 0000000..3249257
--- /dev/null
+++ b/modules/rampart-samples/basic/sample02/src/org/apache/rampart/samples/sample02/SimpleService.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright  2003-2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.rampart.samples.sample02;
+
+public class SimpleService {
+    
+    public String echo(String arg) {
+        return arg;
+    }
+}
diff --git a/modules/rampart-samples/basic/sample03/README.txt b/modules/rampart-samples/basic/sample03/README.txt
new file mode 100644
index 0000000..1446348
--- /dev/null
+++ b/modules/rampart-samples/basic/sample03/README.txt
@@ -0,0 +1,12 @@
+UsernameToken authentication with a plain text password
+
+The client is configured to add a UsernameToken to the outgoing message.
+	- See the "OutflowSecurity" parameter in the client.axis2.xml
+	- Note the <passwordType>PasswordText</passwordType> element
+	
+The service is configured to process it.
+	- See the "InflowSecurity" parameter in the services.xml
+
+Note how org.apache.rampart.samples.sample03.PWCBHandler authenticates the 
+password
+
diff --git a/modules/rampart-samples/basic/sample03/client.axis2.xml b/modules/rampart-samples/basic/sample03/client.axis2.xml
new file mode 100644
index 0000000..0913fc2
--- /dev/null
+++ b/modules/rampart-samples/basic/sample03/client.axis2.xml
@@ -0,0 +1,475 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<axisconfig name="AxisJava2.0">
+    <module ref="rampart" />
+    
+    <parameter name="OutflowSecurity">
+      <action>
+        <items>UsernameToken</items>
+        <user>bob</user>
+        <passwordCallbackClass>org.apache.rampart.samples.sample03.PWCBHandler</passwordCallbackClass>
+        <passwordType>PasswordText</passwordType>
+      </action>
+    </parameter>
+
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment">true</parameter>
+    <parameter name="hotupdate">false</parameter>
+    <parameter name="enableMTOM">false</parameter>
+    <parameter name="enableSwA">false</parameter>
+
+    <!--Uncomment if you want to enable file caching for attachments -->
+    <!--parameter name="cacheAttachments">true</parameter>
+    <parameter name="attachmentDIR"></parameter>
+    <parameter name="sizeThreshold">4000</parameter-->
+
+    <!--Uncomment if you want to enable the reduction of the in-memory cache of WSDL definitions -->
+    <!--In some server environments, the available memory heap is limited and can fill up under load -->
+    <!--Since in-memory copies of WSDL definitions can be large, some steps can be taken-->
+    <!--to reduce the memory needed for the cached WSDL definitions. -->
+    <!--parameter name="reduceWSDLMemoryCache">true</parameter-->
+                                                       
+    <!--This will give out the timout of the configuration contexts, in milliseconds-->
+    <parameter name="ConfigContextTimeoutInterval">30000</parameter>
+
+    <!--During a fault, stack trace can be sent with the fault message. The following flag will control -->
+    <!--that behavior.-->
+    <parameter name="sendStacktraceDetailsWithFaults">false</parameter>
+
+    <!--If there aren't any information available to find out the fault reason, we set the message of the exception-->
+    <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
+    <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
+    <!--is set, then Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
+    <parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
+
+    <parameter name="userName">admin</parameter>
+    <parameter name="password">axis2</parameter>
+
+    <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
+    <!--ServicesDirectory only works on the following cases-->
+    <!---File based configurator and in that case the value should be a file URL (http:// not allowed)-->
+    <!---When creating URL Based configurator with URL “file://”  -->
+    <!--- War based configurator with expanded case , -->
+
+    <!--All the other scenarios it will be ignored.-->
+    <!--<parameter name="ServicesDirectory">service</parameter>-->
+    <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
+    <!--<parameter name="ModulesDirectory">modules</parameter>-->
+
+
+
+    <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
+    <!--root which can configured using the following contextRoot parameter-->
+    <!--<parameter name="contextRoot">axis2</parameter>-->
+
+    <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints-->
+    <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -->
+    <!--context path to proper Axis2 servlets-->
+    <!--<parameter name="servicePath">services</parameter>-->
+    <!--<parameter name="restPath">rest</parameter>-->
+
+    <!-- Following parameter will completely disable REST handling in Axis2-->
+    <parameter name="disableREST" locked="true">false</parameter>
+    
+    <!-- Following parameter will suppress generation of SOAP 1.2 bindings in auto-generated WSDL files -->
+    <parameter name="disableSOAP12" locked="true">false</parameter>
+
+    <!-- ================================================= -->
+    <!-- Deployers -->
+    <!-- ================================================= -->
+
+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->
+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">
+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>
+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>
+    </deployer>
+    
+    <!--POJO deployer , this will alow users to drop .class file and make that into a service-->
+    <deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
+    <!--<deployer extension=".jsa" directory="rmiservices" class="org.apache.axis2.rmi.deploy.RMIServiceDeployer"/>-->
+    
+
+    <!-- Following parameter will set the host name for the epr-->
+    <!--<parameter name="hostname" locked="true">myhost.com</parameter>-->
+
+    <!-- If you have a front end host which exposes this webservice using a different public URL  -->
+    <!-- use this parameter to override autodetected url -->
+    <!--<parameter name="httpFrontendHostUrl">https://someotherhost/context</parameter>-->
+
+
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the deafult MessageReceiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovrride this for a particular service by adding the same element with your requirement-->
+     <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+
+    <!-- ================================================= -->
+    <!-- Message Formatter -->
+    <!-- ================================================= -->
+    <!--Following content type to message formatter mapping can be used to implement support for different message -->
+    <!--format  serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageFormatters>
+        <messageFormatter contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+        <messageFormatter contentType="multipart/form-data"
+                         class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
+        <messageFormatter contentType="application/xml"
+                         class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+        <messageFormatter contentType="text/xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+        <messageFormatter contentType="application/soap+xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+    </messageFormatters>
+
+    <!-- ================================================= -->
+    <!-- Message Builders -->
+    <!-- ================================================= -->
+    <!--Following content type to builder mapping can be used to implement support for different message -->
+    <!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageBuilders>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
+        <messageBuilder contentType="multipart/form-data"
+                         class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
+    </messageBuilders>
+
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port">8080</parameter>
+        <!-- Here is the complete list of supported parameters (see example settings further below):
+            port: the port to listen on (default 6060)
+            hostname:  if non-null, url prefix used in reply-to endpoint references                                 (default null)
+            originServer:  value of http Server header in outgoing messages                                         (default "Simple-Server/1.1")
+            requestTimeout:  value in millis of time that requests can wait for data                                (default 20000)
+            requestTcpNoDelay:  true to maximize performance and minimize latency                                   (default true)
+                                false to minimize bandwidth consumption by combining segments
+            requestCoreThreadPoolSize:  number of threads available for request processing (unless queue fills up)  (default 25)
+            requestMaxThreadPoolSize:  number of threads available for request processing if queue fills up         (default 150)
+                                       note that default queue never fills up:  see HttpFactory
+            threadKeepAliveTime:  time to keep threads in excess of core size alive while inactive                  (default 180)
+                                  note that no such threads can exist with default unbounded request queue
+            threadKeepAliveTimeUnit:  TimeUnit of value in threadKeepAliveTime (default SECONDS)                    (default SECONDS)
+        -->
+        <!-- <parameter name="hostname">http://www.myApp.com/ws</parameter> -->
+        <!-- <parameter name="originServer">My-Server/1.1</parameter>           -->
+        <!-- <parameter name="requestTimeout">10000</parameter>                   -->
+        <!-- <parameter name="requestTcpNoDelay">false</parameter>                   -->
+        <!-- <parameter name="requestCoreThreadPoolSize">50</parameter>                      -->
+        <!-- <parameter name="RequestMaxThreadPoolSize">100</parameter>                     -->
+        <!-- <parameter name="threadKeepAliveTime">240000</parameter>                  -->
+        <!-- <parameter name="threadKeepAliveTimeUnit">MILLISECONDS</parameter>            -->
+    </transportReceiver>
+
+    <!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)
+    <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
+        <parameter name="myTopicConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="myQueueConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="default">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+    </transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Listener  -->
+
+    <!-- the non blocking http transport based on HttpCore + NIO extensions
+    <transportReceiver name="http" class="org.apache.axis2.transport.nhttp.HttpCoreNIOListener">
+        <parameter name="port" locked="false">9000</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportReceiver>-->
+
+    <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions
+    <transportReceiver name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
+        <parameter name="port" locked="false">9002</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="SSLVerifyClient">require</parameter>
+            supports optional|require or defaults to none -->
+    <!--</transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Listener  -->
+    <!-- This is a sample configuration. It assumes a mail server running in localhost.
+         Listener pops  messages that comes to the email address red@localhost. Users
+         password is red. Listener connect to the server every 3000 milliseconds.
+         Parameters with "transport." prefix is Axis2 specific. Others are all from Java Mail API. 
+         http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+     -->
+    <!-- ================================================= -->
+    <!--<transportReceiver name="mailto" class="org.apache.axis2.transport.mail.SimpleMailListener">
+        <parameter name="mail.pop3.host">localhost</parameter>
+        <parameter name="mail.pop3.user">red</parameter>
+        <parameter name="mail.store.protocol">pop3</parameter>
+        <parameter name="transport.mail.pop3.password">red</parameter>
+        <parameter name="transport.mail.replyToAddress">red@localhost</parameter>
+        <parameter name="transport.listener.interval">3000</parameter>
+    </transportReceiver>-->
+
+    <!--Uncomment if you want to have TCP transport support-->
+    <!--transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port">6060</parameter-->>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncomment the following paramter , and set it as you required.-->
+        <!--<parameter name="hostname">tcp://myApp.com/ws</parameter>-->
+    <!-- /transportReceiver -->
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <!-- transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/ -->
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+
+        <!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages -->
+        <!--  <parameter name="OmitSOAP12Action">true</parameter>  -->
+    </transportSender>
+
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+    </transportSender>
+    <transportSender name="java"
+                     class="org.apache.axis2.transport.java.JavaTransportSender"/>
+
+    <!--<transportSender name="jms"-->
+                     <!--class="org.apache.axis2.transport.jms.JMSSender"/>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Sender  -->
+
+    <!-- the non-blocking http transport sender based on HttpCore + NIO extensions
+    <transportSender name="http"  class="org.apache.axis2.transport.nhttp.HttpCoreNIOSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportSender>-->
+
+    <!-- the non-blocking https transport sender based on HttpCore + NIO SSL extensions
+    <transportSender name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
+            supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
+    <!--</transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Sender  -->
+    <!--Only need to uncomment the sender. Configuration is achieved with every client.
+        At any instant mail host should be given. Sample configuration has been given.
+        http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+   -->
+    <!-- ================================================= -->
+   <!--<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
+        <parameter name="mail.smtp.host">localhost</parameter>
+    </transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
+    <!-- Comment this to disable Addressing -->
+    <module ref="addressing"/>
+
+    <!--Configuring module , providing parameters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
+    <!-- ================================================= -->
+    <!-- Clustering  -->
+    <!-- ================================================= -->
+    <!-- Configure and uncomment following for preparing Axis2 to a clustered environment -->
+    <!--
+    <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
+        <parameter name="param1">value1</parameter>
+        <parameter name="domain">apache.axis2.domain</parameter>
+        <parameter name="synchronizeAll">true</parameter>
+        <parameter name="maxRetries">10</parameter>
+        <configurationManager class="org.apache.axis2.cluster.configuration.TribesConfigurationManager">
+            <listener class="org.apache.axis2.cluster.configuration.DefaultConfigurationManagerListener"/>
+        </configurationManager>
+        <contextManager class="org.apache.axis2.cluster.context.TribesContextManager">
+            <listener class="org.apache.axis2.cluster.context.DefaultContextManagerListener"/>
+        </contextManager>
+    </cluster>
+    -->
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="InFlow">
+        <!--  System predefined phases       -->
+        <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+        </phase>
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--  System predefined phases       -->
+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->
+        <phase name="OperationInPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+    <phaseOrder type="InFaultFlow">
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationInFaultPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFaultFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+</axisconfig>
+
diff --git a/modules/rampart-samples/basic/sample03/services.xml b/modules/rampart-samples/basic/sample03/services.xml
new file mode 100644
index 0000000..1d0e6c5
--- /dev/null
+++ b/modules/rampart-samples/basic/sample03/services.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!--

+ !

+ ! Copyright 2006 The Apache Software Foundation.

+ !

+ ! Licensed under the Apache License, Version 2.0 (the "License");

+ ! you may not use this file except in compliance with the License.

+ ! You may obtain a copy of the License at

+ !

+ !      http://www.apache.org/licenses/LICENSE-2.0

+ !

+ ! Unless required by applicable law or agreed to in writing, software

+ ! distributed under the License is distributed on an "AS IS" BASIS,

+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ! See the License for the specific language governing permissions and

+ ! limitations under the License.

+ !-->

+<!-- services.xml of sample-3 : Timestamp and UsernameToken (with plaintext password)-->

+<service>

+	<operation name="echo">

+		<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>

+	</operation>    

+	<parameter name="ServiceClass" locked="false">org.apache.rampart.samples.sample03.SimpleService</parameter>

+	

+	<module ref="rampart" />

+	

+	<parameter name="InflowSecurity">

+      <action>

+        <items>UsernameToken</items>

+        <passwordCallbackClass>org.apache.rampart.samples.sample03.PWCBHandler</passwordCallbackClass>

+      </action>

+    </parameter>

+</service>

diff --git a/modules/rampart-samples/basic/sample03/src/org/apache/rampart/samples/sample03/Client.java b/modules/rampart-samples/basic/sample03/src/org/apache/rampart/samples/sample03/Client.java
new file mode 100644
index 0000000..9aa0c34
--- /dev/null
+++ b/modules/rampart-samples/basic/sample03/src/org/apache/rampart/samples/sample03/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample03;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+
+public class Client {
+
+    public static void main(String[] args) throws Exception {
+        
+        if(args.length != 2) {
+            System.out.println("Usage: $java Client endpoint_address client_repo_path");
+        }
+        
+        ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[1], args[1] + "/conf/axis2.xml");
+        
+        ServiceClient client = new ServiceClient(ctx, null);
+        Options options = new Options();
+        options.setAction("urn:echo");
+        options.setTo(new EndpointReference(args[0]));
+        client.setOptions(options);
+        
+        OMElement response = client.sendReceive(getPayload("Hello world"));
+        
+        System.out.println(response);
+        
+    }
+    
+    private static OMElement getPayload(String value) {
+        OMFactory factory = OMAbstractFactory.getOMFactory();
+        OMNamespace ns = factory.createOMNamespace("http://sample03.samples.rampart.apache.org","ns1");
+        OMElement elem = factory.createOMElement("echo", ns);
+        OMElement childElem = factory.createOMElement("param0", null);
+        childElem.setText(value);
+        elem.addChild(childElem);
+        
+        return elem;
+    }
+    
+}
diff --git a/modules/rampart-samples/basic/sample03/src/org/apache/rampart/samples/sample03/PWCBHandler.java b/modules/rampart-samples/basic/sample03/src/org/apache/rampart/samples/sample03/PWCBHandler.java
new file mode 100644
index 0000000..c3459d6
--- /dev/null
+++ b/modules/rampart-samples/basic/sample03/src/org/apache/rampart/samples/sample03/PWCBHandler.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample03;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import java.io.IOException;
+
+public class PWCBHandler implements CallbackHandler {
+
+    public void handle(Callback[] callbacks) throws IOException,
+            UnsupportedCallbackException {
+
+        for (int i = 0; i < callbacks.length; i++) {
+            
+            //When the server side need to authenticate the user
+            WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+            if (pwcb.getUsage() == WSPasswordCallback.USERNAME_TOKEN_UNKNOWN) {
+                if(pwcb.getIdentifier().equals("bob") && pwcb.getPassword().equals("bobPW")) {
+                    //If authentication successful, simply return
+                    return;
+                } else {
+                    throw new UnsupportedCallbackException(callbacks[i], "check failed");
+                }
+            }
+            
+            //When the client requests for the password to be added in to the 
+            //UT element
+            pwcb.setPassword("bobPW");
+        }
+    }
+
+}
diff --git a/modules/rampart-samples/basic/sample03/src/org/apache/rampart/samples/sample03/SimpleService.java b/modules/rampart-samples/basic/sample03/src/org/apache/rampart/samples/sample03/SimpleService.java
new file mode 100644
index 0000000..630cf80
--- /dev/null
+++ b/modules/rampart-samples/basic/sample03/src/org/apache/rampart/samples/sample03/SimpleService.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright  2003-2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.rampart.samples.sample03;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.context.OperationContext;
+import org.apache.axis2.wsdl.WSDLConstants;
+import org.apache.ws.security.WSConstants;
+import org.apache.ws.security.WSSecurityEngineResult;
+import org.apache.ws.security.WSUsernameTokenPrincipal;
+import org.apache.ws.security.handler.WSHandlerConstants;
+import org.apache.ws.security.handler.WSHandlerResult;
+
+import java.util.Vector;
+
+public class SimpleService {
+
+    public String echo(String arg) {
+    	return arg;
+    }
+}
diff --git a/modules/rampart-samples/basic/sample04/README.txt b/modules/rampart-samples/basic/sample04/README.txt
new file mode 100644
index 0000000..df4599d
--- /dev/null
+++ b/modules/rampart-samples/basic/sample04/README.txt
@@ -0,0 +1,7 @@
+Message integrity and non-repudiation with signature
+
+Both client and servce are configured to sign the outgoing message and to verify
+the signature of the incoming message using their key pairs.
+	- See the "OutflowSecurity" and "InflowSecurity" parameters in the 
+      client.axis2.xml and serivces.xml files
+	
diff --git a/modules/rampart-samples/basic/sample04/client.axis2.xml b/modules/rampart-samples/basic/sample04/client.axis2.xml
new file mode 100644
index 0000000..6bef65d
--- /dev/null
+++ b/modules/rampart-samples/basic/sample04/client.axis2.xml
@@ -0,0 +1,483 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<axisconfig name="AxisJava2.0">
+    <module ref="rampart" />
+    
+    <parameter name="OutflowSecurity">
+      <action>
+        <items>Timestamp Signature</items>
+        <user>client</user>
+        <signaturePropFile>client.properties</signaturePropFile>
+        <passwordCallbackClass>org.apache.rampart.samples.sample04.PWCBHandler</passwordCallbackClass>
+        <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+      </action>
+    </parameter>
+
+    <parameter name="InflowSecurity">
+      <action>
+        <items>Timestamp Signature</items>
+        <signaturePropFile>client.properties</signaturePropFile>
+      </action>
+    </parameter>
+
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment">true</parameter>
+    <parameter name="hotupdate">false</parameter>
+    <parameter name="enableMTOM">false</parameter>
+    <parameter name="enableSwA">false</parameter>
+
+    <!--Uncomment if you want to enable file caching for attachments -->
+    <!--parameter name="cacheAttachments">true</parameter>
+    <parameter name="attachmentDIR"></parameter>
+    <parameter name="sizeThreshold">4000</parameter-->
+
+    <!--Uncomment if you want to enable the reduction of the in-memory cache of WSDL definitions -->
+    <!--In some server environments, the available memory heap is limited and can fill up under load -->
+    <!--Since in-memory copies of WSDL definitions can be large, some steps can be taken-->
+    <!--to reduce the memory needed for the cached WSDL definitions. -->
+    <!--parameter name="reduceWSDLMemoryCache">true</parameter-->
+                                                       
+    <!--This will give out the timout of the configuration contexts, in milliseconds-->
+    <parameter name="ConfigContextTimeoutInterval">30000</parameter>
+
+    <!--During a fault, stack trace can be sent with the fault message. The following flag will control -->
+    <!--that behavior.-->
+    <parameter name="sendStacktraceDetailsWithFaults">false</parameter>
+
+    <!--If there aren't any information available to find out the fault reason, we set the message of the exception-->
+    <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
+    <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
+    <!--is set, then Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
+    <parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
+
+    <parameter name="userName">admin</parameter>
+    <parameter name="password">axis2</parameter>
+
+    <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
+    <!--ServicesDirectory only works on the following cases-->
+    <!---File based configurator and in that case the value should be a file URL (http:// not allowed)-->
+    <!---When creating URL Based configurator with URL “file://”  -->
+    <!--- War based configurator with expanded case , -->
+
+    <!--All the other scenarios it will be ignored.-->
+    <!--<parameter name="ServicesDirectory">service</parameter>-->
+    <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
+    <!--<parameter name="ModulesDirectory">modules</parameter>-->
+
+
+
+    <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
+    <!--root which can configured using the following contextRoot parameter-->
+    <!--<parameter name="contextRoot">axis2</parameter>-->
+
+    <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints-->
+    <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -->
+    <!--context path to proper Axis2 servlets-->
+    <!--<parameter name="servicePath">services</parameter>-->
+    <!--<parameter name="restPath">rest</parameter>-->
+
+    <!-- Following parameter will completely disable REST handling in Axis2-->
+    <parameter name="disableREST" locked="true">false</parameter>
+    
+    <!-- Following parameter will suppress generation of SOAP 1.2 bindings in auto-generated WSDL files -->
+    <parameter name="disableSOAP12" locked="true">false</parameter>
+
+    <!-- ================================================= -->
+    <!-- Deployers -->
+    <!-- ================================================= -->
+
+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->
+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">
+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>
+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>
+    </deployer>
+    
+    <!--POJO deployer , this will alow users to drop .class file and make that into a service-->
+    <deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
+    <!--<deployer extension=".jsa" directory="rmiservices" class="org.apache.axis2.rmi.deploy.RMIServiceDeployer"/>-->
+    
+
+    <!-- Following parameter will set the host name for the epr-->
+    <!--<parameter name="hostname" locked="true">myhost.com</parameter>-->
+
+    <!-- If you have a front end host which exposes this webservice using a different public URL  -->
+    <!-- use this parameter to override autodetected url -->
+    <!--<parameter name="httpFrontendHostUrl">https://someotherhost/context</parameter>-->
+
+
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the deafult MessageReceiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovrride this for a particular service by adding the same element with your requirement-->
+     <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+
+    <!-- ================================================= -->
+    <!-- Message Formatter -->
+    <!-- ================================================= -->
+    <!--Following content type to message formatter mapping can be used to implement support for different message -->
+    <!--format  serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageFormatters>
+        <messageFormatter contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+        <messageFormatter contentType="multipart/form-data"
+                         class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
+        <messageFormatter contentType="application/xml"
+                         class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+        <messageFormatter contentType="text/xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+        <messageFormatter contentType="application/soap+xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+    </messageFormatters>
+
+    <!-- ================================================= -->
+    <!-- Message Builders -->
+    <!-- ================================================= -->
+    <!--Following content type to builder mapping can be used to implement support for different message -->
+    <!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageBuilders>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
+        <messageBuilder contentType="multipart/form-data"
+                         class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
+    </messageBuilders>
+
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port">8080</parameter>
+        <!-- Here is the complete list of supported parameters (see example settings further below):
+            port: the port to listen on (default 6060)
+            hostname:  if non-null, url prefix used in reply-to endpoint references                                 (default null)
+            originServer:  value of http Server header in outgoing messages                                         (default "Simple-Server/1.1")
+            requestTimeout:  value in millis of time that requests can wait for data                                (default 20000)
+            requestTcpNoDelay:  true to maximize performance and minimize latency                                   (default true)
+                                false to minimize bandwidth consumption by combining segments
+            requestCoreThreadPoolSize:  number of threads available for request processing (unless queue fills up)  (default 25)
+            requestMaxThreadPoolSize:  number of threads available for request processing if queue fills up         (default 150)
+                                       note that default queue never fills up:  see HttpFactory
+            threadKeepAliveTime:  time to keep threads in excess of core size alive while inactive                  (default 180)
+                                  note that no such threads can exist with default unbounded request queue
+            threadKeepAliveTimeUnit:  TimeUnit of value in threadKeepAliveTime (default SECONDS)                    (default SECONDS)
+        -->
+        <!-- <parameter name="hostname">http://www.myApp.com/ws</parameter> -->
+        <!-- <parameter name="originServer">My-Server/1.1</parameter>           -->
+        <!-- <parameter name="requestTimeout">10000</parameter>                   -->
+        <!-- <parameter name="requestTcpNoDelay">false</parameter>                   -->
+        <!-- <parameter name="requestCoreThreadPoolSize">50</parameter>                      -->
+        <!-- <parameter name="RequestMaxThreadPoolSize">100</parameter>                     -->
+        <!-- <parameter name="threadKeepAliveTime">240000</parameter>                  -->
+        <!-- <parameter name="threadKeepAliveTimeUnit">MILLISECONDS</parameter>            -->
+    </transportReceiver>
+
+    <!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)
+    <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
+        <parameter name="myTopicConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="myQueueConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="default">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+    </transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Listener  -->
+
+    <!-- the non blocking http transport based on HttpCore + NIO extensions
+    <transportReceiver name="http" class="org.apache.axis2.transport.nhttp.HttpCoreNIOListener">
+        <parameter name="port" locked="false">9000</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportReceiver>-->
+
+    <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions
+    <transportReceiver name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
+        <parameter name="port" locked="false">9002</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="SSLVerifyClient">require</parameter>
+            supports optional|require or defaults to none -->
+    <!--</transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Listener  -->
+    <!-- This is a sample configuration. It assumes a mail server running in localhost.
+         Listener pops  messages that comes to the email address red@localhost. Users
+         password is red. Listener connect to the server every 3000 milliseconds.
+         Parameters with "transport." prefix is Axis2 specific. Others are all from Java Mail API. 
+         http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+     -->
+    <!-- ================================================= -->
+    <!--<transportReceiver name="mailto" class="org.apache.axis2.transport.mail.SimpleMailListener">
+        <parameter name="mail.pop3.host">localhost</parameter>
+        <parameter name="mail.pop3.user">red</parameter>
+        <parameter name="mail.store.protocol">pop3</parameter>
+        <parameter name="transport.mail.pop3.password">red</parameter>
+        <parameter name="transport.mail.replyToAddress">red@localhost</parameter>
+        <parameter name="transport.listener.interval">3000</parameter>
+    </transportReceiver>-->
+
+    <!--Uncomment if you want to have TCP transport support-->
+    <!--transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port">6060</parameter-->>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncomment the following paramter , and set it as you required.-->
+        <!--<parameter name="hostname">tcp://myApp.com/ws</parameter>-->
+    <!-- /transportReceiver -->
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <!-- transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/ -->
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+
+        <!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages -->
+        <!--  <parameter name="OmitSOAP12Action">true</parameter>  -->
+    </transportSender>
+
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+    </transportSender>
+    <transportSender name="java"
+                     class="org.apache.axis2.transport.java.JavaTransportSender"/>
+
+    <!--<transportSender name="jms"-->
+                     <!--class="org.apache.axis2.transport.jms.JMSSender"/>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Sender  -->
+
+    <!-- the non-blocking http transport sender based on HttpCore + NIO extensions
+    <transportSender name="http"  class="org.apache.axis2.transport.nhttp.HttpCoreNIOSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportSender>-->
+
+    <!-- the non-blocking https transport sender based on HttpCore + NIO SSL extensions
+    <transportSender name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
+            supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
+    <!--</transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Sender  -->
+    <!--Only need to uncomment the sender. Configuration is achieved with every client.
+        At any instant mail host should be given. Sample configuration has been given.
+        http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+   -->
+    <!-- ================================================= -->
+   <!--<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
+        <parameter name="mail.smtp.host">localhost</parameter>
+    </transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
+    <!-- Comment this to disable Addressing -->
+    <module ref="addressing"/>
+
+    <!--Configuring module , providing parameters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
+    <!-- ================================================= -->
+    <!-- Clustering  -->
+    <!-- ================================================= -->
+    <!-- Configure and uncomment following for preparing Axis2 to a clustered environment -->
+    <!--
+    <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
+        <parameter name="param1">value1</parameter>
+        <parameter name="domain">apache.axis2.domain</parameter>
+        <parameter name="synchronizeAll">true</parameter>
+        <parameter name="maxRetries">10</parameter>
+        <configurationManager class="org.apache.axis2.cluster.configuration.TribesConfigurationManager">
+            <listener class="org.apache.axis2.cluster.configuration.DefaultConfigurationManagerListener"/>
+        </configurationManager>
+        <contextManager class="org.apache.axis2.cluster.context.TribesContextManager">
+            <listener class="org.apache.axis2.cluster.context.DefaultContextManagerListener"/>
+        </contextManager>
+    </cluster>
+    -->
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="InFlow">
+        <!--  System predefined phases       -->
+        <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+        </phase>
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--  System predefined phases       -->
+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->
+        <phase name="OperationInPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+    <phaseOrder type="InFaultFlow">
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationInFaultPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFaultFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+</axisconfig>
+
diff --git a/modules/rampart-samples/basic/sample04/services.xml b/modules/rampart-samples/basic/sample04/services.xml
new file mode 100644
index 0000000..daff4d3
--- /dev/null
+++ b/modules/rampart-samples/basic/sample04/services.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!--

+ !

+ ! Copyright 2006 The Apache Software Foundation.

+ !

+ ! Licensed under the Apache License, Version 2.0 (the "License");

+ ! you may not use this file except in compliance with the License.

+ ! You may obtain a copy of the License at

+ !

+ !      http://www.apache.org/licenses/LICENSE-2.0

+ !

+ ! Unless required by applicable law or agreed to in writing, software

+ ! distributed under the License is distributed on an "AS IS" BASIS,

+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ! See the License for the specific language governing permissions and

+ ! limitations under the License.

+ !-->

+<!-- services.xml of sample-4 : Signature only -->

+<service>

+	<operation name="echo">

+		<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>

+	</operation>    

+	<parameter name="ServiceClass" locked="false">org.apache.rampart.samples.sample04.SimpleService</parameter>

+

+	<module ref="rampart" />

+

+    <parameter name="InflowSecurity">

+      <action>

+        <items>Timestamp Signature</items>

+        <signaturePropFile>service.properties</signaturePropFile>

+      </action>

+    </parameter>

+	

+	<parameter name="OutflowSecurity">

+      <action>

+        <items>Timestamp Signature</items>

+        <user>service</user>

+        <passwordCallbackClass>org.apache.rampart.samples.sample04.PWCBHandler</passwordCallbackClass>

+        <signaturePropFile>service.properties</signaturePropFile>

+        <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>

+      </action>

+    </parameter>

+    

+</service>

diff --git a/modules/rampart-samples/basic/sample04/src/org/apache/rampart/samples/sample04/Client.java b/modules/rampart-samples/basic/sample04/src/org/apache/rampart/samples/sample04/Client.java
new file mode 100644
index 0000000..e27bf8f
--- /dev/null
+++ b/modules/rampart-samples/basic/sample04/src/org/apache/rampart/samples/sample04/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample04;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+
+public class Client {
+
+    public static void main(String[] args) throws Exception {
+        
+        if(args.length != 2) {
+            System.out.println("Usage: $java Client endpoint_address client_repo_path");
+        }
+        
+        ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[1], args[1] + "/conf/axis2.xml");
+        
+        ServiceClient client = new ServiceClient(ctx, null);
+        Options options = new Options();
+        options.setAction("urn:echo");
+        options.setTo(new EndpointReference(args[0]));
+        client.setOptions(options);
+        
+        OMElement response = client.sendReceive(getPayload("Hello world"));
+        
+        System.out.println(response);
+        
+    }
+    
+    private static OMElement getPayload(String value) {
+        OMFactory factory = OMAbstractFactory.getOMFactory();
+        OMNamespace ns = factory.createOMNamespace("http://sample04.samples.rampart.apache.org","ns1");
+        OMElement elem = factory.createOMElement("echo", ns);
+        OMElement childElem = factory.createOMElement("param0", null);
+        childElem.setText(value);
+        elem.addChild(childElem);
+        
+        return elem;
+    }
+    
+}
diff --git a/modules/rampart-samples/basic/sample04/src/org/apache/rampart/samples/sample04/PWCBHandler.java b/modules/rampart-samples/basic/sample04/src/org/apache/rampart/samples/sample04/PWCBHandler.java
new file mode 100644
index 0000000..39dbe59
--- /dev/null
+++ b/modules/rampart-samples/basic/sample04/src/org/apache/rampart/samples/sample04/PWCBHandler.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample04;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import java.io.IOException;
+
+public class PWCBHandler implements CallbackHandler {
+
+    public void handle(Callback[] callbacks) throws IOException,
+            UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
+            WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+            
+            String id = pwcb.getIdentifier();
+            if("client".equals(id)) {
+                pwcb.setPassword("apache");
+            } else if("service".equals(id)) {
+                pwcb.setPassword("apache");
+            }
+        }
+    }
+
+}
diff --git a/modules/rampart-samples/basic/sample04/src/org/apache/rampart/samples/sample04/SimpleService.java b/modules/rampart-samples/basic/sample04/src/org/apache/rampart/samples/sample04/SimpleService.java
new file mode 100644
index 0000000..9132949
--- /dev/null
+++ b/modules/rampart-samples/basic/sample04/src/org/apache/rampart/samples/sample04/SimpleService.java
@@ -0,0 +1,25 @@
+package org.apache.rampart.samples.sample04;
+/*
+
+ * Copyright  2003-2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+public class SimpleService {
+    
+    public String echo(String arg) {
+        return arg;
+    }
+}
diff --git a/modules/rampart-samples/basic/sample05/README.txt b/modules/rampart-samples/basic/sample05/README.txt
new file mode 100644
index 0000000..8ca2fd8
--- /dev/null
+++ b/modules/rampart-samples/basic/sample05/README.txt
@@ -0,0 +1,7 @@
+Encrypting messages
+
+Both client and servce are configured to encrypt the outgoing message and to 
+decrypt incoming message using their key pairs.
+	- See the "OutflowSecurity" and "InflowSecurity" parameters in the 
+      client.axis2.xml and serivces.xml files
+	
diff --git a/modules/rampart-samples/basic/sample05/client.axis2.xml b/modules/rampart-samples/basic/sample05/client.axis2.xml
new file mode 100644
index 0000000..1e2a613
--- /dev/null
+++ b/modules/rampart-samples/basic/sample05/client.axis2.xml
@@ -0,0 +1,482 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<axisconfig name="AxisJava2.0">
+    <module ref="rampart" />
+
+    <parameter name="OutflowSecurity">
+      <action>
+        <items>Encrypt</items>
+        <encryptionUser>service</encryptionUser>
+        <encryptionPropFile>client.properties</encryptionPropFile>
+      </action>
+    </parameter>
+
+    <parameter name="InflowSecurity">
+      <action>
+        <items>Encrypt</items>
+        <passwordCallbackClass>org.apache.rampart.samples.sample05.PWCBHandler</passwordCallbackClass>
+        <decryptionPropFile>client.properties</decryptionPropFile>
+      </action>
+    </parameter>
+
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment">true</parameter>
+    <parameter name="hotupdate">false</parameter>
+    <parameter name="enableMTOM">false</parameter>
+    <parameter name="enableSwA">false</parameter>
+
+    <!--Uncomment if you want to enable file caching for attachments -->
+    <!--parameter name="cacheAttachments">true</parameter>
+    <parameter name="attachmentDIR"></parameter>
+    <parameter name="sizeThreshold">4000</parameter-->
+
+    <!--Uncomment if you want to enable the reduction of the in-memory cache of WSDL definitions -->
+    <!--In some server environments, the available memory heap is limited and can fill up under load -->
+    <!--Since in-memory copies of WSDL definitions can be large, some steps can be taken-->
+    <!--to reduce the memory needed for the cached WSDL definitions. -->
+    <!--parameter name="reduceWSDLMemoryCache">true</parameter-->
+                                                       
+    <!--This will give out the timout of the configuration contexts, in milliseconds-->
+    <parameter name="ConfigContextTimeoutInterval">30000</parameter>
+
+    <!--During a fault, stack trace can be sent with the fault message. The following flag will control -->
+    <!--that behavior.-->
+    <parameter name="sendStacktraceDetailsWithFaults">false</parameter>
+
+    <!--If there aren't any information available to find out the fault reason, we set the message of the exception-->
+    <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
+    <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
+    <!--is set, then Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
+    <parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
+
+    <parameter name="userName">admin</parameter>
+    <parameter name="password">axis2</parameter>
+
+    <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
+    <!--ServicesDirectory only works on the following cases-->
+    <!---File based configurator and in that case the value should be a file URL (http:// not allowed)-->
+    <!---When creating URL Based configurator with URL “file://”  -->
+    <!--- War based configurator with expanded case , -->
+
+    <!--All the other scenarios it will be ignored.-->
+    <!--<parameter name="ServicesDirectory">service</parameter>-->
+    <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
+    <!--<parameter name="ModulesDirectory">modules</parameter>-->
+
+
+
+    <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
+    <!--root which can configured using the following contextRoot parameter-->
+    <!--<parameter name="contextRoot">axis2</parameter>-->
+
+    <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints-->
+    <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -->
+    <!--context path to proper Axis2 servlets-->
+    <!--<parameter name="servicePath">services</parameter>-->
+    <!--<parameter name="restPath">rest</parameter>-->
+
+    <!-- Following parameter will completely disable REST handling in Axis2-->
+    <parameter name="disableREST" locked="true">false</parameter>
+    
+    <!-- Following parameter will suppress generation of SOAP 1.2 bindings in auto-generated WSDL files -->
+    <parameter name="disableSOAP12" locked="true">false</parameter>
+
+    <!-- ================================================= -->
+    <!-- Deployers -->
+    <!-- ================================================= -->
+
+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->
+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">
+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>
+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>
+    </deployer>
+    
+    <!--POJO deployer , this will alow users to drop .class file and make that into a service-->
+    <deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
+    <!--<deployer extension=".jsa" directory="rmiservices" class="org.apache.axis2.rmi.deploy.RMIServiceDeployer"/>-->
+    
+
+    <!-- Following parameter will set the host name for the epr-->
+    <!--<parameter name="hostname" locked="true">myhost.com</parameter>-->
+
+    <!-- If you have a front end host which exposes this webservice using a different public URL  -->
+    <!-- use this parameter to override autodetected url -->
+    <!--<parameter name="httpFrontendHostUrl">https://someotherhost/context</parameter>-->
+
+
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the deafult MessageReceiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovrride this for a particular service by adding the same element with your requirement-->
+     <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+
+    <!-- ================================================= -->
+    <!-- Message Formatter -->
+    <!-- ================================================= -->
+    <!--Following content type to message formatter mapping can be used to implement support for different message -->
+    <!--format  serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageFormatters>
+        <messageFormatter contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+        <messageFormatter contentType="multipart/form-data"
+                         class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
+        <messageFormatter contentType="application/xml"
+                         class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+        <messageFormatter contentType="text/xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+        <messageFormatter contentType="application/soap+xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+    </messageFormatters>
+
+    <!-- ================================================= -->
+    <!-- Message Builders -->
+    <!-- ================================================= -->
+    <!--Following content type to builder mapping can be used to implement support for different message -->
+    <!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageBuilders>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
+        <messageBuilder contentType="multipart/form-data"
+                         class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
+    </messageBuilders>
+
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port">8080</parameter>
+        <!-- Here is the complete list of supported parameters (see example settings further below):
+            port: the port to listen on (default 6060)
+            hostname:  if non-null, url prefix used in reply-to endpoint references                                 (default null)
+            originServer:  value of http Server header in outgoing messages                                         (default "Simple-Server/1.1")
+            requestTimeout:  value in millis of time that requests can wait for data                                (default 20000)
+            requestTcpNoDelay:  true to maximize performance and minimize latency                                   (default true)
+                                false to minimize bandwidth consumption by combining segments
+            requestCoreThreadPoolSize:  number of threads available for request processing (unless queue fills up)  (default 25)
+            requestMaxThreadPoolSize:  number of threads available for request processing if queue fills up         (default 150)
+                                       note that default queue never fills up:  see HttpFactory
+            threadKeepAliveTime:  time to keep threads in excess of core size alive while inactive                  (default 180)
+                                  note that no such threads can exist with default unbounded request queue
+            threadKeepAliveTimeUnit:  TimeUnit of value in threadKeepAliveTime (default SECONDS)                    (default SECONDS)
+        -->
+        <!-- <parameter name="hostname">http://www.myApp.com/ws</parameter> -->
+        <!-- <parameter name="originServer">My-Server/1.1</parameter>           -->
+        <!-- <parameter name="requestTimeout">10000</parameter>                   -->
+        <!-- <parameter name="requestTcpNoDelay">false</parameter>                   -->
+        <!-- <parameter name="requestCoreThreadPoolSize">50</parameter>                      -->
+        <!-- <parameter name="RequestMaxThreadPoolSize">100</parameter>                     -->
+        <!-- <parameter name="threadKeepAliveTime">240000</parameter>                  -->
+        <!-- <parameter name="threadKeepAliveTimeUnit">MILLISECONDS</parameter>            -->
+    </transportReceiver>
+
+    <!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)
+    <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
+        <parameter name="myTopicConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="myQueueConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="default">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+    </transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Listener  -->
+
+    <!-- the non blocking http transport based on HttpCore + NIO extensions
+    <transportReceiver name="http" class="org.apache.axis2.transport.nhttp.HttpCoreNIOListener">
+        <parameter name="port" locked="false">9000</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportReceiver>-->
+
+    <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions
+    <transportReceiver name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
+        <parameter name="port" locked="false">9002</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="SSLVerifyClient">require</parameter>
+            supports optional|require or defaults to none -->
+    <!--</transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Listener  -->
+    <!-- This is a sample configuration. It assumes a mail server running in localhost.
+         Listener pops  messages that comes to the email address red@localhost. Users
+         password is red. Listener connect to the server every 3000 milliseconds.
+         Parameters with "transport." prefix is Axis2 specific. Others are all from Java Mail API. 
+         http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+     -->
+    <!-- ================================================= -->
+    <!--<transportReceiver name="mailto" class="org.apache.axis2.transport.mail.SimpleMailListener">
+        <parameter name="mail.pop3.host">localhost</parameter>
+        <parameter name="mail.pop3.user">red</parameter>
+        <parameter name="mail.store.protocol">pop3</parameter>
+        <parameter name="transport.mail.pop3.password">red</parameter>
+        <parameter name="transport.mail.replyToAddress">red@localhost</parameter>
+        <parameter name="transport.listener.interval">3000</parameter>
+    </transportReceiver>-->
+
+    <!--Uncomment if you want to have TCP transport support-->
+    <!--transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port">6060</parameter-->>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncomment the following paramter , and set it as you required.-->
+        <!--<parameter name="hostname">tcp://myApp.com/ws</parameter>-->
+    <!-- /transportReceiver -->
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <!-- transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/ -->
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+
+        <!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages -->
+        <!--  <parameter name="OmitSOAP12Action">true</parameter>  -->
+    </transportSender>
+
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+    </transportSender>
+    <transportSender name="java"
+                     class="org.apache.axis2.transport.java.JavaTransportSender"/>
+
+    <!--<transportSender name="jms"-->
+                     <!--class="org.apache.axis2.transport.jms.JMSSender"/>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Sender  -->
+
+    <!-- the non-blocking http transport sender based on HttpCore + NIO extensions
+    <transportSender name="http"  class="org.apache.axis2.transport.nhttp.HttpCoreNIOSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportSender>-->
+
+    <!-- the non-blocking https transport sender based on HttpCore + NIO SSL extensions
+    <transportSender name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
+            supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
+    <!--</transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Sender  -->
+    <!--Only need to uncomment the sender. Configuration is achieved with every client.
+        At any instant mail host should be given. Sample configuration has been given.
+        http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+   -->
+    <!-- ================================================= -->
+   <!--<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
+        <parameter name="mail.smtp.host">localhost</parameter>
+    </transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
+    <!-- Comment this to disable Addressing -->
+    <module ref="addressing"/>
+
+    <!--Configuring module , providing parameters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
+    <!-- ================================================= -->
+    <!-- Clustering  -->
+    <!-- ================================================= -->
+    <!-- Configure and uncomment following for preparing Axis2 to a clustered environment -->
+    <!--
+    <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
+        <parameter name="param1">value1</parameter>
+        <parameter name="domain">apache.axis2.domain</parameter>
+        <parameter name="synchronizeAll">true</parameter>
+        <parameter name="maxRetries">10</parameter>
+        <configurationManager class="org.apache.axis2.cluster.configuration.TribesConfigurationManager">
+            <listener class="org.apache.axis2.cluster.configuration.DefaultConfigurationManagerListener"/>
+        </configurationManager>
+        <contextManager class="org.apache.axis2.cluster.context.TribesContextManager">
+            <listener class="org.apache.axis2.cluster.context.DefaultContextManagerListener"/>
+        </contextManager>
+    </cluster>
+    -->
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="InFlow">
+        <!--  System predefined phases       -->
+        <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+        </phase>
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--  System predefined phases       -->
+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->
+        <phase name="OperationInPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+    <phaseOrder type="InFaultFlow">
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationInFaultPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFaultFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+</axisconfig>
+
diff --git a/modules/rampart-samples/basic/sample05/services.xml b/modules/rampart-samples/basic/sample05/services.xml
new file mode 100644
index 0000000..2b329a8
--- /dev/null
+++ b/modules/rampart-samples/basic/sample05/services.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!--

+ !

+ ! Copyright 2006 The Apache Software Foundation.

+ !

+ ! Licensed under the Apache License, Version 2.0 (the "License");

+ ! you may not use this file except in compliance with the License.

+ ! You may obtain a copy of the License at

+ !

+ !      http://www.apache.org/licenses/LICENSE-2.0

+ !

+ ! Unless required by applicable law or agreed to in writing, software

+ ! distributed under the License is distributed on an "AS IS" BASIS,

+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ! See the License for the specific language governing permissions and

+ ! limitations under the License.

+ !-->

+<!-- services.xml of sample-5 : Encryption only -->

+<service>

+	<operation name="echo">

+		<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>

+	</operation>    

+	<parameter name="ServiceClass" locked="false">org.apache.rampart.samples.sample05.SimpleService</parameter>

+	

+	<module ref="rampart" />

+		

+    <parameter name="InflowSecurity">

+      <action>

+        <items>Encrypt</items>

+        <passwordCallbackClass>org.apache.rampart.samples.sample05.PWCBHandler</passwordCallbackClass>

+        <decryptionPropFile>service.properties</decryptionPropFile>

+      </action>

+    </parameter>

+    

+	<parameter name="OutflowSecurity">

+      <action>

+        <items>Encrypt</items>

+        <encryptionUser>client</encryptionUser>

+        <encryptionPropFile>service.properties</encryptionPropFile>

+      </action>

+    </parameter>

+

+

+	

+</service>

diff --git a/modules/rampart-samples/basic/sample05/src/org/apache/rampart/samples/sample05/Client.java b/modules/rampart-samples/basic/sample05/src/org/apache/rampart/samples/sample05/Client.java
new file mode 100644
index 0000000..7695f88
--- /dev/null
+++ b/modules/rampart-samples/basic/sample05/src/org/apache/rampart/samples/sample05/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample05;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+
+public class Client {
+
+    public static void main(String[] args) throws Exception {
+        
+        if(args.length != 2) {
+            System.out.println("Usage: $java Client endpoint_address client_repo_path");
+        }
+        
+        ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[1], args[1] + "/conf/axis2.xml");
+        
+        ServiceClient client = new ServiceClient(ctx, null);
+        Options options = new Options();
+        options.setAction("urn:echo");
+        options.setTo(new EndpointReference(args[0]));
+        client.setOptions(options);
+        
+        OMElement response = client.sendReceive(getPayload("Hello world"));
+        
+        System.out.println(response);
+        
+    }
+    
+    private static OMElement getPayload(String value) {
+        OMFactory factory = OMAbstractFactory.getOMFactory();
+        OMNamespace ns = factory.createOMNamespace("http://sample05.samples.rampart.apache.org","ns1");
+        OMElement elem = factory.createOMElement("echo", ns);
+        OMElement childElem = factory.createOMElement("param0", null);
+        childElem.setText(value);
+        elem.addChild(childElem);
+        
+        return elem;
+    }
+    
+}
diff --git a/modules/rampart-samples/basic/sample05/src/org/apache/rampart/samples/sample05/PWCBHandler.java b/modules/rampart-samples/basic/sample05/src/org/apache/rampart/samples/sample05/PWCBHandler.java
new file mode 100644
index 0000000..8976f73
--- /dev/null
+++ b/modules/rampart-samples/basic/sample05/src/org/apache/rampart/samples/sample05/PWCBHandler.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample05;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import java.io.IOException;
+
+public class PWCBHandler implements CallbackHandler {
+
+    public void handle(Callback[] callbacks) throws IOException,
+            UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
+            WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+            
+            String id = pwcb.getIdentifier();
+            if("client".equals(id)) {
+                pwcb.setPassword("apache");
+            } else if("service".equals(id)) {
+                pwcb.setPassword("apache");
+            }
+        }
+    }
+
+}
diff --git a/modules/rampart-samples/basic/sample05/src/org/apache/rampart/samples/sample05/SimpleService.java b/modules/rampart-samples/basic/sample05/src/org/apache/rampart/samples/sample05/SimpleService.java
new file mode 100644
index 0000000..083a322
--- /dev/null
+++ b/modules/rampart-samples/basic/sample05/src/org/apache/rampart/samples/sample05/SimpleService.java
@@ -0,0 +1,25 @@
+package org.apache.rampart.samples.sample05;
+/*
+
+ * Copyright  2003-2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+public class SimpleService {
+    
+    public String echo(String arg) {
+        return arg;
+    }
+}
diff --git a/modules/rampart-samples/basic/sample06/README.txt b/modules/rampart-samples/basic/sample06/README.txt
new file mode 100644
index 0000000..54642b5
--- /dev/null
+++ b/modules/rampart-samples/basic/sample06/README.txt
@@ -0,0 +1,8 @@
+Sign and encrypt messages
+
+Both client and servce are configured to first sign and then encrypt the 
+outgoing message and to decrypt and verify the incoming message using their 
+key pairs.
+	- See the "OutflowSecurity" and "InflowSecurity" parameters in the 
+      client.axis2.xml and serivces.xml files
+	
diff --git a/modules/rampart-samples/basic/sample06/client.axis2.xml b/modules/rampart-samples/basic/sample06/client.axis2.xml
new file mode 100644
index 0000000..f3d11f4
--- /dev/null
+++ b/modules/rampart-samples/basic/sample06/client.axis2.xml
@@ -0,0 +1,488 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<axisconfig name="AxisJava2.0">
+
+    <!--Signature and Encryption : Using the request's certificate-->
+    <module ref="rampart" />
+    
+    <parameter name="OutflowSecurity">
+      <action>
+        <items>Timestamp Signature Encrypt</items>
+        <user>client</user>
+        <passwordCallbackClass>org.apache.rampart.samples.sample06.PWCBHandler</passwordCallbackClass>
+        <signaturePropFile>client.properties</signaturePropFile>
+        <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+        <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+        <encryptionUser>service</encryptionUser>
+      </action>
+    </parameter>
+
+    <parameter name="InflowSecurity">
+      <action>
+        <items>Timestamp Signature Encrypt</items>
+        <passwordCallbackClass>org.apache.rampart.samples.sample06.PWCBHandler</passwordCallbackClass>
+        <signaturePropFile>client.properties</signaturePropFile>
+      </action>
+    </parameter>
+
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment">true</parameter>
+    <parameter name="hotupdate">false</parameter>
+    <parameter name="enableMTOM">false</parameter>
+    <parameter name="enableSwA">false</parameter>
+
+    <!--Uncomment if you want to enable file caching for attachments -->
+    <!--parameter name="cacheAttachments">true</parameter>
+    <parameter name="attachmentDIR"></parameter>
+    <parameter name="sizeThreshold">4000</parameter-->
+
+    <!--Uncomment if you want to enable the reduction of the in-memory cache of WSDL definitions -->
+    <!--In some server environments, the available memory heap is limited and can fill up under load -->
+    <!--Since in-memory copies of WSDL definitions can be large, some steps can be taken-->
+    <!--to reduce the memory needed for the cached WSDL definitions. -->
+    <!--parameter name="reduceWSDLMemoryCache">true</parameter-->
+                                                       
+    <!--This will give out the timout of the configuration contexts, in milliseconds-->
+    <parameter name="ConfigContextTimeoutInterval">30000</parameter>
+
+    <!--During a fault, stack trace can be sent with the fault message. The following flag will control -->
+    <!--that behavior.-->
+    <parameter name="sendStacktraceDetailsWithFaults">false</parameter>
+
+    <!--If there aren't any information available to find out the fault reason, we set the message of the exception-->
+    <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
+    <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
+    <!--is set, then Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
+    <parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
+
+    <parameter name="userName">admin</parameter>
+    <parameter name="password">axis2</parameter>
+
+    <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
+    <!--ServicesDirectory only works on the following cases-->
+    <!---File based configurator and in that case the value should be a file URL (http:// not allowed)-->
+    <!---When creating URL Based configurator with URL “file://”  -->
+    <!--- War based configurator with expanded case , -->
+
+    <!--All the other scenarios it will be ignored.-->
+    <!--<parameter name="ServicesDirectory">service</parameter>-->
+    <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
+    <!--<parameter name="ModulesDirectory">modules</parameter>-->
+
+
+
+    <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
+    <!--root which can configured using the following contextRoot parameter-->
+    <!--<parameter name="contextRoot">axis2</parameter>-->
+
+    <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints-->
+    <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -->
+    <!--context path to proper Axis2 servlets-->
+    <!--<parameter name="servicePath">services</parameter>-->
+    <!--<parameter name="restPath">rest</parameter>-->
+
+    <!-- Following parameter will completely disable REST handling in Axis2-->
+    <parameter name="disableREST" locked="true">false</parameter>
+    
+    <!-- Following parameter will suppress generation of SOAP 1.2 bindings in auto-generated WSDL files -->
+    <parameter name="disableSOAP12" locked="true">false</parameter>
+
+    <!-- ================================================= -->
+    <!-- Deployers -->
+    <!-- ================================================= -->
+
+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->
+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">
+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>
+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>
+    </deployer>
+    
+    <!--POJO deployer , this will alow users to drop .class file and make that into a service-->
+    <deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
+    <!--<deployer extension=".jsa" directory="rmiservices" class="org.apache.axis2.rmi.deploy.RMIServiceDeployer"/>-->
+    
+
+    <!-- Following parameter will set the host name for the epr-->
+    <!--<parameter name="hostname" locked="true">myhost.com</parameter>-->
+
+    <!-- If you have a front end host which exposes this webservice using a different public URL  -->
+    <!-- use this parameter to override autodetected url -->
+    <!--<parameter name="httpFrontendHostUrl">https://someotherhost/context</parameter>-->
+
+
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the deafult MessageReceiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovrride this for a particular service by adding the same element with your requirement-->
+     <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+
+    <!-- ================================================= -->
+    <!-- Message Formatter -->
+    <!-- ================================================= -->
+    <!--Following content type to message formatter mapping can be used to implement support for different message -->
+    <!--format  serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageFormatters>
+        <messageFormatter contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+        <messageFormatter contentType="multipart/form-data"
+                         class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
+        <messageFormatter contentType="application/xml"
+                         class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+        <messageFormatter contentType="text/xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+        <messageFormatter contentType="application/soap+xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+    </messageFormatters>
+
+    <!-- ================================================= -->
+    <!-- Message Builders -->
+    <!-- ================================================= -->
+    <!--Following content type to builder mapping can be used to implement support for different message -->
+    <!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageBuilders>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
+        <messageBuilder contentType="multipart/form-data"
+                         class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
+    </messageBuilders>
+
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port">8080</parameter>
+        <!-- Here is the complete list of supported parameters (see example settings further below):
+            port: the port to listen on (default 6060)
+            hostname:  if non-null, url prefix used in reply-to endpoint references                                 (default null)
+            originServer:  value of http Server header in outgoing messages                                         (default "Simple-Server/1.1")
+            requestTimeout:  value in millis of time that requests can wait for data                                (default 20000)
+            requestTcpNoDelay:  true to maximize performance and minimize latency                                   (default true)
+                                false to minimize bandwidth consumption by combining segments
+            requestCoreThreadPoolSize:  number of threads available for request processing (unless queue fills up)  (default 25)
+            requestMaxThreadPoolSize:  number of threads available for request processing if queue fills up         (default 150)
+                                       note that default queue never fills up:  see HttpFactory
+            threadKeepAliveTime:  time to keep threads in excess of core size alive while inactive                  (default 180)
+                                  note that no such threads can exist with default unbounded request queue
+            threadKeepAliveTimeUnit:  TimeUnit of value in threadKeepAliveTime (default SECONDS)                    (default SECONDS)
+        -->
+        <!-- <parameter name="hostname">http://www.myApp.com/ws</parameter> -->
+        <!-- <parameter name="originServer">My-Server/1.1</parameter>           -->
+        <!-- <parameter name="requestTimeout">10000</parameter>                   -->
+        <!-- <parameter name="requestTcpNoDelay">false</parameter>                   -->
+        <!-- <parameter name="requestCoreThreadPoolSize">50</parameter>                      -->
+        <!-- <parameter name="RequestMaxThreadPoolSize">100</parameter>                     -->
+        <!-- <parameter name="threadKeepAliveTime">240000</parameter>                  -->
+        <!-- <parameter name="threadKeepAliveTimeUnit">MILLISECONDS</parameter>            -->
+    </transportReceiver>
+
+    <!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)
+    <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
+        <parameter name="myTopicConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="myQueueConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="default">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+    </transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Listener  -->
+
+    <!-- the non blocking http transport based on HttpCore + NIO extensions
+    <transportReceiver name="http" class="org.apache.axis2.transport.nhttp.HttpCoreNIOListener">
+        <parameter name="port" locked="false">9000</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportReceiver>-->
+
+    <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions
+    <transportReceiver name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
+        <parameter name="port" locked="false">9002</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="SSLVerifyClient">require</parameter>
+            supports optional|require or defaults to none -->
+    <!--</transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Listener  -->
+    <!-- This is a sample configuration. It assumes a mail server running in localhost.
+         Listener pops  messages that comes to the email address red@localhost. Users
+         password is red. Listener connect to the server every 3000 milliseconds.
+         Parameters with "transport." prefix is Axis2 specific. Others are all from Java Mail API. 
+         http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+     -->
+    <!-- ================================================= -->
+    <!--<transportReceiver name="mailto" class="org.apache.axis2.transport.mail.SimpleMailListener">
+        <parameter name="mail.pop3.host">localhost</parameter>
+        <parameter name="mail.pop3.user">red</parameter>
+        <parameter name="mail.store.protocol">pop3</parameter>
+        <parameter name="transport.mail.pop3.password">red</parameter>
+        <parameter name="transport.mail.replyToAddress">red@localhost</parameter>
+        <parameter name="transport.listener.interval">3000</parameter>
+    </transportReceiver>-->
+
+    <!--Uncomment if you want to have TCP transport support-->
+    <!--transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port">6060</parameter-->>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncomment the following paramter , and set it as you required.-->
+        <!--<parameter name="hostname">tcp://myApp.com/ws</parameter>-->
+    <!-- /transportReceiver -->
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <!-- transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/ -->
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+
+        <!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages -->
+        <!--  <parameter name="OmitSOAP12Action">true</parameter>  -->
+    </transportSender>
+
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+    </transportSender>
+    <transportSender name="java"
+                     class="org.apache.axis2.transport.java.JavaTransportSender"/>
+
+    <!--<transportSender name="jms"-->
+                     <!--class="org.apache.axis2.transport.jms.JMSSender"/>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Sender  -->
+
+    <!-- the non-blocking http transport sender based on HttpCore + NIO extensions
+    <transportSender name="http"  class="org.apache.axis2.transport.nhttp.HttpCoreNIOSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportSender>-->
+
+    <!-- the non-blocking https transport sender based on HttpCore + NIO SSL extensions
+    <transportSender name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
+            supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
+    <!--</transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Sender  -->
+    <!--Only need to uncomment the sender. Configuration is achieved with every client.
+        At any instant mail host should be given. Sample configuration has been given.
+        http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+   -->
+    <!-- ================================================= -->
+   <!--<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
+        <parameter name="mail.smtp.host">localhost</parameter>
+    </transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
+    <!-- Comment this to disable Addressing -->
+    <module ref="addressing"/>
+
+    <!--Configuring module , providing parameters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
+    <!-- ================================================= -->
+    <!-- Clustering  -->
+    <!-- ================================================= -->
+    <!-- Configure and uncomment following for preparing Axis2 to a clustered environment -->
+    <!--
+    <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
+        <parameter name="param1">value1</parameter>
+        <parameter name="domain">apache.axis2.domain</parameter>
+        <parameter name="synchronizeAll">true</parameter>
+        <parameter name="maxRetries">10</parameter>
+        <configurationManager class="org.apache.axis2.cluster.configuration.TribesConfigurationManager">
+            <listener class="org.apache.axis2.cluster.configuration.DefaultConfigurationManagerListener"/>
+        </configurationManager>
+        <contextManager class="org.apache.axis2.cluster.context.TribesContextManager">
+            <listener class="org.apache.axis2.cluster.context.DefaultContextManagerListener"/>
+        </contextManager>
+    </cluster>
+    -->
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="InFlow">
+        <!--  System predefined phases       -->
+        <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+        </phase>
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--  System predefined phases       -->
+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->
+        <phase name="OperationInPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+    <phaseOrder type="InFaultFlow">
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationInFaultPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFaultFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+</axisconfig>
+
diff --git a/modules/rampart-samples/basic/sample06/services.xml b/modules/rampart-samples/basic/sample06/services.xml
new file mode 100644
index 0000000..2c9b865
--- /dev/null
+++ b/modules/rampart-samples/basic/sample06/services.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!--

+ !

+ ! Copyright 2006 The Apache Software Foundation.

+ !

+ ! Licensed under the Apache License, Version 2.0 (the "License");

+ ! you may not use this file except in compliance with the License.

+ ! You may obtain a copy of the License at

+ !

+ !      http://www.apache.org/licenses/LICENSE-2.0

+ !

+ ! Unless required by applicable law or agreed to in writing, software

+ ! distributed under the License is distributed on an "AS IS" BASIS,

+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ! See the License for the specific language governing permissions and

+ ! limitations under the License.

+ !-->

+<!-- services.xml of sample-6 : Signature and Encryption : Using the request's certificate-->

+<service>

+	<operation name="echo">

+		<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>

+	</operation>    

+	<parameter name="ServiceClass" locked="false">org.apache.rampart.samples.sample06.SimpleService</parameter>

+	

+	<module ref="rampart" />

+	

+    <parameter name="InflowSecurity">

+      <action>

+        <items>Timestamp Signature Encrypt</items>

+        <passwordCallbackClass>org.apache.rampart.samples.sample06.PWCBHandler</passwordCallbackClass>

+        <signaturePropFile>service.properties</signaturePropFile>

+      </action>

+    </parameter>

+    

+    <parameter name="OutflowSecurity">

+      <action>

+        <items>Timestamp Signature Encrypt</items>

+        <user>service</user>

+        <passwordCallbackClass>org.apache.rampart.samples.sample06.PWCBHandler</passwordCallbackClass>

+        <signaturePropFile>service.properties</signaturePropFile>

+        <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>

+        <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>

+        <encryptionUser>useReqSigCert</encryptionUser>

+      </action>

+    </parameter>

+    

+</service>

diff --git a/modules/rampart-samples/basic/sample06/src/org/apache/rampart/samples/sample06/Client.java b/modules/rampart-samples/basic/sample06/src/org/apache/rampart/samples/sample06/Client.java
new file mode 100644
index 0000000..441950c
--- /dev/null
+++ b/modules/rampart-samples/basic/sample06/src/org/apache/rampart/samples/sample06/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample06;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+
+public class Client {
+
+    public static void main(String[] args) throws Exception {
+        
+        if(args.length != 2) {
+            System.out.println("Usage: $java Client endpoint_address client_repo_path");
+        }
+        
+        ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[1], args[1] + "/conf/axis2.xml");
+        
+        ServiceClient client = new ServiceClient(ctx, null);
+        Options options = new Options();
+        options.setAction("urn:echo");
+        options.setTo(new EndpointReference(args[0]));
+        client.setOptions(options);
+        
+        OMElement response = client.sendReceive(getPayload("Hello world"));
+        
+        System.out.println(response);
+        
+    }
+    
+    private static OMElement getPayload(String value) {
+        OMFactory factory = OMAbstractFactory.getOMFactory();
+        OMNamespace ns = factory.createOMNamespace("http://sample06.samples.rampart.apache.org","ns1");
+        OMElement elem = factory.createOMElement("echo", ns);
+        OMElement childElem = factory.createOMElement("param0", null);
+        childElem.setText(value);
+        elem.addChild(childElem);
+        
+        return elem;
+    }
+    
+}
diff --git a/modules/rampart-samples/basic/sample06/src/org/apache/rampart/samples/sample06/PWCBHandler.java b/modules/rampart-samples/basic/sample06/src/org/apache/rampart/samples/sample06/PWCBHandler.java
new file mode 100644
index 0000000..5adb7d5
--- /dev/null
+++ b/modules/rampart-samples/basic/sample06/src/org/apache/rampart/samples/sample06/PWCBHandler.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample06;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import java.io.IOException;
+
+public class PWCBHandler implements CallbackHandler {
+
+    public void handle(Callback[] callbacks) throws IOException,
+            UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
+            WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+            
+            String id = pwcb.getIdentifier();
+            if("client".equals(id)) {
+                pwcb.setPassword("apache");
+            } else if("service".equals(id)) {
+                pwcb.setPassword("apache");
+            }
+        }
+    }
+
+}
diff --git a/modules/rampart-samples/basic/sample06/src/org/apache/rampart/samples/sample06/SimpleService.java b/modules/rampart-samples/basic/sample06/src/org/apache/rampart/samples/sample06/SimpleService.java
new file mode 100644
index 0000000..185825e
--- /dev/null
+++ b/modules/rampart-samples/basic/sample06/src/org/apache/rampart/samples/sample06/SimpleService.java
@@ -0,0 +1,25 @@
+package org.apache.rampart.samples.sample06;
+/*
+
+ * Copyright  2003-2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+public class SimpleService {
+    
+    public String echo(String arg) {
+        return arg;
+    }
+}
diff --git a/modules/rampart-samples/basic/sample07/README.txt b/modules/rampart-samples/basic/sample07/README.txt
new file mode 100644
index 0000000..f524604
--- /dev/null
+++ b/modules/rampart-samples/basic/sample07/README.txt
@@ -0,0 +1,8 @@
+Encrypt and sign messages
+
+Both client and servce are configured to first encrypt and then sign the 
+outgoing message and to verify and decrypt the incoming message using their 
+key pairs.
+	- See the "OutflowSecurity" and "InflowSecurity" parameters in the 
+      client.axis2.xml and serivces.xml files
+	
diff --git a/modules/rampart-samples/basic/sample07/client.axis2.xml b/modules/rampart-samples/basic/sample07/client.axis2.xml
new file mode 100644
index 0000000..79b5dcd
--- /dev/null
+++ b/modules/rampart-samples/basic/sample07/client.axis2.xml
@@ -0,0 +1,487 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<axisconfig name="AxisJava2.0">
+    
+    <module ref="rampart" />
+    
+    <parameter name="OutflowSecurity">
+      <action>
+        <items>Timestamp Encrypt Signature</items>
+        <user>client</user>
+        <passwordCallbackClass>org.apache.rampart.samples.sample07.PWCBHandler</passwordCallbackClass>
+        <signaturePropFile>client.properties</signaturePropFile>
+        <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+        <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+        <encryptionUser>service</encryptionUser>
+      </action>
+    </parameter>
+
+    <parameter name="InflowSecurity">
+      <action>
+        <items>Timestamp Encrypt Signature</items>
+        <passwordCallbackClass>org.apache.rampart.samples.sample07.PWCBHandler</passwordCallbackClass>
+        <signaturePropFile>client.properties</signaturePropFile>
+      </action>
+    </parameter>
+
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment">true</parameter>
+    <parameter name="hotupdate">false</parameter>
+    <parameter name="enableMTOM">false</parameter>
+    <parameter name="enableSwA">false</parameter>
+
+    <!--Uncomment if you want to enable file caching for attachments -->
+    <!--parameter name="cacheAttachments">true</parameter>
+    <parameter name="attachmentDIR"></parameter>
+    <parameter name="sizeThreshold">4000</parameter-->
+
+    <!--Uncomment if you want to enable the reduction of the in-memory cache of WSDL definitions -->
+    <!--In some server environments, the available memory heap is limited and can fill up under load -->
+    <!--Since in-memory copies of WSDL definitions can be large, some steps can be taken-->
+    <!--to reduce the memory needed for the cached WSDL definitions. -->
+    <!--parameter name="reduceWSDLMemoryCache">true</parameter-->
+                                                       
+    <!--This will give out the timout of the configuration contexts, in milliseconds-->
+    <parameter name="ConfigContextTimeoutInterval">30000</parameter>
+
+    <!--During a fault, stack trace can be sent with the fault message. The following flag will control -->
+    <!--that behavior.-->
+    <parameter name="sendStacktraceDetailsWithFaults">false</parameter>
+
+    <!--If there aren't any information available to find out the fault reason, we set the message of the exception-->
+    <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
+    <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
+    <!--is set, then Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
+    <parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
+
+    <parameter name="userName">admin</parameter>
+    <parameter name="password">axis2</parameter>
+
+    <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
+    <!--ServicesDirectory only works on the following cases-->
+    <!---File based configurator and in that case the value should be a file URL (http:// not allowed)-->
+    <!---When creating URL Based configurator with URL “file://”  -->
+    <!--- War based configurator with expanded case , -->
+
+    <!--All the other scenarios it will be ignored.-->
+    <!--<parameter name="ServicesDirectory">service</parameter>-->
+    <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
+    <!--<parameter name="ModulesDirectory">modules</parameter>-->
+
+
+
+    <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
+    <!--root which can configured using the following contextRoot parameter-->
+    <!--<parameter name="contextRoot">axis2</parameter>-->
+
+    <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints-->
+    <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -->
+    <!--context path to proper Axis2 servlets-->
+    <!--<parameter name="servicePath">services</parameter>-->
+    <!--<parameter name="restPath">rest</parameter>-->
+
+    <!-- Following parameter will completely disable REST handling in Axis2-->
+    <parameter name="disableREST" locked="true">false</parameter>
+    
+    <!-- Following parameter will suppress generation of SOAP 1.2 bindings in auto-generated WSDL files -->
+    <parameter name="disableSOAP12" locked="true">false</parameter>
+
+    <!-- ================================================= -->
+    <!-- Deployers -->
+    <!-- ================================================= -->
+
+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->
+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">
+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>
+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>
+    </deployer>
+    
+    <!--POJO deployer , this will alow users to drop .class file and make that into a service-->
+    <deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
+    <!--<deployer extension=".jsa" directory="rmiservices" class="org.apache.axis2.rmi.deploy.RMIServiceDeployer"/>-->
+    
+
+    <!-- Following parameter will set the host name for the epr-->
+    <!--<parameter name="hostname" locked="true">myhost.com</parameter>-->
+
+    <!-- If you have a front end host which exposes this webservice using a different public URL  -->
+    <!-- use this parameter to override autodetected url -->
+    <!--<parameter name="httpFrontendHostUrl">https://someotherhost/context</parameter>-->
+
+
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the deafult MessageReceiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovrride this for a particular service by adding the same element with your requirement-->
+     <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+
+    <!-- ================================================= -->
+    <!-- Message Formatter -->
+    <!-- ================================================= -->
+    <!--Following content type to message formatter mapping can be used to implement support for different message -->
+    <!--format  serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageFormatters>
+        <messageFormatter contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+        <messageFormatter contentType="multipart/form-data"
+                         class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
+        <messageFormatter contentType="application/xml"
+                         class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+        <messageFormatter contentType="text/xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+        <messageFormatter contentType="application/soap+xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+    </messageFormatters>
+
+    <!-- ================================================= -->
+    <!-- Message Builders -->
+    <!-- ================================================= -->
+    <!--Following content type to builder mapping can be used to implement support for different message -->
+    <!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageBuilders>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
+        <messageBuilder contentType="multipart/form-data"
+                         class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
+    </messageBuilders>
+
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port">8080</parameter>
+        <!-- Here is the complete list of supported parameters (see example settings further below):
+            port: the port to listen on (default 6060)
+            hostname:  if non-null, url prefix used in reply-to endpoint references                                 (default null)
+            originServer:  value of http Server header in outgoing messages                                         (default "Simple-Server/1.1")
+            requestTimeout:  value in millis of time that requests can wait for data                                (default 20000)
+            requestTcpNoDelay:  true to maximize performance and minimize latency                                   (default true)
+                                false to minimize bandwidth consumption by combining segments
+            requestCoreThreadPoolSize:  number of threads available for request processing (unless queue fills up)  (default 25)
+            requestMaxThreadPoolSize:  number of threads available for request processing if queue fills up         (default 150)
+                                       note that default queue never fills up:  see HttpFactory
+            threadKeepAliveTime:  time to keep threads in excess of core size alive while inactive                  (default 180)
+                                  note that no such threads can exist with default unbounded request queue
+            threadKeepAliveTimeUnit:  TimeUnit of value in threadKeepAliveTime (default SECONDS)                    (default SECONDS)
+        -->
+        <!-- <parameter name="hostname">http://www.myApp.com/ws</parameter> -->
+        <!-- <parameter name="originServer">My-Server/1.1</parameter>           -->
+        <!-- <parameter name="requestTimeout">10000</parameter>                   -->
+        <!-- <parameter name="requestTcpNoDelay">false</parameter>                   -->
+        <!-- <parameter name="requestCoreThreadPoolSize">50</parameter>                      -->
+        <!-- <parameter name="RequestMaxThreadPoolSize">100</parameter>                     -->
+        <!-- <parameter name="threadKeepAliveTime">240000</parameter>                  -->
+        <!-- <parameter name="threadKeepAliveTimeUnit">MILLISECONDS</parameter>            -->
+    </transportReceiver>
+
+    <!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)
+    <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
+        <parameter name="myTopicConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="myQueueConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="default">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+    </transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Listener  -->
+
+    <!-- the non blocking http transport based on HttpCore + NIO extensions
+    <transportReceiver name="http" class="org.apache.axis2.transport.nhttp.HttpCoreNIOListener">
+        <parameter name="port" locked="false">9000</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportReceiver>-->
+
+    <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions
+    <transportReceiver name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
+        <parameter name="port" locked="false">9002</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="SSLVerifyClient">require</parameter>
+            supports optional|require or defaults to none -->
+    <!--</transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Listener  -->
+    <!-- This is a sample configuration. It assumes a mail server running in localhost.
+         Listener pops  messages that comes to the email address red@localhost. Users
+         password is red. Listener connect to the server every 3000 milliseconds.
+         Parameters with "transport." prefix is Axis2 specific. Others are all from Java Mail API. 
+         http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+     -->
+    <!-- ================================================= -->
+    <!--<transportReceiver name="mailto" class="org.apache.axis2.transport.mail.SimpleMailListener">
+        <parameter name="mail.pop3.host">localhost</parameter>
+        <parameter name="mail.pop3.user">red</parameter>
+        <parameter name="mail.store.protocol">pop3</parameter>
+        <parameter name="transport.mail.pop3.password">red</parameter>
+        <parameter name="transport.mail.replyToAddress">red@localhost</parameter>
+        <parameter name="transport.listener.interval">3000</parameter>
+    </transportReceiver>-->
+
+    <!--Uncomment if you want to have TCP transport support-->
+    <!--transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port">6060</parameter-->>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncomment the following paramter , and set it as you required.-->
+        <!--<parameter name="hostname">tcp://myApp.com/ws</parameter>-->
+    <!-- /transportReceiver -->
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <!-- transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/ -->
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+
+        <!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages -->
+        <!--  <parameter name="OmitSOAP12Action">true</parameter>  -->
+    </transportSender>
+
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+    </transportSender>
+    <transportSender name="java"
+                     class="org.apache.axis2.transport.java.JavaTransportSender"/>
+
+    <!--<transportSender name="jms"-->
+                     <!--class="org.apache.axis2.transport.jms.JMSSender"/>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Sender  -->
+
+    <!-- the non-blocking http transport sender based on HttpCore + NIO extensions
+    <transportSender name="http"  class="org.apache.axis2.transport.nhttp.HttpCoreNIOSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportSender>-->
+
+    <!-- the non-blocking https transport sender based on HttpCore + NIO SSL extensions
+    <transportSender name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
+            supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
+    <!--</transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Sender  -->
+    <!--Only need to uncomment the sender. Configuration is achieved with every client.
+        At any instant mail host should be given. Sample configuration has been given.
+        http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+   -->
+    <!-- ================================================= -->
+   <!--<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
+        <parameter name="mail.smtp.host">localhost</parameter>
+    </transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
+    <!-- Comment this to disable Addressing -->
+    <module ref="addressing"/>
+
+    <!--Configuring module , providing parameters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
+    <!-- ================================================= -->
+    <!-- Clustering  -->
+    <!-- ================================================= -->
+    <!-- Configure and uncomment following for preparing Axis2 to a clustered environment -->
+    <!--
+    <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
+        <parameter name="param1">value1</parameter>
+        <parameter name="domain">apache.axis2.domain</parameter>
+        <parameter name="synchronizeAll">true</parameter>
+        <parameter name="maxRetries">10</parameter>
+        <configurationManager class="org.apache.axis2.cluster.configuration.TribesConfigurationManager">
+            <listener class="org.apache.axis2.cluster.configuration.DefaultConfigurationManagerListener"/>
+        </configurationManager>
+        <contextManager class="org.apache.axis2.cluster.context.TribesContextManager">
+            <listener class="org.apache.axis2.cluster.context.DefaultContextManagerListener"/>
+        </contextManager>
+    </cluster>
+    -->
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="InFlow">
+        <!--  System predefined phases       -->
+        <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+        </phase>
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--  System predefined phases       -->
+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->
+        <phase name="OperationInPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+    <phaseOrder type="InFaultFlow">
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationInFaultPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFaultFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+</axisconfig>
+
diff --git a/modules/rampart-samples/basic/sample07/services.xml b/modules/rampart-samples/basic/sample07/services.xml
new file mode 100644
index 0000000..0b12f2b
--- /dev/null
+++ b/modules/rampart-samples/basic/sample07/services.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!--

+ !

+ ! Copyright 2006 The Apache Software Foundation.

+ !

+ ! Licensed under the Apache License, Version 2.0 (the "License");

+ ! you may not use this file except in compliance with the License.

+ ! You may obtain a copy of the License at

+ !

+ !      http://www.apache.org/licenses/LICENSE-2.0

+ !

+ ! Unless required by applicable law or agreed to in writing, software

+ ! distributed under the License is distributed on an "AS IS" BASIS,

+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ! See the License for the specific language governing permissions and

+ ! limitations under the License.

+ !-->

+<!-- services.xml of sample-7 : Encryption and Signature -->

+<service>

+	<operation name="echo">

+		<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>

+	</operation>    

+	<parameter name="ServiceClass" locked="false">org.apache.rampart.samples.sample07.SimpleService</parameter>

+		

+    <module ref="rampart" />

+	

+    <parameter name="InflowSecurity">

+      <action>

+        <items>Timestamp Encrypt Signature</items>

+        <passwordCallbackClass>org.apache.rampart.samples.sample07.PWCBHandler</passwordCallbackClass>

+        <signaturePropFile>service.properties</signaturePropFile>

+      </action>

+    </parameter>

+    

+    <parameter name="OutflowSecurity">

+      <action>

+        <items>Timestamp Encrypt Signature</items>

+        <user>service</user>

+        <passwordCallbackClass>org.apache.rampart.samples.sample07.PWCBHandler</passwordCallbackClass>

+        <signaturePropFile>service.properties</signaturePropFile>

+        <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>

+        <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>

+        <encryptionUser>useReqSigCert</encryptionUser>

+      </action>

+    </parameter>

+</service>

diff --git a/modules/rampart-samples/basic/sample07/src/org/apache/rampart/samples/sample07/Client.java b/modules/rampart-samples/basic/sample07/src/org/apache/rampart/samples/sample07/Client.java
new file mode 100644
index 0000000..c05d746
--- /dev/null
+++ b/modules/rampart-samples/basic/sample07/src/org/apache/rampart/samples/sample07/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample07;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+
+public class Client {
+
+    public static void main(String[] args) throws Exception {
+        
+        if(args.length != 2) {
+            System.out.println("Usage: $java Client endpoint_address client_repo_path");
+        }
+        
+        ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[1], args[1] + "/conf/axis2.xml");
+        
+        ServiceClient client = new ServiceClient(ctx, null);
+        Options options = new Options();
+        options.setAction("urn:echo");
+        options.setTo(new EndpointReference(args[0]));
+        client.setOptions(options);
+        
+        OMElement response = client.sendReceive(getPayload("Hello world"));
+        
+        System.out.println(response);
+        
+    }
+    
+    private static OMElement getPayload(String value) {
+        OMFactory factory = OMAbstractFactory.getOMFactory();
+        OMNamespace ns = factory.createOMNamespace("http://sample07.samples.rampart.apache.org","ns1");
+        OMElement elem = factory.createOMElement("echo", ns);
+        OMElement childElem = factory.createOMElement("param0", null);
+        childElem.setText(value);
+        elem.addChild(childElem);
+        
+        return elem;
+    }
+    
+}
diff --git a/modules/rampart-samples/basic/sample07/src/org/apache/rampart/samples/sample07/PWCBHandler.java b/modules/rampart-samples/basic/sample07/src/org/apache/rampart/samples/sample07/PWCBHandler.java
new file mode 100644
index 0000000..c698649
--- /dev/null
+++ b/modules/rampart-samples/basic/sample07/src/org/apache/rampart/samples/sample07/PWCBHandler.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample07;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import java.io.IOException;
+
+public class PWCBHandler implements CallbackHandler {
+
+    public void handle(Callback[] callbacks) throws IOException,
+            UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
+            WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+            
+            String id = pwcb.getIdentifier();
+            if("client".equals(id)) {
+                pwcb.setPassword("apache");
+            } else if("service".equals(id)) {
+                pwcb.setPassword("apache");
+            }
+        }
+    }
+
+}
diff --git a/modules/rampart-samples/basic/sample07/src/org/apache/rampart/samples/sample07/SimpleService.java b/modules/rampart-samples/basic/sample07/src/org/apache/rampart/samples/sample07/SimpleService.java
new file mode 100644
index 0000000..cd14fc0
--- /dev/null
+++ b/modules/rampart-samples/basic/sample07/src/org/apache/rampart/samples/sample07/SimpleService.java
@@ -0,0 +1,25 @@
+package org.apache.rampart.samples.sample07;
+/*
+
+ * Copyright  2003-2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+public class SimpleService {
+    
+    public String echo(String arg) {
+        return arg;
+    }
+}
diff --git a/modules/rampart-samples/basic/sample08/README.txt b/modules/rampart-samples/basic/sample08/README.txt
new file mode 100644
index 0000000..4643e47
--- /dev/null
+++ b/modules/rampart-samples/basic/sample08/README.txt
@@ -0,0 +1,10 @@
+Signing twice
+
+The client is configured to sign the outgoing message twice
+	- See the "OutflowSecurity" parameter in the client.axis2.xml
+	- Note the aditional <action> element that defines the second signature.
+	
+The service is configured to process it.
+	- See the "InflowSecurity" parameter in the services.xml. Not that we 
+      simply use "Signature Signature" as action items.
+
diff --git a/modules/rampart-samples/basic/sample08/client.axis2.xml b/modules/rampart-samples/basic/sample08/client.axis2.xml
new file mode 100644
index 0000000..87715ed
--- /dev/null
+++ b/modules/rampart-samples/basic/sample08/client.axis2.xml
@@ -0,0 +1,488 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<axisconfig name="AxisJava2.0">
+
+    <module ref="rampart" />
+
+    <!-- sample-8 : Double Signature -->
+    <parameter name="OutflowSecurity">
+
+        <action>
+            <items>Timestamp Signature</items>
+            <user>client</user>
+            <passwordCallbackClass>org.apache.rampart.samples.sample08.PWCBHandler</passwordCallbackClass>
+            <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+            <signatureParts>{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp</signatureParts>
+            <signaturePropFile>client.properties</signaturePropFile>
+        </action>
+
+        <action>
+            <items>Signature</items>
+            <user>client</user>
+            <passwordCallbackClass>org.apache.rampart.samples.sample08.PWCBHandler</passwordCallbackClass>
+            <signaturePropFile>client.properties</signaturePropFile>
+        </action>
+
+    </parameter>
+
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment">true</parameter>
+    <parameter name="hotupdate">false</parameter>
+    <parameter name="enableMTOM">false</parameter>
+    <parameter name="enableSwA">false</parameter>
+
+    <!--Uncomment if you want to enable file caching for attachments -->
+    <!--parameter name="cacheAttachments">true</parameter>
+    <parameter name="attachmentDIR"></parameter>
+    <parameter name="sizeThreshold">4000</parameter-->
+
+    <!--Uncomment if you want to enable the reduction of the in-memory cache of WSDL definitions -->
+    <!--In some server environments, the available memory heap is limited and can fill up under load -->
+    <!--Since in-memory copies of WSDL definitions can be large, some steps can be taken-->
+    <!--to reduce the memory needed for the cached WSDL definitions. -->
+    <!--parameter name="reduceWSDLMemoryCache">true</parameter-->
+                                                       
+    <!--This will give out the timout of the configuration contexts, in milliseconds-->
+    <parameter name="ConfigContextTimeoutInterval">30000</parameter>
+
+    <!--During a fault, stack trace can be sent with the fault message. The following flag will control -->
+    <!--that behavior.-->
+    <parameter name="sendStacktraceDetailsWithFaults">false</parameter>
+
+    <!--If there aren't any information available to find out the fault reason, we set the message of the exception-->
+    <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
+    <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
+    <!--is set, then Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
+    <parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
+
+    <parameter name="userName">admin</parameter>
+    <parameter name="password">axis2</parameter>
+
+    <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
+    <!--ServicesDirectory only works on the following cases-->
+    <!---File based configurator and in that case the value should be a file URL (http:// not allowed)-->
+    <!---When creating URL Based configurator with URL “file://”  -->
+    <!--- War based configurator with expanded case , -->
+
+    <!--All the other scenarios it will be ignored.-->
+    <!--<parameter name="ServicesDirectory">service</parameter>-->
+    <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
+    <!--<parameter name="ModulesDirectory">modules</parameter>-->
+
+
+
+    <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
+    <!--root which can configured using the following contextRoot parameter-->
+    <!--<parameter name="contextRoot">axis2</parameter>-->
+
+    <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints-->
+    <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -->
+    <!--context path to proper Axis2 servlets-->
+    <!--<parameter name="servicePath">services</parameter>-->
+    <!--<parameter name="restPath">rest</parameter>-->
+
+    <!-- Following parameter will completely disable REST handling in Axis2-->
+    <parameter name="disableREST" locked="true">false</parameter>
+    
+    <!-- Following parameter will suppress generation of SOAP 1.2 bindings in auto-generated WSDL files -->
+    <parameter name="disableSOAP12" locked="true">false</parameter>
+
+    <!-- ================================================= -->
+    <!-- Deployers -->
+    <!-- ================================================= -->
+
+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->
+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">
+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>
+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>
+    </deployer>
+    
+    <!--POJO deployer , this will alow users to drop .class file and make that into a service-->
+    <deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
+    <!--<deployer extension=".jsa" directory="rmiservices" class="org.apache.axis2.rmi.deploy.RMIServiceDeployer"/>-->
+    
+
+    <!-- Following parameter will set the host name for the epr-->
+    <!--<parameter name="hostname" locked="true">myhost.com</parameter>-->
+
+    <!-- If you have a front end host which exposes this webservice using a different public URL  -->
+    <!-- use this parameter to override autodetected url -->
+    <!--<parameter name="httpFrontendHostUrl">https://someotherhost/context</parameter>-->
+
+
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the deafult MessageReceiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovrride this for a particular service by adding the same element with your requirement-->
+     <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+
+    <!-- ================================================= -->
+    <!-- Message Formatter -->
+    <!-- ================================================= -->
+    <!--Following content type to message formatter mapping can be used to implement support for different message -->
+    <!--format  serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageFormatters>
+        <messageFormatter contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+        <messageFormatter contentType="multipart/form-data"
+                         class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
+        <messageFormatter contentType="application/xml"
+                         class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+        <messageFormatter contentType="text/xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+        <messageFormatter contentType="application/soap+xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+    </messageFormatters>
+
+    <!-- ================================================= -->
+    <!-- Message Builders -->
+    <!-- ================================================= -->
+    <!--Following content type to builder mapping can be used to implement support for different message -->
+    <!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageBuilders>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
+        <messageBuilder contentType="multipart/form-data"
+                         class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
+    </messageBuilders>
+
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port">8080</parameter>
+        <!-- Here is the complete list of supported parameters (see example settings further below):
+            port: the port to listen on (default 6060)
+            hostname:  if non-null, url prefix used in reply-to endpoint references                                 (default null)
+            originServer:  value of http Server header in outgoing messages                                         (default "Simple-Server/1.1")
+            requestTimeout:  value in millis of time that requests can wait for data                                (default 20000)
+            requestTcpNoDelay:  true to maximize performance and minimize latency                                   (default true)
+                                false to minimize bandwidth consumption by combining segments
+            requestCoreThreadPoolSize:  number of threads available for request processing (unless queue fills up)  (default 25)
+            requestMaxThreadPoolSize:  number of threads available for request processing if queue fills up         (default 150)
+                                       note that default queue never fills up:  see HttpFactory
+            threadKeepAliveTime:  time to keep threads in excess of core size alive while inactive                  (default 180)
+                                  note that no such threads can exist with default unbounded request queue
+            threadKeepAliveTimeUnit:  TimeUnit of value in threadKeepAliveTime (default SECONDS)                    (default SECONDS)
+        -->
+        <!-- <parameter name="hostname">http://www.myApp.com/ws</parameter> -->
+        <!-- <parameter name="originServer">My-Server/1.1</parameter>           -->
+        <!-- <parameter name="requestTimeout">10000</parameter>                   -->
+        <!-- <parameter name="requestTcpNoDelay">false</parameter>                   -->
+        <!-- <parameter name="requestCoreThreadPoolSize">50</parameter>                      -->
+        <!-- <parameter name="RequestMaxThreadPoolSize">100</parameter>                     -->
+        <!-- <parameter name="threadKeepAliveTime">240000</parameter>                  -->
+        <!-- <parameter name="threadKeepAliveTimeUnit">MILLISECONDS</parameter>            -->
+    </transportReceiver>
+
+    <!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)
+    <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
+        <parameter name="myTopicConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="myQueueConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="default">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+    </transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Listener  -->
+
+    <!-- the non blocking http transport based on HttpCore + NIO extensions
+    <transportReceiver name="http" class="org.apache.axis2.transport.nhttp.HttpCoreNIOListener">
+        <parameter name="port" locked="false">9000</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportReceiver>-->
+
+    <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions
+    <transportReceiver name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
+        <parameter name="port" locked="false">9002</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="SSLVerifyClient">require</parameter>
+            supports optional|require or defaults to none -->
+    <!--</transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Listener  -->
+    <!-- This is a sample configuration. It assumes a mail server running in localhost.
+         Listener pops  messages that comes to the email address red@localhost. Users
+         password is red. Listener connect to the server every 3000 milliseconds.
+         Parameters with "transport." prefix is Axis2 specific. Others are all from Java Mail API. 
+         http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+     -->
+    <!-- ================================================= -->
+    <!--<transportReceiver name="mailto" class="org.apache.axis2.transport.mail.SimpleMailListener">
+        <parameter name="mail.pop3.host">localhost</parameter>
+        <parameter name="mail.pop3.user">red</parameter>
+        <parameter name="mail.store.protocol">pop3</parameter>
+        <parameter name="transport.mail.pop3.password">red</parameter>
+        <parameter name="transport.mail.replyToAddress">red@localhost</parameter>
+        <parameter name="transport.listener.interval">3000</parameter>
+    </transportReceiver>-->
+
+    <!--Uncomment if you want to have TCP transport support-->
+    <!--transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port">6060</parameter-->>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncomment the following paramter , and set it as you required.-->
+        <!--<parameter name="hostname">tcp://myApp.com/ws</parameter>-->
+    <!-- /transportReceiver -->
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <!-- transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/ -->
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+
+        <!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages -->
+        <!--  <parameter name="OmitSOAP12Action">true</parameter>  -->
+    </transportSender>
+
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+    </transportSender>
+    <transportSender name="java"
+                     class="org.apache.axis2.transport.java.JavaTransportSender"/>
+
+    <!--<transportSender name="jms"-->
+                     <!--class="org.apache.axis2.transport.jms.JMSSender"/>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Sender  -->
+
+    <!-- the non-blocking http transport sender based on HttpCore + NIO extensions
+    <transportSender name="http"  class="org.apache.axis2.transport.nhttp.HttpCoreNIOSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportSender>-->
+
+    <!-- the non-blocking https transport sender based on HttpCore + NIO SSL extensions
+    <transportSender name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
+            supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
+    <!--</transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Sender  -->
+    <!--Only need to uncomment the sender. Configuration is achieved with every client.
+        At any instant mail host should be given. Sample configuration has been given.
+        http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+   -->
+    <!-- ================================================= -->
+   <!--<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
+        <parameter name="mail.smtp.host">localhost</parameter>
+    </transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
+    <!-- Comment this to disable Addressing -->
+    <module ref="addressing"/>
+
+    <!--Configuring module , providing parameters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
+    <!-- ================================================= -->
+    <!-- Clustering  -->
+    <!-- ================================================= -->
+    <!-- Configure and uncomment following for preparing Axis2 to a clustered environment -->
+    <!--
+    <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
+        <parameter name="param1">value1</parameter>
+        <parameter name="domain">apache.axis2.domain</parameter>
+        <parameter name="synchronizeAll">true</parameter>
+        <parameter name="maxRetries">10</parameter>
+        <configurationManager class="org.apache.axis2.cluster.configuration.TribesConfigurationManager">
+            <listener class="org.apache.axis2.cluster.configuration.DefaultConfigurationManagerListener"/>
+        </configurationManager>
+        <contextManager class="org.apache.axis2.cluster.context.TribesContextManager">
+            <listener class="org.apache.axis2.cluster.context.DefaultContextManagerListener"/>
+        </contextManager>
+    </cluster>
+    -->
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="InFlow">
+        <!--  System predefined phases       -->
+        <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+        </phase>
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--  System predefined phases       -->
+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->
+        <phase name="OperationInPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+    <phaseOrder type="InFaultFlow">
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationInFaultPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFaultFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+</axisconfig>
+
diff --git a/modules/rampart-samples/basic/sample08/services.xml b/modules/rampart-samples/basic/sample08/services.xml
new file mode 100644
index 0000000..38a8ce2
--- /dev/null
+++ b/modules/rampart-samples/basic/sample08/services.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!--

+ !

+ ! Copyright 2006 The Apache Software Foundation.

+ !

+ ! Licensed under the Apache License, Version 2.0 (the "License");

+ ! you may not use this file except in compliance with the License.

+ ! You may obtain a copy of the License at

+ !

+ !      http://www.apache.org/licenses/LICENSE-2.0

+ !

+ ! Unless required by applicable law or agreed to in writing, software

+ ! distributed under the License is distributed on an "AS IS" BASIS,

+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ! See the License for the specific language governing permissions and

+ ! limitations under the License.

+ !-->

+<!-- services.xml of sample-8 : Double Signature -->

+<service>

+	<operation name="echo">

+		<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>

+	</operation>    

+	<parameter name="ServiceClass" locked="false">org.apache.rampart.samples.sample08.SimpleService</parameter>

+	

+	<module ref="rampart" />

+	

+	<parameter name="InflowSecurity">

+      <action>

+        <items>Timestamp Signature Signature</items>

+        <passwordCallbackClass>org.apache.rampart.samples.sample08.PWCBHandler</passwordCallbackClass>

+        <signaturePropFile>service.properties</signaturePropFile>

+      </action>

+    </parameter>

+    

+</service>

diff --git a/modules/rampart-samples/basic/sample08/src/org/apache/rampart/samples/sample08/Client.java b/modules/rampart-samples/basic/sample08/src/org/apache/rampart/samples/sample08/Client.java
new file mode 100644
index 0000000..c08c279
--- /dev/null
+++ b/modules/rampart-samples/basic/sample08/src/org/apache/rampart/samples/sample08/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample08;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+
+public class Client {
+
+    public static void main(String[] args) throws Exception {
+        
+        if(args.length != 2) {
+            System.out.println("Usage: $java Client endpoint_address client_repo_path");
+        }
+        
+        ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[1], args[1] + "/conf/axis2.xml");
+        
+        ServiceClient client = new ServiceClient(ctx, null);
+        Options options = new Options();
+        options.setAction("urn:echo");
+        options.setTo(new EndpointReference(args[0]));
+        client.setOptions(options);
+        
+        OMElement response = client.sendReceive(getPayload("Hello world"));
+        
+        System.out.println(response);
+        
+    }
+    
+    private static OMElement getPayload(String value) {
+        OMFactory factory = OMAbstractFactory.getOMFactory();
+        OMNamespace ns = factory.createOMNamespace("http://sample08.samples.rampart.apache.org","ns1");
+        OMElement elem = factory.createOMElement("echo", ns);
+        OMElement childElem = factory.createOMElement("param0", null);
+        childElem.setText(value);
+        elem.addChild(childElem);
+        
+        return elem;
+    }
+    
+}
diff --git a/modules/rampart-samples/basic/sample08/src/org/apache/rampart/samples/sample08/PWCBHandler.java b/modules/rampart-samples/basic/sample08/src/org/apache/rampart/samples/sample08/PWCBHandler.java
new file mode 100644
index 0000000..4ec18ce
--- /dev/null
+++ b/modules/rampart-samples/basic/sample08/src/org/apache/rampart/samples/sample08/PWCBHandler.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample08;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import java.io.IOException;
+
+public class PWCBHandler implements CallbackHandler {
+
+    public void handle(Callback[] callbacks) throws IOException,
+            UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
+            WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+            
+            String id = pwcb.getIdentifier();
+            if("client".equals(id)) {
+                pwcb.setPassword("apache");
+            } else if("service".equals(id)) {
+                pwcb.setPassword("apache");
+            }
+        }
+    }
+
+}
diff --git a/modules/rampart-samples/basic/sample08/src/org/apache/rampart/samples/sample08/SimpleService.java b/modules/rampart-samples/basic/sample08/src/org/apache/rampart/samples/sample08/SimpleService.java
new file mode 100644
index 0000000..a61f706
--- /dev/null
+++ b/modules/rampart-samples/basic/sample08/src/org/apache/rampart/samples/sample08/SimpleService.java
@@ -0,0 +1,25 @@
+package org.apache.rampart.samples.sample08;
+/*
+
+ * Copyright  2003-2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+public class SimpleService {
+    
+    public String echo(String arg) {
+        return arg;
+    }
+}
diff --git a/modules/rampart-samples/basic/sample09/README.txt b/modules/rampart-samples/basic/sample09/README.txt
new file mode 100644
index 0000000..7202cc6
--- /dev/null
+++ b/modules/rampart-samples/basic/sample09/README.txt
@@ -0,0 +1,8 @@
+Encryption with a key known to both parties
+
+Both client and servce are configured to encrypt the outgoing message and to 
+decrypt incoming message using a known named key
+	- See the "OutflowSecurity" and "InflowSecurity" parameters in the 
+      client.axis2.xml and serivces.xml files
+    - Note the use of <EmbeddedKeyName>SessionKey</EmbeddedKeyName>
+    - Note that org.apache.rampart.samples.sample09.PWCBHandler sets the key
diff --git a/modules/rampart-samples/basic/sample09/client.axis2.xml b/modules/rampart-samples/basic/sample09/client.axis2.xml
new file mode 100644
index 0000000..b6d6101
--- /dev/null
+++ b/modules/rampart-samples/basic/sample09/client.axis2.xml
@@ -0,0 +1,487 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<axisconfig name="AxisJava2.0">
+
+    <module ref="rampart" />
+
+    <parameter name="OutflowSecurity">
+        <action>
+            <items>Encrypt</items>
+            <user>client</user>
+            <encryptionKeyIdentifier>EmbeddedKeyName</encryptionKeyIdentifier>
+            <embeddedKeyCallbackClass>org.apache.rampart.samples.sample09.PWCBHandler</embeddedKeyCallbackClass>
+            <encryptionPropFile>client.properties</encryptionPropFile> 
+            <embeddedKeyName>SessionKey</embeddedKeyName>
+        </action>
+    </parameter>
+
+    <parameter name="InflowSecurity">
+        <action>
+            <items>Encrypt</items>
+            <passwordCallbackClass>org.apache.rampart.samples.sample09.PWCBHandler</passwordCallbackClass>
+            <decryptionPropFile>client.properties</decryptionPropFile>
+            <isBSPCompliant>false</isBSPCompliant>
+        </action>
+    </parameter>
+
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment">true</parameter>
+    <parameter name="hotupdate">false</parameter>
+    <parameter name="enableMTOM">false</parameter>
+    <parameter name="enableSwA">false</parameter>
+
+    <!--Uncomment if you want to enable file caching for attachments -->
+    <!--parameter name="cacheAttachments">true</parameter>
+    <parameter name="attachmentDIR"></parameter>
+    <parameter name="sizeThreshold">4000</parameter-->
+
+    <!--Uncomment if you want to enable the reduction of the in-memory cache of WSDL definitions -->
+    <!--In some server environments, the available memory heap is limited and can fill up under load -->
+    <!--Since in-memory copies of WSDL definitions can be large, some steps can be taken-->
+    <!--to reduce the memory needed for the cached WSDL definitions. -->
+    <!--parameter name="reduceWSDLMemoryCache">true</parameter-->
+                                                       
+    <!--This will give out the timout of the configuration contexts, in milliseconds-->
+    <parameter name="ConfigContextTimeoutInterval">30000</parameter>
+
+    <!--During a fault, stack trace can be sent with the fault message. The following flag will control -->
+    <!--that behavior.-->
+    <parameter name="sendStacktraceDetailsWithFaults">false</parameter>
+
+    <!--If there aren't any information available to find out the fault reason, we set the message of the exception-->
+    <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
+    <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
+    <!--is set, then Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
+    <parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
+
+    <parameter name="userName">admin</parameter>
+    <parameter name="password">axis2</parameter>
+
+    <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
+    <!--ServicesDirectory only works on the following cases-->
+    <!---File based configurator and in that case the value should be a file URL (http:// not allowed)-->
+    <!---When creating URL Based configurator with URL “file://”  -->
+    <!--- War based configurator with expanded case , -->
+
+    <!--All the other scenarios it will be ignored.-->
+    <!--<parameter name="ServicesDirectory">service</parameter>-->
+    <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
+    <!--<parameter name="ModulesDirectory">modules</parameter>-->
+
+
+
+    <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
+    <!--root which can configured using the following contextRoot parameter-->
+    <!--<parameter name="contextRoot">axis2</parameter>-->
+
+    <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints-->
+    <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -->
+    <!--context path to proper Axis2 servlets-->
+    <!--<parameter name="servicePath">services</parameter>-->
+    <!--<parameter name="restPath">rest</parameter>-->
+
+    <!-- Following parameter will completely disable REST handling in Axis2-->
+    <parameter name="disableREST" locked="true">false</parameter>
+    
+    <!-- Following parameter will suppress generation of SOAP 1.2 bindings in auto-generated WSDL files -->
+    <parameter name="disableSOAP12" locked="true">false</parameter>
+
+    <!-- ================================================= -->
+    <!-- Deployers -->
+    <!-- ================================================= -->
+
+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->
+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">
+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>
+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>
+    </deployer>
+    
+    <!--POJO deployer , this will alow users to drop .class file and make that into a service-->
+    <deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
+    <!--<deployer extension=".jsa" directory="rmiservices" class="org.apache.axis2.rmi.deploy.RMIServiceDeployer"/>-->
+    
+
+    <!-- Following parameter will set the host name for the epr-->
+    <!--<parameter name="hostname" locked="true">myhost.com</parameter>-->
+
+    <!-- If you have a front end host which exposes this webservice using a different public URL  -->
+    <!-- use this parameter to override autodetected url -->
+    <!--<parameter name="httpFrontendHostUrl">https://someotherhost/context</parameter>-->
+
+
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the deafult MessageReceiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovrride this for a particular service by adding the same element with your requirement-->
+     <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+
+    <!-- ================================================= -->
+    <!-- Message Formatter -->
+    <!-- ================================================= -->
+    <!--Following content type to message formatter mapping can be used to implement support for different message -->
+    <!--format  serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageFormatters>
+        <messageFormatter contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+        <messageFormatter contentType="multipart/form-data"
+                         class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
+        <messageFormatter contentType="application/xml"
+                         class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+        <messageFormatter contentType="text/xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+        <messageFormatter contentType="application/soap+xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+    </messageFormatters>
+
+    <!-- ================================================= -->
+    <!-- Message Builders -->
+    <!-- ================================================= -->
+    <!--Following content type to builder mapping can be used to implement support for different message -->
+    <!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageBuilders>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
+        <messageBuilder contentType="multipart/form-data"
+                         class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
+    </messageBuilders>
+
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port">8080</parameter>
+        <!-- Here is the complete list of supported parameters (see example settings further below):
+            port: the port to listen on (default 6060)
+            hostname:  if non-null, url prefix used in reply-to endpoint references                                 (default null)
+            originServer:  value of http Server header in outgoing messages                                         (default "Simple-Server/1.1")
+            requestTimeout:  value in millis of time that requests can wait for data                                (default 20000)
+            requestTcpNoDelay:  true to maximize performance and minimize latency                                   (default true)
+                                false to minimize bandwidth consumption by combining segments
+            requestCoreThreadPoolSize:  number of threads available for request processing (unless queue fills up)  (default 25)
+            requestMaxThreadPoolSize:  number of threads available for request processing if queue fills up         (default 150)
+                                       note that default queue never fills up:  see HttpFactory
+            threadKeepAliveTime:  time to keep threads in excess of core size alive while inactive                  (default 180)
+                                  note that no such threads can exist with default unbounded request queue
+            threadKeepAliveTimeUnit:  TimeUnit of value in threadKeepAliveTime (default SECONDS)                    (default SECONDS)
+        -->
+        <!-- <parameter name="hostname">http://www.myApp.com/ws</parameter> -->
+        <!-- <parameter name="originServer">My-Server/1.1</parameter>           -->
+        <!-- <parameter name="requestTimeout">10000</parameter>                   -->
+        <!-- <parameter name="requestTcpNoDelay">false</parameter>                   -->
+        <!-- <parameter name="requestCoreThreadPoolSize">50</parameter>                      -->
+        <!-- <parameter name="RequestMaxThreadPoolSize">100</parameter>                     -->
+        <!-- <parameter name="threadKeepAliveTime">240000</parameter>                  -->
+        <!-- <parameter name="threadKeepAliveTimeUnit">MILLISECONDS</parameter>            -->
+    </transportReceiver>
+
+    <!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)
+    <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
+        <parameter name="myTopicConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="myQueueConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="default">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+    </transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Listener  -->
+
+    <!-- the non blocking http transport based on HttpCore + NIO extensions
+    <transportReceiver name="http" class="org.apache.axis2.transport.nhttp.HttpCoreNIOListener">
+        <parameter name="port" locked="false">9000</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportReceiver>-->
+
+    <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions
+    <transportReceiver name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
+        <parameter name="port" locked="false">9002</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="SSLVerifyClient">require</parameter>
+            supports optional|require or defaults to none -->
+    <!--</transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Listener  -->
+    <!-- This is a sample configuration. It assumes a mail server running in localhost.
+         Listener pops  messages that comes to the email address red@localhost. Users
+         password is red. Listener connect to the server every 3000 milliseconds.
+         Parameters with "transport." prefix is Axis2 specific. Others are all from Java Mail API. 
+         http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+     -->
+    <!-- ================================================= -->
+    <!--<transportReceiver name="mailto" class="org.apache.axis2.transport.mail.SimpleMailListener">
+        <parameter name="mail.pop3.host">localhost</parameter>
+        <parameter name="mail.pop3.user">red</parameter>
+        <parameter name="mail.store.protocol">pop3</parameter>
+        <parameter name="transport.mail.pop3.password">red</parameter>
+        <parameter name="transport.mail.replyToAddress">red@localhost</parameter>
+        <parameter name="transport.listener.interval">3000</parameter>
+    </transportReceiver>-->
+
+    <!--Uncomment if you want to have TCP transport support-->
+    <!--transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port">6060</parameter-->>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncomment the following paramter , and set it as you required.-->
+        <!--<parameter name="hostname">tcp://myApp.com/ws</parameter>-->
+    <!-- /transportReceiver -->
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <!-- transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/ -->
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+
+        <!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages -->
+        <!--  <parameter name="OmitSOAP12Action">true</parameter>  -->
+    </transportSender>
+
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+    </transportSender>
+    <transportSender name="java"
+                     class="org.apache.axis2.transport.java.JavaTransportSender"/>
+
+    <!--<transportSender name="jms"-->
+                     <!--class="org.apache.axis2.transport.jms.JMSSender"/>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Sender  -->
+
+    <!-- the non-blocking http transport sender based on HttpCore + NIO extensions
+    <transportSender name="http"  class="org.apache.axis2.transport.nhttp.HttpCoreNIOSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportSender>-->
+
+    <!-- the non-blocking https transport sender based on HttpCore + NIO SSL extensions
+    <transportSender name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
+            supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
+    <!--</transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Sender  -->
+    <!--Only need to uncomment the sender. Configuration is achieved with every client.
+        At any instant mail host should be given. Sample configuration has been given.
+        http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+   -->
+    <!-- ================================================= -->
+   <!--<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
+        <parameter name="mail.smtp.host">localhost</parameter>
+    </transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
+    <!-- Comment this to disable Addressing -->
+    <module ref="addressing"/>
+
+    <!--Configuring module , providing parameters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
+    <!-- ================================================= -->
+    <!-- Clustering  -->
+    <!-- ================================================= -->
+    <!-- Configure and uncomment following for preparing Axis2 to a clustered environment -->
+    <!--
+    <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
+        <parameter name="param1">value1</parameter>
+        <parameter name="domain">apache.axis2.domain</parameter>
+        <parameter name="synchronizeAll">true</parameter>
+        <parameter name="maxRetries">10</parameter>
+        <configurationManager class="org.apache.axis2.cluster.configuration.TribesConfigurationManager">
+            <listener class="org.apache.axis2.cluster.configuration.DefaultConfigurationManagerListener"/>
+        </configurationManager>
+        <contextManager class="org.apache.axis2.cluster.context.TribesContextManager">
+            <listener class="org.apache.axis2.cluster.context.DefaultContextManagerListener"/>
+        </contextManager>
+    </cluster>
+    -->
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="InFlow">
+        <!--  System predefined phases       -->
+        <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+        </phase>
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--  System predefined phases       -->
+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->
+        <phase name="OperationInPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+    <phaseOrder type="InFaultFlow">
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationInFaultPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFaultFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+</axisconfig>
+
diff --git a/modules/rampart-samples/basic/sample09/services.xml b/modules/rampart-samples/basic/sample09/services.xml
new file mode 100644
index 0000000..9a12629
--- /dev/null
+++ b/modules/rampart-samples/basic/sample09/services.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!--

+ !

+ ! Copyright 2006 The Apache Software Foundation.

+ !

+ ! Licensed under the Apache License, Version 2.0 (the "License");

+ ! you may not use this file except in compliance with the License.

+ ! You may obtain a copy of the License at

+ !

+ !      http://www.apache.org/licenses/LICENSE-2.0

+ !

+ ! Unless required by applicable law or agreed to in writing, software

+ ! distributed under the License is distributed on an "AS IS" BASIS,

+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ! See the License for the specific language governing permissions and

+ ! limitations under the License.

+ !-->

+<!-- services.xml of sample-9 : Encryption using a known key -->

+<service>

+	<operation name="echo">

+		<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>

+	</operation>    

+	<parameter name="ServiceClass" locked="false">org.apache.rampart.samples.sample09.SimpleService</parameter>

+	

+	<module ref="rampart" />

+	

+    <parameter name="InflowSecurity">

+        <action>

+            <items>Encrypt</items>

+            <passwordCallbackClass>org.apache.rampart.samples.sample09.PWCBHandler</passwordCallbackClass>

+            <decryptionPropFile>service.properties</decryptionPropFile>

+            <isBSPCompliant>false</isBSPCompliant>

+        </action>

+    </parameter>

+    

+    <parameter name="OutflowSecurity">

+        <action>

+            <items>Encrypt</items>

+            <user>service</user>

+            <encryptionKeyIdentifier>EmbeddedKeyName</encryptionKeyIdentifier>

+            <encryptionPropFile>service.properties</encryptionPropFile>

+            <embeddedKeyCallbackClass>org.apache.rampart.samples.sample09.PWCBHandler</embeddedKeyCallbackClass>

+            <embeddedKeyName>SessionKey</embeddedKeyName>

+        </action>

+    </parameter>

+    

+</service>

diff --git a/modules/rampart-samples/basic/sample09/src/org/apache/rampart/samples/sample09/Client.java b/modules/rampart-samples/basic/sample09/src/org/apache/rampart/samples/sample09/Client.java
new file mode 100644
index 0000000..9478f1e
--- /dev/null
+++ b/modules/rampart-samples/basic/sample09/src/org/apache/rampart/samples/sample09/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample09;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+
+public class Client {
+
+    public static void main(String[] args) throws Exception {
+        
+        if(args.length != 2) {
+            System.out.println("Usage: $java Client endpoint_address client_repo_path");
+        }
+        
+        ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[1], args[1] + "/conf/axis2.xml");
+        
+        ServiceClient client = new ServiceClient(ctx, null);
+        Options options = new Options();
+        options.setAction("urn:echo");
+        options.setTo(new EndpointReference(args[0]));
+        client.setOptions(options);
+        
+        OMElement response = client.sendReceive(getPayload("Hello world"));
+        
+        System.out.println(response);
+        
+    }
+    
+    private static OMElement getPayload(String value) {
+        OMFactory factory = OMAbstractFactory.getOMFactory();
+        OMNamespace ns = factory.createOMNamespace("http://sample09.samples.rampart.apache.org","ns1");
+        OMElement elem = factory.createOMElement("echo", ns);
+        OMElement childElem = factory.createOMElement("param0", null);
+        childElem.setText(value);
+        elem.addChild(childElem);
+        
+        return elem;
+    }
+    
+}
diff --git a/modules/rampart-samples/basic/sample09/src/org/apache/rampart/samples/sample09/PWCBHandler.java b/modules/rampart-samples/basic/sample09/src/org/apache/rampart/samples/sample09/PWCBHandler.java
new file mode 100644
index 0000000..b1911f7
--- /dev/null
+++ b/modules/rampart-samples/basic/sample09/src/org/apache/rampart/samples/sample09/PWCBHandler.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample09;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import java.io.IOException;
+
+public class PWCBHandler implements CallbackHandler {
+
+    private static final byte[] key = {
+
+    (byte) 0x31, (byte) 0xfd, (byte) 0xcb, (byte) 0xda, (byte) 0xfb,
+
+    (byte) 0xcd, (byte) 0x6b, (byte) 0xa8, (byte) 0xe6, (byte) 0x19,
+
+    (byte) 0xa7, (byte) 0xbf, (byte) 0x51, (byte) 0xf7, (byte) 0xc7,
+
+    (byte) 0x3e };
+
+    public void handle(Callback[] callbacks) throws IOException,
+            UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
+            WSPasswordCallback pwcb = (WSPasswordCallback) callbacks[i];
+
+            if (pwcb.getUsage() == WSPasswordCallback.SECRET_KEY) {
+                pwcb.setKey(key);
+            }
+        }
+    }
+
+}
diff --git a/modules/rampart-samples/basic/sample09/src/org/apache/rampart/samples/sample09/SimpleService.java b/modules/rampart-samples/basic/sample09/src/org/apache/rampart/samples/sample09/SimpleService.java
new file mode 100644
index 0000000..7862caf
--- /dev/null
+++ b/modules/rampart-samples/basic/sample09/src/org/apache/rampart/samples/sample09/SimpleService.java
@@ -0,0 +1,25 @@
+package org.apache.rampart.samples.sample09;
+/*
+
+ * Copyright  2003-2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+public class SimpleService {
+    
+    public String echo(String arg) {
+        return arg;
+    }
+}
diff --git a/modules/rampart-samples/basic/sample10/README.txt b/modules/rampart-samples/basic/sample10/README.txt
new file mode 100644
index 0000000..0ad0c6a
--- /dev/null
+++ b/modules/rampart-samples/basic/sample10/README.txt
@@ -0,0 +1,8 @@
+Sign and encrypt messages
+
+Both client and servce are configured to first sign and then encrypt the 
+outgoing message and to decrypt and verify the incoming message using their 
+key pairs.
+	- See the "OutflowSecurity" and "InflowSecurity" parameters in the 
+      client.axis2.xml and serivces.xml files
+    - Note the use of <optimizeParts>[xpath expression]</optimizeParts>
diff --git a/modules/rampart-samples/basic/sample10/client.axis2.xml b/modules/rampart-samples/basic/sample10/client.axis2.xml
new file mode 100644
index 0000000..66ae032
--- /dev/null
+++ b/modules/rampart-samples/basic/sample10/client.axis2.xml
@@ -0,0 +1,491 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<axisconfig name="AxisJava2.0">
+    <module ref="rampart" />
+
+    <!-- sample-10 : MTOM optimize encrypted content -->
+    
+    <parameter name="OutflowSecurity">
+      <action>
+        <items>Timestamp Signature Encrypt</items>
+        <user>client</user>
+        <passwordCallbackClass>org.apache.rampart.samples.sample10.PWCBHandler</passwordCallbackClass>
+        <signaturePropFile>client.properties</signaturePropFile>
+        <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+        <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+        <encryptionUser>service</encryptionUser>
+        
+        <optimizeParts>//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</optimizeParts>
+        
+      </action>
+    </parameter>
+
+    <parameter name="InflowSecurity">
+      <action>
+        <items>Timestamp Signature Encrypt</items>
+        <passwordCallbackClass>org.apache.rampart.samples.sample10.PWCBHandler</passwordCallbackClass>
+        <signaturePropFile>client.properties</signaturePropFile>
+      </action>
+    </parameter>
+
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment">true</parameter>
+    <parameter name="hotupdate">false</parameter>
+    <parameter name="enableMTOM">true</parameter>
+    <parameter name="enableSwA">false</parameter>
+
+    <!--Uncomment if you want to enable file caching for attachments -->
+    <!--parameter name="cacheAttachments">true</parameter>
+    <parameter name="attachmentDIR"></parameter>
+    <parameter name="sizeThreshold">4000</parameter-->
+
+    <!--Uncomment if you want to enable the reduction of the in-memory cache of WSDL definitions -->
+    <!--In some server environments, the available memory heap is limited and can fill up under load -->
+    <!--Since in-memory copies of WSDL definitions can be large, some steps can be taken-->
+    <!--to reduce the memory needed for the cached WSDL definitions. -->
+    <!--parameter name="reduceWSDLMemoryCache">true</parameter-->
+                                                       
+    <!--This will give out the timout of the configuration contexts, in milliseconds-->
+    <parameter name="ConfigContextTimeoutInterval">30000</parameter>
+
+    <!--During a fault, stack trace can be sent with the fault message. The following flag will control -->
+    <!--that behavior.-->
+    <parameter name="sendStacktraceDetailsWithFaults">false</parameter>
+
+    <!--If there aren't any information available to find out the fault reason, we set the message of the exception-->
+    <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
+    <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
+    <!--is set, then Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
+    <parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
+
+    <parameter name="userName">admin</parameter>
+    <parameter name="password">axis2</parameter>
+
+    <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
+    <!--ServicesDirectory only works on the following cases-->
+    <!---File based configurator and in that case the value should be a file URL (http:// not allowed)-->
+    <!---When creating URL Based configurator with URL “file://”  -->
+    <!--- War based configurator with expanded case , -->
+
+    <!--All the other scenarios it will be ignored.-->
+    <!--<parameter name="ServicesDirectory">service</parameter>-->
+    <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
+    <!--<parameter name="ModulesDirectory">modules</parameter>-->
+
+
+
+    <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
+    <!--root which can configured using the following contextRoot parameter-->
+    <!--<parameter name="contextRoot">axis2</parameter>-->
+
+    <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints-->
+    <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -->
+    <!--context path to proper Axis2 servlets-->
+    <!--<parameter name="servicePath">services</parameter>-->
+    <!--<parameter name="restPath">rest</parameter>-->
+
+    <!-- Following parameter will completely disable REST handling in Axis2-->
+    <parameter name="disableREST" locked="true">false</parameter>
+    
+    <!-- Following parameter will suppress generation of SOAP 1.2 bindings in auto-generated WSDL files -->
+    <parameter name="disableSOAP12" locked="true">false</parameter>
+
+    <!-- ================================================= -->
+    <!-- Deployers -->
+    <!-- ================================================= -->
+
+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->
+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">
+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>
+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>
+    </deployer>
+    
+    <!--POJO deployer , this will alow users to drop .class file and make that into a service-->
+    <deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
+    <!--<deployer extension=".jsa" directory="rmiservices" class="org.apache.axis2.rmi.deploy.RMIServiceDeployer"/>-->
+    
+
+    <!-- Following parameter will set the host name for the epr-->
+    <!--<parameter name="hostname" locked="true">myhost.com</parameter>-->
+
+    <!-- If you have a front end host which exposes this webservice using a different public URL  -->
+    <!-- use this parameter to override autodetected url -->
+    <!--<parameter name="httpFrontendHostUrl">https://someotherhost/context</parameter>-->
+
+
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the deafult MessageReceiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovrride this for a particular service by adding the same element with your requirement-->
+     <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+
+    <!-- ================================================= -->
+    <!-- Message Formatter -->
+    <!-- ================================================= -->
+    <!--Following content type to message formatter mapping can be used to implement support for different message -->
+    <!--format  serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageFormatters>
+        <messageFormatter contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+        <messageFormatter contentType="multipart/form-data"
+                         class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
+        <messageFormatter contentType="application/xml"
+                         class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+        <messageFormatter contentType="text/xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+        <messageFormatter contentType="application/soap+xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+    </messageFormatters>
+
+    <!-- ================================================= -->
+    <!-- Message Builders -->
+    <!-- ================================================= -->
+    <!--Following content type to builder mapping can be used to implement support for different message -->
+    <!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageBuilders>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
+        <messageBuilder contentType="multipart/form-data"
+                         class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
+    </messageBuilders>
+
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port">8080</parameter>
+        <!-- Here is the complete list of supported parameters (see example settings further below):
+            port: the port to listen on (default 6060)
+            hostname:  if non-null, url prefix used in reply-to endpoint references                                 (default null)
+            originServer:  value of http Server header in outgoing messages                                         (default "Simple-Server/1.1")
+            requestTimeout:  value in millis of time that requests can wait for data                                (default 20000)
+            requestTcpNoDelay:  true to maximize performance and minimize latency                                   (default true)
+                                false to minimize bandwidth consumption by combining segments
+            requestCoreThreadPoolSize:  number of threads available for request processing (unless queue fills up)  (default 25)
+            requestMaxThreadPoolSize:  number of threads available for request processing if queue fills up         (default 150)
+                                       note that default queue never fills up:  see HttpFactory
+            threadKeepAliveTime:  time to keep threads in excess of core size alive while inactive                  (default 180)
+                                  note that no such threads can exist with default unbounded request queue
+            threadKeepAliveTimeUnit:  TimeUnit of value in threadKeepAliveTime (default SECONDS)                    (default SECONDS)
+        -->
+        <!-- <parameter name="hostname">http://www.myApp.com/ws</parameter> -->
+        <!-- <parameter name="originServer">My-Server/1.1</parameter>           -->
+        <!-- <parameter name="requestTimeout">10000</parameter>                   -->
+        <!-- <parameter name="requestTcpNoDelay">false</parameter>                   -->
+        <!-- <parameter name="requestCoreThreadPoolSize">50</parameter>                      -->
+        <!-- <parameter name="RequestMaxThreadPoolSize">100</parameter>                     -->
+        <!-- <parameter name="threadKeepAliveTime">240000</parameter>                  -->
+        <!-- <parameter name="threadKeepAliveTimeUnit">MILLISECONDS</parameter>            -->
+    </transportReceiver>
+
+    <!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)
+    <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
+        <parameter name="myTopicConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="myQueueConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="default">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+    </transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Listener  -->
+
+    <!-- the non blocking http transport based on HttpCore + NIO extensions
+    <transportReceiver name="http" class="org.apache.axis2.transport.nhttp.HttpCoreNIOListener">
+        <parameter name="port" locked="false">9000</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportReceiver>-->
+
+    <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions
+    <transportReceiver name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
+        <parameter name="port" locked="false">9002</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="SSLVerifyClient">require</parameter>
+            supports optional|require or defaults to none -->
+    <!--</transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Listener  -->
+    <!-- This is a sample configuration. It assumes a mail server running in localhost.
+         Listener pops  messages that comes to the email address red@localhost. Users
+         password is red. Listener connect to the server every 3000 milliseconds.
+         Parameters with "transport." prefix is Axis2 specific. Others are all from Java Mail API. 
+         http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+     -->
+    <!-- ================================================= -->
+    <!--<transportReceiver name="mailto" class="org.apache.axis2.transport.mail.SimpleMailListener">
+        <parameter name="mail.pop3.host">localhost</parameter>
+        <parameter name="mail.pop3.user">red</parameter>
+        <parameter name="mail.store.protocol">pop3</parameter>
+        <parameter name="transport.mail.pop3.password">red</parameter>
+        <parameter name="transport.mail.replyToAddress">red@localhost</parameter>
+        <parameter name="transport.listener.interval">3000</parameter>
+    </transportReceiver>-->
+
+    <!--Uncomment if you want to have TCP transport support-->
+    <!--transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port">6060</parameter-->>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncomment the following paramter , and set it as you required.-->
+        <!--<parameter name="hostname">tcp://myApp.com/ws</parameter>-->
+    <!-- /transportReceiver -->
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <!-- transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/ -->
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+
+        <!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages -->
+        <!--  <parameter name="OmitSOAP12Action">true</parameter>  -->
+    </transportSender>
+
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+    </transportSender>
+    <transportSender name="java"
+                     class="org.apache.axis2.transport.java.JavaTransportSender"/>
+
+    <!--<transportSender name="jms"-->
+                     <!--class="org.apache.axis2.transport.jms.JMSSender"/>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Sender  -->
+
+    <!-- the non-blocking http transport sender based on HttpCore + NIO extensions
+    <transportSender name="http"  class="org.apache.axis2.transport.nhttp.HttpCoreNIOSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportSender>-->
+
+    <!-- the non-blocking https transport sender based on HttpCore + NIO SSL extensions
+    <transportSender name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
+            supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
+    <!--</transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Sender  -->
+    <!--Only need to uncomment the sender. Configuration is achieved with every client.
+        At any instant mail host should be given. Sample configuration has been given.
+        http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+   -->
+    <!-- ================================================= -->
+   <!--<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
+        <parameter name="mail.smtp.host">localhost</parameter>
+    </transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
+    <!-- Comment this to disable Addressing -->
+    <module ref="addressing"/>
+
+    <!--Configuring module , providing parameters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
+    <!-- ================================================= -->
+    <!-- Clustering  -->
+    <!-- ================================================= -->
+    <!-- Configure and uncomment following for preparing Axis2 to a clustered environment -->
+    <!--
+    <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
+        <parameter name="param1">value1</parameter>
+        <parameter name="domain">apache.axis2.domain</parameter>
+        <parameter name="synchronizeAll">true</parameter>
+        <parameter name="maxRetries">10</parameter>
+        <configurationManager class="org.apache.axis2.cluster.configuration.TribesConfigurationManager">
+            <listener class="org.apache.axis2.cluster.configuration.DefaultConfigurationManagerListener"/>
+        </configurationManager>
+        <contextManager class="org.apache.axis2.cluster.context.TribesContextManager">
+            <listener class="org.apache.axis2.cluster.context.DefaultContextManagerListener"/>
+        </contextManager>
+    </cluster>
+    -->
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="InFlow">
+        <!--  System predefined phases       -->
+        <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+        </phase>
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--  System predefined phases       -->
+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->
+        <phase name="OperationInPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+    <phaseOrder type="InFaultFlow">
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationInFaultPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFaultFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+</axisconfig>
+
diff --git a/modules/rampart-samples/basic/sample10/services.xml b/modules/rampart-samples/basic/sample10/services.xml
new file mode 100644
index 0000000..8cada6d
--- /dev/null
+++ b/modules/rampart-samples/basic/sample10/services.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!--

+ !

+ ! Copyright 2006 The Apache Software Foundation.

+ !

+ ! Licensed under the Apache License, Version 2.0 (the "License");

+ ! you may not use this file except in compliance with the License.

+ ! You may obtain a copy of the License at

+ !

+ !      http://www.apache.org/licenses/LICENSE-2.0

+ !

+ ! Unless required by applicable law or agreed to in writing, software

+ ! distributed under the License is distributed on an "AS IS" BASIS,

+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ! See the License for the specific language governing permissions and

+ ! limitations under the License.

+ !-->

+<!-- services.xml of sample-10 : MTOM optimize encrypted content -->

+<service>

+	<operation name="echo">

+		<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>

+	</operation>    

+	<parameter name="ServiceClass" locked="false">org.apache.rampart.samples.sample10.SimpleService</parameter>

+	

+	<module ref="rampart" />

+	

+    <parameter name="InflowSecurity">

+      <action>

+        <items>Timestamp Signature Encrypt</items>

+        <passwordCallbackClass>org.apache.rampart.samples.sample10.PWCBHandler</passwordCallbackClass>

+        <signaturePropFile>service.properties</signaturePropFile>

+      </action>

+    </parameter>

+    

+    <parameter name="OutflowSecurity">

+      <action>

+        <items>Timestamp Signature Encrypt</items>

+        <user>service</user>

+        <passwordCallbackClass>org.apache.rampart.samples.sample10.PWCBHandler</passwordCallbackClass>

+        <signaturePropFile>service.properties</signaturePropFile>

+        <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>

+        <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>

+        <encryptionUser>useReqSigCert</encryptionUser>

+      </action>

+    </parameter>

+    

+</service>

diff --git a/modules/rampart-samples/basic/sample10/src/org/apache/rampart/samples/sample10/Client.java b/modules/rampart-samples/basic/sample10/src/org/apache/rampart/samples/sample10/Client.java
new file mode 100644
index 0000000..1704002
--- /dev/null
+++ b/modules/rampart-samples/basic/sample10/src/org/apache/rampart/samples/sample10/Client.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample10;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+
+public class Client {
+
+    public static void main(String[] args) throws Exception {
+        
+        if(args.length != 2) {
+            System.out.println("Usage: $java Client endpoint_address client_repo_path");
+        }
+        
+        ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[1], args[1] + "/conf/axis2.xml");
+        
+        ServiceClient client = new ServiceClient(ctx, null);
+        Options options = new Options();
+        options.setAction("urn:echo");
+        options.setTo(new EndpointReference(args[0]));
+        client.setOptions(options);
+        
+        OMElement response = client.sendReceive(getPayload("Hello world"));
+        
+        System.out.println(response);
+        
+    }
+    
+    private static OMElement getPayload(String value) {
+        OMFactory factory = OMAbstractFactory.getOMFactory();
+        OMNamespace ns = factory.createOMNamespace("http://sample10.samples.rampart.apache.org","ns1");
+        OMElement elem = factory.createOMElement("echo", ns);
+        OMElement childElem = factory.createOMElement("param0", null);
+        childElem.setText(value);
+        elem.addChild(childElem);
+        
+        return elem;
+    }
+    
+}
diff --git a/modules/rampart-samples/basic/sample10/src/org/apache/rampart/samples/sample10/PWCBHandler.java b/modules/rampart-samples/basic/sample10/src/org/apache/rampart/samples/sample10/PWCBHandler.java
new file mode 100644
index 0000000..9e35df8
--- /dev/null
+++ b/modules/rampart-samples/basic/sample10/src/org/apache/rampart/samples/sample10/PWCBHandler.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample10;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import java.io.IOException;
+
+public class PWCBHandler implements CallbackHandler {
+
+    public void handle(Callback[] callbacks) throws IOException,
+            UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
+            WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+            
+            String id = pwcb.getIdentifier();
+            if("client".equals(id)) {
+                pwcb.setPassword("apache");
+            } else if("service".equals(id)) {
+                pwcb.setPassword("apache");
+            }
+        }
+    }
+
+}
diff --git a/modules/rampart-samples/basic/sample10/src/org/apache/rampart/samples/sample10/SimpleService.java b/modules/rampart-samples/basic/sample10/src/org/apache/rampart/samples/sample10/SimpleService.java
new file mode 100644
index 0000000..93743ea
--- /dev/null
+++ b/modules/rampart-samples/basic/sample10/src/org/apache/rampart/samples/sample10/SimpleService.java
@@ -0,0 +1,25 @@
+package org.apache.rampart.samples.sample10;
+/*
+
+ * Copyright  2003-2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+public class SimpleService {
+    
+    public String echo(String arg) {
+        return arg;
+    }
+}
diff --git a/modules/rampart-samples/basic/sample11/README.txt b/modules/rampart-samples/basic/sample11/README.txt
new file mode 100644
index 0000000..2a60545
--- /dev/null
+++ b/modules/rampart-samples/basic/sample11/README.txt
@@ -0,0 +1,8 @@
+Dynamic configuration : Get rid of the config files ... let's use code!
+
+Both client and servce are configured to first sign and then encrypt the 
+outgoing message and to decrypt and verify the incoming message using their 
+key pairs.
+	- Note that we don't use any parameters in the client.axis2.xml
+    - See org.apache.rampart.samples.sample11.Client's getOutflowConfiguration()
+      getInflowConfiguration() methods and their usage.
diff --git a/modules/rampart-samples/basic/sample11/client.axis2.xml b/modules/rampart-samples/basic/sample11/client.axis2.xml
new file mode 100644
index 0000000..ab60d0c
--- /dev/null
+++ b/modules/rampart-samples/basic/sample11/client.axis2.xml
@@ -0,0 +1,464 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements. See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership. The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License. You may obtain a copy of the License at
+  ~
+  ~ http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied. See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<axisconfig name="AxisJava2.0">
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
+    <parameter name="hotdeployment">true</parameter>
+    <parameter name="hotupdate">false</parameter>
+    <parameter name="enableMTOM">false</parameter>
+    <parameter name="enableSwA">false</parameter>
+
+    <!--Uncomment if you want to enable file caching for attachments -->
+    <!--parameter name="cacheAttachments">true</parameter>
+    <parameter name="attachmentDIR"></parameter>
+    <parameter name="sizeThreshold">4000</parameter-->
+
+    <!--Uncomment if you want to enable the reduction of the in-memory cache of WSDL definitions -->
+    <!--In some server environments, the available memory heap is limited and can fill up under load -->
+    <!--Since in-memory copies of WSDL definitions can be large, some steps can be taken-->
+    <!--to reduce the memory needed for the cached WSDL definitions. -->
+    <!--parameter name="reduceWSDLMemoryCache">true</parameter-->
+                                                       
+    <!--This will give out the timout of the configuration contexts, in milliseconds-->
+    <parameter name="ConfigContextTimeoutInterval">30000</parameter>
+
+    <!--During a fault, stack trace can be sent with the fault message. The following flag will control -->
+    <!--that behavior.-->
+    <parameter name="sendStacktraceDetailsWithFaults">false</parameter>
+
+    <!--If there aren't any information available to find out the fault reason, we set the message of the exception-->
+    <!--as the faultreason/Reason. But when a fault is thrown from a service or some where, it will be -->
+    <!--wrapped by different levels. Due to this the initial exception message can be lost. If this flag-->
+    <!--is set, then Axis2 tries to get the first exception and set its message as the faultreason/Reason.-->
+    <parameter name="DrillDownToRootCauseForFaultReason">false</parameter>
+
+    <parameter name="userName">admin</parameter>
+    <parameter name="password">axis2</parameter>
+
+    <!--To override repository/services you need to uncomment following parameter and value SHOULD be absolute file path.-->
+    <!--ServicesDirectory only works on the following cases-->
+    <!---File based configurator and in that case the value should be a file URL (http:// not allowed)-->
+    <!---When creating URL Based configurator with URL “file://”  -->
+    <!--- War based configurator with expanded case , -->
+
+    <!--All the other scenarios it will be ignored.-->
+    <!--<parameter name="ServicesDirectory">service</parameter>-->
+    <!--To override repository/modules you need to uncomment following parameter and value SHOULD be absolute file path-->
+    <!--<parameter name="ModulesDirectory">modules</parameter>-->
+
+
+
+    <!--Following params will set the proper context paths for invocations. All the endpoints will have a commons context-->
+    <!--root which can configured using the following contextRoot parameter-->
+    <!--<parameter name="contextRoot">axis2</parameter>-->
+
+    <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be used to distinguiush those endpoints-->
+    <!--In case of a servlet, if you change this you have to manually change the settings of your servlet container to map this -->
+    <!--context path to proper Axis2 servlets-->
+    <!--<parameter name="servicePath">services</parameter>-->
+    <!--<parameter name="restPath">rest</parameter>-->
+
+    <!-- Following parameter will completely disable REST handling in Axis2-->
+    <parameter name="disableREST" locked="true">false</parameter>
+    
+    <!-- Following parameter will suppress generation of SOAP 1.2 bindings in auto-generated WSDL files -->
+    <parameter name="disableSOAP12" locked="true">false</parameter>
+
+    <!-- ================================================= -->
+    <!-- Deployers -->
+    <!-- ================================================= -->
+
+    <!--Service deployer , this will alow users to deploy AAR or exploded AAR as axis2 services-->
+    <deployer extension=".aar" directory="services" class="org.apache.axis2.deployment.ServiceDeployer">
+        <serviceBuilderExtension name ="jwsbuilderExt" class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>
+        <serviceBuilderExtension name ="wsdlbuilderExt" class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>
+    </deployer>
+    
+    <!--POJO deployer , this will alow users to drop .class file and make that into a service-->
+    <deployer extension=".class" directory="pojo" class="org.apache.axis2.deployment.POJODeployer"/>
+    <!--<deployer extension=".jsa" directory="rmiservices" class="org.apache.axis2.rmi.deploy.RMIServiceDeployer"/>-->
+    
+
+    <!-- Following parameter will set the host name for the epr-->
+    <!--<parameter name="hostname" locked="true">myhost.com</parameter>-->
+
+    <!-- If you have a front end host which exposes this webservice using a different public URL  -->
+    <!-- use this parameter to override autodetected url -->
+    <!--<parameter name="httpFrontendHostUrl">https://someotherhost/context</parameter>-->
+
+
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
+
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
+    <!--This is the deafult MessageReceiver for the system , if you want to have MessageReceivers for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovrride this for a particular service by adding the same element with your requirement-->
+     <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2006/01/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
+
+    <!-- ================================================= -->
+    <!-- Message Formatter -->
+    <!-- ================================================= -->
+    <!--Following content type to message formatter mapping can be used to implement support for different message -->
+    <!--format  serialization in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageFormatters>
+        <messageFormatter contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+        <messageFormatter contentType="multipart/form-data"
+                         class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
+        <messageFormatter contentType="application/xml"
+                         class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+        <messageFormatter contentType="text/xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+        <messageFormatter contentType="application/soap+xml"
+                         class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+    </messageFormatters>
+
+    <!-- ================================================= -->
+    <!-- Message Builders -->
+    <!-- ================================================= -->
+    <!--Following content type to builder mapping can be used to implement support for different message -->
+    <!--formats in Axis2. These message formats are expected to be resolved based on the content type. -->
+    <messageBuilders>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/xml"
+                         class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+        <messageBuilder contentType="application/x-www-form-urlencoded"
+                         class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
+        <messageBuilder contentType="multipart/form-data"
+                         class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
+    </messageBuilders>
+
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
+        <parameter name="port">8080</parameter>
+        <!-- Here is the complete list of supported parameters (see example settings further below):
+            port: the port to listen on (default 6060)
+            hostname:  if non-null, url prefix used in reply-to endpoint references                                 (default null)
+            originServer:  value of http Server header in outgoing messages                                         (default "Simple-Server/1.1")
+            requestTimeout:  value in millis of time that requests can wait for data                                (default 20000)
+            requestTcpNoDelay:  true to maximize performance and minimize latency                                   (default true)
+                                false to minimize bandwidth consumption by combining segments
+            requestCoreThreadPoolSize:  number of threads available for request processing (unless queue fills up)  (default 25)
+            requestMaxThreadPoolSize:  number of threads available for request processing if queue fills up         (default 150)
+                                       note that default queue never fills up:  see HttpFactory
+            threadKeepAliveTime:  time to keep threads in excess of core size alive while inactive                  (default 180)
+                                  note that no such threads can exist with default unbounded request queue
+            threadKeepAliveTimeUnit:  TimeUnit of value in threadKeepAliveTime (default SECONDS)                    (default SECONDS)
+        -->
+        <!-- <parameter name="hostname">http://www.myApp.com/ws</parameter> -->
+        <!-- <parameter name="originServer">My-Server/1.1</parameter>           -->
+        <!-- <parameter name="requestTimeout">10000</parameter>                   -->
+        <!-- <parameter name="requestTcpNoDelay">false</parameter>                   -->
+        <!-- <parameter name="requestCoreThreadPoolSize">50</parameter>                      -->
+        <!-- <parameter name="RequestMaxThreadPoolSize">100</parameter>                     -->
+        <!-- <parameter name="threadKeepAliveTime">240000</parameter>                  -->
+        <!-- <parameter name="threadKeepAliveTimeUnit">MILLISECONDS</parameter>            -->
+    </transportReceiver>
+
+    <!--Uncomment this and configure as appropriate for JMS transport support, after setting up your JMS environment (e.g. ActiveMQ)
+    <transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
+        <parameter name="myTopicConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="myQueueConnectionFactory">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+
+        <parameter name="default">
+            <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+            <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
+            <parameter name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+        </parameter>
+    </transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Listener  -->
+
+    <!-- the non blocking http transport based on HttpCore + NIO extensions
+    <transportReceiver name="http" class="org.apache.axis2.transport.nhttp.HttpCoreNIOListener">
+        <parameter name="port" locked="false">9000</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportReceiver>-->
+
+    <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions
+    <transportReceiver name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
+        <parameter name="port" locked="false">9002</parameter>
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="SSLVerifyClient">require</parameter>
+            supports optional|require or defaults to none -->
+    <!--</transportReceiver>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Listener  -->
+    <!-- This is a sample configuration. It assumes a mail server running in localhost.
+         Listener pops  messages that comes to the email address red@localhost. Users
+         password is red. Listener connect to the server every 3000 milliseconds.
+         Parameters with "transport." prefix is Axis2 specific. Others are all from Java Mail API. 
+         http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+     -->
+    <!-- ================================================= -->
+    <!--<transportReceiver name="mailto" class="org.apache.axis2.transport.mail.SimpleMailListener">
+        <parameter name="mail.pop3.host">localhost</parameter>
+        <parameter name="mail.pop3.user">red</parameter>
+        <parameter name="mail.store.protocol">pop3</parameter>
+        <parameter name="transport.mail.pop3.password">red</parameter>
+        <parameter name="transport.mail.replyToAddress">red@localhost</parameter>
+        <parameter name="transport.listener.interval">3000</parameter>
+    </transportReceiver>-->
+
+    <!--Uncomment if you want to have TCP transport support-->
+    <!--transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
+        <parameter name="port">6060</parameter-->>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncomment the following paramter , and set it as you required.-->
+        <!--<parameter name="hostname">tcp://myApp.com/ws</parameter>-->
+    <!-- /transportReceiver -->
+
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
+
+    <!-- transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/ -->
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+
+        <!-- If following is set to 'true', optional action part of the Content-Type will not be added to the SOAP 1.2 messages -->
+        <!--  <parameter name="OmitSOAP12Action">true</parameter>  -->
+    </transportSender>
+
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding">chunked</parameter>
+    </transportSender>
+    <transportSender name="java"
+                     class="org.apache.axis2.transport.java.JavaTransportSender"/>
+
+    <!--<transportSender name="jms"-->
+                     <!--class="org.apache.axis2.transport.jms.JMSSender"/>-->
+
+    <!-- ================================================= -->
+    <!-- Non-blocking http/s Transport Sender  -->
+
+    <!-- the non-blocking http transport sender based on HttpCore + NIO extensions
+    <transportSender name="http"  class="org.apache.axis2.transport.nhttp.HttpCoreNIOSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+    </transportSender>-->
+
+    <!-- the non-blocking https transport sender based on HttpCore + NIO SSL extensions
+    <transportSender name="https" class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLSender">
+        <parameter name="non-blocking" locked="false">true</parameter>
+        <parameter name="keystore" locked="false">
+            <KeyStore>
+                <Location>identity.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+                <KeyPassword>password</KeyPassword>
+            </KeyStore>
+        </parameter>
+        <parameter name="truststore" locked="false">
+            <TrustStore>
+                <Location>trust.jks</Location>
+                <Type>JKS</Type>
+                <Password>password</Password>
+            </TrustStore>
+        </parameter>-->
+        <!--<parameter name="HostnameVerifier">DefaultAndLocalhost</parameter>
+            supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified -->
+    <!--</transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Mail Transport Sender  -->
+    <!--Only need to uncomment the sender. Configuration is achieved with every client.
+        At any instant mail host should be given. Sample configuration has been given.
+        http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+   -->
+    <!-- ================================================= -->
+   <!--<transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
+        <parameter name="mail.smtp.host">localhost</parameter>
+    </transportSender>-->
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
+    <!-- Comment this to disable Addressing -->
+    <module ref="addressing"/>
+
+    <!--Configuring module , providing parameters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
+    <!-- ================================================= -->
+    <!-- Clustering  -->
+    <!-- ================================================= -->
+    <!-- Configure and uncomment following for preparing Axis2 to a clustered environment -->
+    <!--
+    <cluster class="org.apache.axis2.cluster.tribes.TribesClusterManager">
+        <parameter name="param1">value1</parameter>
+        <parameter name="domain">apache.axis2.domain</parameter>
+        <parameter name="synchronizeAll">true</parameter>
+        <parameter name="maxRetries">10</parameter>
+        <configurationManager class="org.apache.axis2.cluster.configuration.TribesConfigurationManager">
+            <listener class="org.apache.axis2.cluster.configuration.DefaultConfigurationManagerListener"/>
+        </configurationManager>
+        <contextManager class="org.apache.axis2.cluster.context.TribesContextManager">
+            <listener class="org.apache.axis2.cluster.context.DefaultContextManagerListener"/>
+        </contextManager>
+    </cluster>
+    -->
+
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
+    <phaseOrder type="InFlow">
+        <!--  System predefined phases       -->
+        <phase name="Transport">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+                <order phase="Transport"/>
+            </handler>
+        </phase>
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--  System predefined phases       -->
+        <!--   After Postdispatch phase module author or service author can add any phase he want      -->
+        <phase name="OperationInPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutPhase"/>
+        <!--system predefined phase-->
+        <!--these phase will run irrespective of the service-->
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+    <phaseOrder type="InFaultFlow">
+        <phase name="Addressing">
+             <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+                 <order phase="Addressing"/>
+            </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+            <handler name="RequestURIOperationDispatcher"
+                     class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+            <handler name="HTTPLocationBasedDispatcher"
+                     class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+        </phase>
+        <phase name="RMPhase"/>
+        <!--      user can add his own phases to this area  -->
+        <phase name="OperationInFaultPhase"/>
+        <phase name="soapmonitorPhase"/>
+    </phaseOrder>
+    <phaseOrder type="OutFaultFlow">
+        <!--      user can add his own phases to this area  -->
+        <phase name="soapmonitorPhase"/>
+        <phase name="OperationOutFaultPhase"/>
+        <phase name="RMPhase"/>
+        <phase name="PolicyDetermination"/>
+        <phase name="MessageOut"/>
+        <phase name="Security"/>
+    </phaseOrder>
+</axisconfig>
+
diff --git a/modules/rampart-samples/basic/sample11/services.xml b/modules/rampart-samples/basic/sample11/services.xml
new file mode 100644
index 0000000..28715e1
--- /dev/null
+++ b/modules/rampart-samples/basic/sample11/services.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!--

+ !

+ ! Copyright 2006 The Apache Software Foundation.

+ !

+ ! Licensed under the Apache License, Version 2.0 (the "License");

+ ! you may not use this file except in compliance with the License.

+ ! You may obtain a copy of the License at

+ !

+ !      http://www.apache.org/licenses/LICENSE-2.0

+ !

+ ! Unless required by applicable law or agreed to in writing, software

+ ! distributed under the License is distributed on an "AS IS" BASIS,

+ ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

+ ! See the License for the specific language governing permissions and

+ ! limitations under the License.

+ !-->

+<!-- services.xml of sample-11 : Dynamic client configuration -->

+<service>

+	<operation name="echo">

+		<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>

+	</operation>    

+	<parameter name="ServiceClass" locked="false">org.apache.rampart.samples.sample11.SimpleService</parameter>

+	

+		<module ref="rampart" />

+	

+    <parameter name="InflowSecurity">

+      <action>

+        <items>Timestamp Signature Encrypt</items>

+        <passwordCallbackClass>org.apache.rampart.samples.sample11.PWCBHandler</passwordCallbackClass>

+        <signaturePropFile>service.properties</signaturePropFile>

+      </action>

+    </parameter>

+    

+    <parameter name="OutflowSecurity">

+      <action>

+        <items>Timestamp Signature Encrypt</items>

+        <user>service</user>

+        <passwordCallbackClass>org.apache.rampart.samples.sample11.PWCBHandler</passwordCallbackClass>

+        <signaturePropFile>service.properties</signaturePropFile>

+        <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>

+        <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>

+        <encryptionUser>useReqSigCert</encryptionUser>

+      </action>

+    </parameter>

+</service>

diff --git a/modules/rampart-samples/basic/sample11/src/org/apache/rampart/samples/sample11/Client.java b/modules/rampart-samples/basic/sample11/src/org/apache/rampart/samples/sample11/Client.java
new file mode 100644
index 0000000..5d53eb1
--- /dev/null
+++ b/modules/rampart-samples/basic/sample11/src/org/apache/rampart/samples/sample11/Client.java
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample11;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMNamespace;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.client.ServiceClient;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.ConfigurationContextFactory;
+import org.apache.axis2.description.Parameter;
+import org.apache.rampart.handler.WSSHandlerConstants;
+import org.apache.rampart.handler.config.InflowConfiguration;
+import org.apache.rampart.handler.config.OutflowConfiguration;
+
+public class Client {
+
+    public static void main(String[] args) throws Exception {
+        
+        if(args.length != 2) {
+            System.out.println("Usage: $java Client endpoint_address client_repo_path");
+        }
+        
+        ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[1], args[1] + "/conf/axis2.xml");
+        
+        ServiceClient client = new ServiceClient(ctx, null);
+        Options options = new Options();
+        options.setAction("urn:echo");
+        options.setTo(new EndpointReference(args[0]));
+        
+        //Set the rampart parameters
+        options.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY, getOutflowConfiguration());
+        options.setProperty(WSSHandlerConstants.INFLOW_SECURITY, getInflowConfiguration());
+        
+        client.setOptions(options);
+        
+        //Engage rampart
+        client.engageModule("rampart");
+        
+        OMElement response = client.sendReceive(getPayload("Hello world"));
+        
+        System.out.println(response);
+        
+    }
+    
+    private static OMElement getPayload(String value) {
+        OMFactory factory = OMAbstractFactory.getOMFactory();
+        OMNamespace ns = factory.createOMNamespace("http://sample11.samples.rampart.apache.org","ns1");
+        OMElement elem = factory.createOMElement("echo", ns);
+        OMElement childElem = factory.createOMElement("param0", null);
+        childElem.setText(value);
+        elem.addChild(childElem);
+        
+        return elem;
+    }
+    
+    private static Parameter getOutflowConfiguration() {
+        OutflowConfiguration ofc = new OutflowConfiguration();
+        ofc.setActionItems("Timestamp Signature Encrypt");
+        ofc.setUser("client");
+        ofc.setPasswordCallbackClass("org.apache.rampart.samples.sample11.PWCBHandler");
+        ofc.setSignaturePropFile("client.properties");
+        ofc.setSignatureKeyIdentifier(WSSHandlerConstants.BST_DIRECT_REFERENCE);
+        ofc.setEncryptionKeyIdentifier(WSSHandlerConstants.ISSUER_SERIAL);
+        ofc.setEncryptionUser("service");
+        
+        return ofc.getProperty();
+    }
+    
+    private static Parameter getInflowConfiguration() {
+        InflowConfiguration ifc = new InflowConfiguration();
+        ifc.setActionItems("Timestamp Signature Encrypt");
+        ifc.setPasswordCallbackClass("org.apache.rampart.samples.sample11.PWCBHandler");
+        ifc.setSignaturePropFile("client.properties");
+        
+        return ifc.getProperty();
+    }
+    
+}
diff --git a/modules/rampart-samples/basic/sample11/src/org/apache/rampart/samples/sample11/PWCBHandler.java b/modules/rampart-samples/basic/sample11/src/org/apache/rampart/samples/sample11/PWCBHandler.java
new file mode 100644
index 0000000..bc66753
--- /dev/null
+++ b/modules/rampart-samples/basic/sample11/src/org/apache/rampart/samples/sample11/PWCBHandler.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.rampart.samples.sample11;
+
+import org.apache.ws.security.WSPasswordCallback;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+import java.io.IOException;
+
+public class PWCBHandler implements CallbackHandler {
+
+    public void handle(Callback[] callbacks) throws IOException,
+            UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
+            WSPasswordCallback pwcb = (WSPasswordCallback)callbacks[i];
+            
+            String id = pwcb.getIdentifier();
+            if("client".equals(id)) {
+                pwcb.setPassword("apache");
+            } else if("service".equals(id)) {
+                pwcb.setPassword("apache");
+            }
+        }
+    }
+
+}
diff --git a/modules/rampart-samples/basic/sample11/src/org/apache/rampart/samples/sample11/SimpleService.java b/modules/rampart-samples/basic/sample11/src/org/apache/rampart/samples/sample11/SimpleService.java
new file mode 100644
index 0000000..012bd62
--- /dev/null
+++ b/modules/rampart-samples/basic/sample11/src/org/apache/rampart/samples/sample11/SimpleService.java
@@ -0,0 +1,25 @@
+package org.apache.rampart.samples.sample11;
+/*
+
+ * Copyright  2003-2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+public class SimpleService {
+    
+    public String echo(String arg) {
+        return arg;
+    }
+}