Package org.apache.rampart.conversation

Examples of org.apache.rampart.conversation.ConversationConfiguration


     * @param msgContext
     * @throws Exception
     */
    private void processSecConv(MessageContext msgContext) throws Exception {
        // Parse the configuration
        ConversationConfiguration config = ConversationConfiguration
                .load(msgContext, false);

        // check if there's an RSTR in the msg and process it if exists
        SOAPEnvelope env = (SOAPEnvelope) config.getDocument()
                .getDocumentElement();
        SOAPHeader header = env.getHeader();
        if (header != null
                && header
                        .getFirstChildWithName(new QName(
                                WSSHandlerConstants.WST_NS,
                                WSSHandlerConstants.REQUEST_SECURITY_TOKEN_RESPONSE_LN)) != null) {
            OMElement elem = header
                    .getFirstChildWithName(new QName(
                            WSSHandlerConstants.WST_NS,
                            WSSHandlerConstants.REQUEST_SECURITY_TOKEN_RESPONSE_LN));
            Util.processRSTR(elem, config);
        }

        secEngine.processSecurityHeader(config.getDocument(), null,
                new ConversationCallbackHandler(config), config
                        .getCrypto());


        // Convert back to llom since the inflow cannot use llom
        msgContext.setEnvelope(Axis2Util
                .getSOAPEnvelopeFromDOMDocument(config.getDocument(), true));
       
        SOAPHeader soapHeader = null;
        try {
            soapHeader = msgContext.getEnvelope().getHeader();
        } catch (OMException ex) {
View Full Code Here


     * @param msgContext
     * @throws Exception
     */
    private void processSecConv(MessageContext msgContext) throws Exception {
        //Parse the Conversation configuration
        ConversationConfiguration config = ConversationConfiguration.load(msgContext, true);
        if(config != null)
        msgContext.setEnvelope((SOAPEnvelope) config.getDocument()
                .getDocumentElement());
       
        if(!config.getMsgCtx().isServerSide()) {
            if(config.getContextIdentifier() == null && !config.getMsgCtx().isServerSide()) {
     
                String sts = config.getStsEPRAddress();
                if(sts != null) {
                  //Use a security token service
                    Axis2Util.useDOOM(false);
                    STSRequester.issueRequest(config);
                    Axis2Util.useDOOM(true);
View Full Code Here

     * @param msgContext
     * @throws Exception
     */
    private void processSecConv(MessageContext msgContext) throws Exception {
        //Parse the Conversation configuration
        ConversationConfiguration config = ConversationConfiguration.load(msgContext, true);
        if(config != null)
        msgContext.setEnvelope((SOAPEnvelope) config.getDocument()
                .getDocumentElement());
       
        if(!config.getMsgCtx().isServerSide()) {
            if(config.getContextIdentifier() == null && !config.getMsgCtx().isServerSide()) {
     
                String sts = config.getStsEPRAddress();
                if(sts != null) {
                  //Use a security token service
                    Axis2Util.useDOOM(false);
                    STSRequester.issueRequest(config);
                    Axis2Util.useDOOM(true);
View Full Code Here

     * @param msgContext
     * @throws Exception
     */
    private void processSecConv(MessageContext msgContext) throws Exception {
        // Parse the configuration
        ConversationConfiguration config = ConversationConfiguration
                .load(msgContext, false);

        // check if there's an RSTR in the msg and process it if exists
        SOAPEnvelope env = (SOAPEnvelope) config.getDocument()
                .getDocumentElement();
        SOAPHeader header = env.getHeader();
        if (header != null
                && header
                        .getFirstChildWithName(new QName(
                                WSSHandlerConstants.WST_NS,
                                WSSHandlerConstants.REQUEST_SECURITY_TOKEN_RESPONSE_LN)) != null) {
            OMElement elem = header
                    .getFirstChildWithName(new QName(
                            WSSHandlerConstants.WST_NS,
                            WSSHandlerConstants.REQUEST_SECURITY_TOKEN_RESPONSE_LN));
            Util.processRSTR(elem, config);
        }

        secEngine.processSecurityHeader(config.getDocument(), null,
                new ConversationCallbackHandler(config), config
                        .getCrypto());

        // Convert back to llom since the inflow cannot use llom
        msgContext.setEnvelope(Axis2Util
                .getSOAPEnvelopeFromDOOMDocument(config.getDocument()));
    }
View Full Code Here

TOP

Related Classes of org.apache.rampart.conversation.ConversationConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.