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

Examples of org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorld


        URL url = getClass().getResource("mock_policies.xml");
       
        InputStream urlStream = url.openStream();
        XMLStreamReader reader = inputFactory.createXMLStreamReader(urlStream);
       
        Axis2ConfigParamPolicy policy = (Axis2ConfigParamPolicy)staxProcessor.read(reader);
        assertEquals(policy.getParamElements().size(), 2);
    }
View Full Code Here


            }
           
            // construct the rest of the URI based on the policy. All the details are put
            // into the URI here rather than being place directly into the Axis configuration
            // as the Axis JMS sender relies on parsing the target URI     
            Axis2ConfigParamPolicy axis2ConfigParamPolicy = null;
            for ( Object policy : transportJmsPolicySet.getPolicies() ) {
                if ( policy instanceof Axis2ConfigParamPolicy ) {
                    axis2ConfigParamPolicy = (Axis2ConfigParamPolicy)policy;
                    Iterator paramIterator = axis2ConfigParamPolicy.getParamElements().get(DEFAULT_QUEUE_CONNECTION_FACTORY).getChildElements();
                   
                    if (paramIterator.hasNext()){
                        StringBuffer uriParams = new StringBuffer("?");
                      
                        while (paramIterator.hasNext()){
View Full Code Here

        if (ps == null) {
            return;
        }
        for (Object policy : ps.getPolicies()) {
            if (policy instanceof Axis2ConfigParamPolicy) {
                Axis2ConfigParamPolicy axis2ConfigParamPolicy = (Axis2ConfigParamPolicy)policy;
                for (Map.Entry<String, OMElement> param : axis2ConfigParamPolicy.getParamElements().entrySet()) {
                    Parameter configParam = new Parameter(param.getKey(), param.getValue().getFirstElement());
                    configParam.setParameterElement(param.getValue());
                    context.getAxisConfiguration().addParameter(configParam);
                }
            }
View Full Code Here

            }
           
            // construct the rest of the URI based on the policy. All the details are put
            // into the URI here rather than being place directly into the Axis configuration
            // as the Axis JMS sender relies on parsing the target URI     
            Axis2ConfigParamPolicy axis2ConfigParamPolicy = null;
            for ( Object policy : transportJmsPolicySet.getPolicies() ) {
                if ( policy instanceof Axis2ConfigParamPolicy ) {
                    axis2ConfigParamPolicy = (Axis2ConfigParamPolicy)policy;
                    Iterator paramIterator = axis2ConfigParamPolicy.getParamElements().get(DEFAULT_QUEUE_CONNECTION_FACTORY).getChildElements();
                   
                    if (paramIterator.hasNext()){
                        StringBuffer uriParams = new StringBuffer("?");
                      
                        while (paramIterator.hasNext()){
View Full Code Here

        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

        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

        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

        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

TOP

Related Classes of org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorld

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.