Examples of addMessageContext()


Examples of org.apache.axis2.client.OperationClient.addMessageContext()

                fac.createSOAPHeader(axisOutMsgCtx.getEnvelope());
            }
        }

        OperationClient mepClient = axisAnonymousOperation.createClient(serviceCtx, clientOptions);
        mepClient.addMessageContext(axisOutMsgCtx);
        axisOutMsgCtx.setAxisMessage(
            axisAnonymousOperation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE));

        // set the SEND_TIMEOUT for transport sender
        if (endpoint != null && endpoint.getTimeoutDuration() > 0) {
View Full Code Here

Examples of org.apache.axis2.client.OperationClient.addMessageContext()

        requestContext.setEnvelope(envelope);

        ServiceClient sender = new ServiceClient(configContext, clientService);
        sender.setOptions(options);
        OperationClient opClient = sender.createClient(new QName("echoOMElement"));
        opClient.addMessageContext(requestContext);
        opClient.setOptions(options);
        opClient.execute(true);

        MessageContext response = opClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
        SOAPEnvelope env = response.getEnvelope();
View Full Code Here

Examples of org.apache.axis2.client.OperationClient.addMessageContext()

    private static MessageContext sendReceive(OMElement llomElement, ServiceClient serviceClient)
            throws AxisFault {
        MessageContext messageContext = new MessageContext();
        fillSOAPEnvelope(messageContext, llomElement, serviceClient);
        OperationClient operationClient = serviceClient.createClient(ServiceClient.ANON_OUT_IN_OP);
        operationClient.addMessageContext(messageContext);
        operationClient.execute(true);
        MessageContext response = operationClient
                .getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
        if (serviceClient.getOptions().isCallTransportCleanup()) {
            response.getEnvelope().build();
View Full Code Here

Examples of org.apache.axis2.client.OperationClient.addMessageContext()

               
        EndpointReference epr = new EndpointReference("http://127.0.0.1:6060/axis2/services/WSTransferSampleService");
        options.setTo(epr);
       
        MessageContext msgCtx = new MessageContext();
        opClient.addMessageContext(msgCtx);
       
        SOAPFactory factory = OMAbstractFactory.getSOAP12Factory();
        SOAPEnvelope env = factory.getDefaultEnvelope();
       
        Customer customer = new Customer();
View Full Code Here

Examples of org.apache.axis2.client.OperationClient.addMessageContext()

        options.setAction(WSTransferConstants.ACTION_URI_GET);
       
        env = factory.getDefaultEnvelope();
       
        msgCtx = new MessageContext();
        opClient.addMessageContext(msgCtx);
       
        env.getHeader().addChild(customerIdHeader);
        msgCtx.setEnvelope(env);
       
        opClient.execute(true);
View Full Code Here

Examples of org.apache.axis2.context.OperationContext.addMessageContext()

      // Link the response to the request

      AxisOperation operation = SpecSpecificConstants.getWSRMOperation(Sandesha2Constants.MessageTypes.POLL_RESPONSE_MESSAGE, pollMessage.getRMSpecVersion(), pollMessage.getMessageContext().getAxisService());
      OperationContext context = new OperationContext (operation, pollMessage.getMessageContext().getServiceContext());
     
      context.addMessageContext(returnMessage);
      returnMessage.setServiceContext(null);
      returnMessage.setOperationContext(context);
     
      returnMessage.setProperty(Sandesha2Constants.MAKE_CONNECTION_RESPONSE, Boolean.TRUE);
      returnMessage.setProperty(RequestResponseTransport.TRANSPORT_CONTROL, pollMessage.getProperty(RequestResponseTransport.TRANSPORT_CONTROL));
View Full Code Here

Examples of org.apache.axis2.context.OperationContext.addMessageContext()

      //The message created will basically be used as a outMessage, so setting the AxisMessage accordingly
      newMessageContext.setAxisMessage(operation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE));
     
      OperationContext operationContext = new OperationContext(operation, newMessageContext.getServiceContext());
      newMessageContext.setOperationContext(operationContext);
      operationContext.addMessageContext(newMessageContext);

      // adding a blank envelope
      SOAPFactory factory = SOAPAbstractFactory.getSOAPFactory(SandeshaUtil.getSOAPVersion(referenceMessage
          .getEnvelope()));
      newMessageContext.setEnvelope(factory.getDefaultEnvelope());
View Full Code Here

Examples of org.apache.axis2.context.OperationContext.addMessageContext()

    if(context == null) {
      AxisOperation oldOperation = returnMessage.getAxisOperation();

      context = ContextFactory.createOperationContext(oldOperation, returnMessage.getServiceContext()); //new OperationContext(oldOperation);

      context.addMessageContext(pollMessage.getMessageContext());
      pollMessage.getMessageContext().setOperationContext(context);
    }
    context.addMessageContext(returnMessage);
    returnMessage.setOperationContext(context);
   
View Full Code Here

Examples of org.apache.axis2.context.OperationContext.addMessageContext()

      context = ContextFactory.createOperationContext(oldOperation, returnMessage.getServiceContext()); //new OperationContext(oldOperation);

      context.addMessageContext(pollMessage.getMessageContext());
      pollMessage.getMessageContext().setOperationContext(context);
    }
    context.addMessageContext(returnMessage);
    returnMessage.setOperationContext(context);
   
    returnMessage.setProperty(Sandesha2Constants.MAKE_CONNECTION_RESPONSE, Boolean.TRUE);
    returnMessage.setProperty(RequestResponseTransport.TRANSPORT_CONTROL, pollMessage.getProperty(RequestResponseTransport.TRANSPORT_CONTROL));
   
View Full Code Here

Examples of org.apache.axis2.context.OperationContext.addMessageContext()

                    }
                    MessageUtils.putMessageOnMessageContext(responseMsgCtx.getMessage(),
                            axisResponseMsgCtx);

                    OperationContext opCtx = axisResponseMsgCtx.getOperationContext();
                    opCtx.addMessageContext(axisResponseMsgCtx);

                    // If this is a fault message, we want to throw it as an
                    // exception so that the transport can do the appropriate things
                    if (responseMsgCtx.getMessage().isFault()) {
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.