Package org.apache.tuscany.sca.binding.ws.axis2.policy.configurator

Examples of org.apache.tuscany.sca.binding.ws.axis2.policy.configurator.Axis2BindingBasicAuthenticationConfigurator


       

        final WSDLToAxisServiceBuilder builder = new WSDL11ToAxisServiceBuilder(def, serviceQName, port.getName());
        builder.setServerSide(true);
        // [rfeng] Add a custom resolver to work around WSCOMMONS-228
        builder.setCustomResolver(new URIResolverImpl(def));
        builder.setBaseUri(def.getDocumentBaseURI());
        // [rfeng]       
        // AxisService axisService = builder.populateService();
        // Allow privileged access to read properties. Requires PropertiesPermission read in
        // security policy.
View Full Code Here


       

        final WSDLToAxisServiceBuilder builder = new WSDL11ToAxisServiceBuilder(def, serviceQName, port.getName());
        builder.setServerSide(true);
        // [rfeng] Add a custom resolver to work around WSCOMMONS-228
        builder.setCustomResolver(new URIResolverImpl(def));
        builder.setBaseUri(def.getDocumentBaseURI());
        // [rfeng]       
        // AxisService axisService = builder.populateService();
        // Allow privileged access to read properties. Requires PropertiesPermission read in
        // security policy.
View Full Code Here

        String portName = wsBinding.getPortName();

        WSDLToAxisServiceBuilder builder = new WSDL11ToAxisServiceBuilder(definition, serviceQName, portName);
        builder.setServerSide(true);
        // [rfeng] Add a custom resolver to work around WSCOMMONS-228
        builder.setCustomResolver(new URIResolverImpl(definition));
        builder.setBaseUri(definition.getDocumentBaseURI());
        // [rfeng]
        AxisService axisService = builder.populateService();

        String path = URI.create(wsBinding.getURI()).getPath();
View Full Code Here

        String callbackAddress = null;

        // create a message object and set the args as its body
        Message msg = messageFactory.createMessage();
        msg.setOperation(operation);
        WSAxis2BindingContext bindingContext = new WSAxis2BindingContext();
        bindingContext.setAxisInMessageContext(inMC);
        bindingContext.setAxisOutMessageContext(outMC); //TUSCANY-3881
        msg.setBindingContext(bindingContext);

       
        if (wsBinding.isRpcLiteral()){              
            // remove the wrapping element containing
View Full Code Here

    }
  
    public Message invoke(Message msg) {
        try {
            final OperationClient operationClient = createOperationClient(msg);
            WSAxis2BindingContext bindingContext = new WSAxis2BindingContext();
            bindingContext.setAxisOperationClient(operationClient);
            bindingContext.setAxisOutMessageContext(operationClient.getMessageContext("Out"));
            // set in the transport invoker when the response is received
            //bindingContext.setAxisInMessageContext(operationClient.getMessageContext("In"));
            msg.setBindingContext(bindingContext);
           
            msg = endpointReference.getBindingInvocationChain().getHeadInvoker().invoke(msg);
View Full Code Here

        return msg;
    }

    protected Object invokeTarget(Message msg) throws AxisFault {
        WSAxis2BindingContext bindingContext = msg.getBindingContext();
        final OperationClient operationClient = bindingContext.getAxisOperationClient();

        // ensure connections are tracked so that they can be closed by the reference binding
        MessageContext requestMC = operationClient.getMessageContext("Out");
        requestMC.getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);
        requestMC.getOptions().setTimeOutInMilliSeconds(240000L);
             
       
        // Allow privileged access to read properties. Requires PropertiesPermission read in
        // security policy.
        try {
            AccessController.doPrivileged(new PrivilegedExceptionAction<Object>() {
                public Object run() throws AxisFault {
                    operationClient.execute(true);
                    return null;
                }
            });
        } catch (PrivilegedActionException e) {
            operationClient.complete(requestMC);
            throw (AxisFault)e.getException();
        }

        MessageContext responseMC = operationClient.getMessageContext("In");
        bindingContext.setAxisInMessageContext(responseMC);
               
        OMElement response = responseMC.getEnvelope().getBody().getFirstElement();

        // FIXME: [rfeng] We have to pay performance penalty to build the complete OM as the operationClient.complete() will
        // release the underlying HTTP connection.
View Full Code Here

        String callbackAddress = null;

        // create a message object and set the args as its body
        Message msg = messageFactory.createMessage();
        msg.setOperation(operation);
        WSAxis2BindingContext bindingContext = new WSAxis2BindingContext();
        bindingContext.setAxisInMessageContext(inMC);
        bindingContext.setAxisOutMessageContext(outMC); //TUSCANY-3881
        msg.setBindingContext(bindingContext);

       
        if (wsBinding.isRpcLiteral()){              
            // remove the wrapping element containing
View Full Code Here

        return response;
    }
   
    protected Object invokeTargetOneWay(Message msg) throws AxisFault {
        WSAxis2BindingContext bindingContext = msg.getBindingContext();
        OperationClient operationClient = bindingContext.getAxisOperationClient();

        // ensure connections are tracked so that they can be closed by the reference binding
        MessageContext requestMC = operationClient.getMessageContext("Out");
        //requestMC.getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);
        Options opt = requestMC.getOptions();
View Full Code Here

        }
    }

    public Message invoke(Message msg) {
       
        WSAxis2BindingContext bindingContext = msg.getBindingContext();       
        MessageContext messageContext = bindingContext.getAxisInMessageContext();
       
        Map httpHeaderProperties = (Map)messageContext.getProperty(org.apache.axis2.context.MessageContext.TRANSPORT_HEADERS);
       
        String basicAuthString = (String)httpHeaderProperties.get("Authorization");
        String decodedBasicAuthString = null;
View Full Code Here

       
        Message response =  getNext().invoke(msg);
         
        // set up the response envelope here before we return back through the binding chain
        // so that this is symetrical with how the outgoing reference binding chain behaves
        WSAxis2BindingContext bindingContext = msg.getBindingContext();
        MessageContext responseMC = bindingContext.getAxisOutMessageContext();
       
        if(!response.isFault()) {
            OMElement responseOM = response.getBody();
           
            if (wsBinding.isRpcLiteral()){              
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.binding.ws.axis2.policy.configurator.Axis2BindingBasicAuthenticationConfigurator

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.