Package org.apache.tuscany.sca.binding.ws.axis2.itests

Examples of org.apache.tuscany.sca.binding.ws.axis2.itests.QuestionMarkWSDLIncludeTestCaseFIXME


        if (headerQName != null){
            SOAPEnvelope envelope = messageContext.getEnvelope();
            OMFactory factory = envelope.getOMFactory();
            SOAPHeader soapHeader = envelope.getHeader();
           
            Axis2SOAPHeader header = Axis2HeaderPolicyUtil.getHeader(msg, headerQName) ;
           
            if (header != null){
                soapHeader.addChild(header.getAsSOAPHeaderBlock(factory));
            }
        }
    }
View Full Code Here


    public Message invoke(Message msg) {
        // could call out here to some 3rd party system to get credentials
       
        if ( policy.getTokenName() != null){
            // create Axis representation of header
            Axis2SOAPHeaderString header = new Axis2SOAPHeaderString();
            header.setHeaderName(policy.getTokenName());
            header.setHeaderString("SomeWSAuthorizationToken");
   
            // add header to Tuscany message
            msg.getHeaders().add(header)
        }
       
View Full Code Here

            for (Axis2HeaderPolicy policy : axis2HeaderPolicies){
                //Axis2BindingHeaderConfigurator.getHeader(inMC, msg, policy.getHeaderName());
            }
           
            if (axis2TokenAuthenticationPolicy != null) {
                Axis2SOAPHeaderString tokenHeader = new Axis2SOAPHeaderString();
                Axis2BindingHeaderConfigurator.getHeader(inMC,
                                                         msg,
                                                         axis2TokenAuthenticationPolicy.getTokenName(),
                                                         tokenHeader);
            }
View Full Code Here

        }
    }

    public Message invoke(Message msg) {
       
        Axis2SOAPHeaderString header = (Axis2SOAPHeaderString)Axis2HeaderPolicyUtil.getHeader(msg, policy.getTokenName());
       
        if (header != null) {
            System.out.println("Web service received token: " + header.getHeaderString());
           
            // call out here to some 3rd party system to do whatever you
            // need to turn header credentials into an authenticated principal 
           
            Subject subject = SecurityUtil.getSubject(msg);
            Principal principal = new TokenPrincipal(header.getHeaderString());
            subject.getPrincipals().add(principal);           
        }
   
        return getNext().invoke(msg);
    }
View Full Code Here

            for (Axis2HeaderPolicy policy : axis2HeaderPolicies){
                //Axis2BindingHeaderConfigurator.getHeader(inMC, msg, policy.getHeaderName());
            }
           
            if (axis2TokenAuthenticationPolicy != null) {
                Axis2SOAPHeaderString tokenHeader = new Axis2SOAPHeaderString();
                Axis2BindingHeaderConfigurator.getHeader(inMC,
                                                         msg,
                                                         axis2TokenAuthenticationPolicy.getTokenName(),
                                                         tokenHeader);
            }
View Full Code Here

    public Message invoke(Message msg) {
        // could call out here to some 3rd party system to get credentials
       
        if ( policy.getTokenName() != null){
            // create Axis representation of header
            Axis2SOAPHeaderString header = new Axis2SOAPHeaderString();
            header.setHeaderName(policy.getTokenName());
            header.setHeaderString("SomeWSAuthorizationToken");
   
            // add header to Tuscany message
            msg.getHeaders().add(header)
        }
       
View Full Code Here

        }
    }

    public Message invoke(Message msg) {
       
        Axis2SOAPHeaderString header = (Axis2SOAPHeaderString)Axis2HeaderPolicyUtil.getHeader(msg, policy.getTokenName());
       
        if (header != null) {
            System.out.println("Web service received token: " + header.getHeaderString());
           
            // call out here to some 3rd party system to do whatever you
            // need to turn header credentials into an authenticated principal 
           
            Subject subject = SecurityUtil.getSubject(msg);
            Principal principal = new TokenPrincipal(header.getHeaderString());
            subject.getPrincipals().add(principal);           
        }
   
        return getNext().invoke(msg);
    }
View Full Code Here

            for (Axis2HeaderPolicy policy : axis2HeaderPolicies){
                //Axis2BindingHeaderConfigurator.getHeader(inMC, msg, policy.getHeaderName());
            }
           
            if (axis2TokenAuthenticationPolicy != null) {
                Axis2SOAPHeaderString tokenHeader = new Axis2SOAPHeaderString();
                Axis2BindingHeaderConfigurator.getHeader(inMC,
                                                         msg,
                                                         axis2TokenAuthenticationPolicy.getTokenName(),
                                                         tokenHeader);
            }
View Full Code Here

    public Message invoke(Message msg) {
        // could call out here to some 3rd party system to get credentials
       
        if ( policy.getTokenName() != null){
            // create Axis representation of header
            Axis2SOAPHeaderString header = new Axis2SOAPHeaderString();
            header.setHeaderName(policy.getTokenName());
            header.setHeaderString("SomeWSAuthorizationToken");
   
            // add header to Tuscany message
            msg.getHeaders().add(header)
        }
       
View Full Code Here

        }
    }

    public Message invoke(Message msg) {
       
        Axis2SOAPHeaderString header = (Axis2SOAPHeaderString)Axis2HeaderPolicyUtil.getHeader(msg, policy.getTokenName());
       
        if (header != null) {
            System.out.println("Web service received token: " + header.getHeaderString());
           
            // call out here to some 3rd party system to do whatever you
            // need to turn header credentials into an authenticated principal 
           
            Subject subject = SecurityUtil.getSubject(msg);
            Principal principal = new TokenPrincipal(header.getHeaderString());
            subject.getPrincipals().add(principal);           
        }
   
        return getNext().invoke(msg);
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.binding.ws.axis2.itests.QuestionMarkWSDLIncludeTestCaseFIXME

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.