Examples of WSAxis2BindingContext


Examples of org.apache.tuscany.sca.binding.ws.axis2.context.WSAxis2BindingContext

        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

Examples of org.apache.tuscany.sca.binding.ws.axis2.context.WSAxis2BindingContext

    }
  
    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

Examples of org.apache.tuscany.sca.binding.ws.axis2.context.WSAxis2BindingContext

        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

Examples of org.apache.tuscany.sca.binding.ws.axis2.context.WSAxis2BindingContext

        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

Examples of org.apache.tuscany.sca.binding.ws.axis2.context.WSAxis2BindingContext

        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

Examples of org.apache.tuscany.sca.binding.ws.axis2.context.WSAxis2BindingContext

        }
    }

    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

Examples of org.apache.tuscany.sca.binding.ws.axis2.context.WSAxis2BindingContext

       
        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

Examples of org.apache.tuscany.sca.binding.ws.axis2.context.WSAxis2BindingContext

        }
    }

    public Message invoke(Message msg) {
       
        WSAxis2BindingContext bindingContext = msg.getBindingContext();
        OperationClient operationClient = bindingContext.getAxisOperationClient();
       
        String username = null;
        String password = null;
       
        // get the security context
View Full Code Here

Examples of org.apache.tuscany.sca.binding.ws.axis2.context.WSAxis2BindingContext

    }
  
    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

Examples of org.apache.tuscany.sca.binding.ws.axis2.context.WSAxis2BindingContext

        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
TOP
Copyright © 2018 www.massapi.com. 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.