Package org.apache.axis2.client

Examples of org.apache.axis2.client.ServiceClient.createClient()


            options.setProperty(Constants.Configuration.FILE_SIZE_THRESHOLD, ("" + cacheThreshold));
        }

        ServiceClient sender = new ServiceClient(null, null);
        sender.setOptions(options);
        OperationClient mepClient = sender.createClient(ServiceClient.ANON_OUT_IN_OP);

        MessageContext mc = createMessageContextForSwA(folderName, "sendReceiveUsingSwA");
        mepClient.addMessageContext(mc);
        mepClient.execute(true);
        MessageContext response = mepClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
View Full Code Here


                //factory.createConfigurationContextFromFileSystem("target/test-resources/integrationRepo", null);
                ConfigurationContextFactory.createConfigurationContextFromFileSystem(
                        "itest-resources/integrationRepo", null);
        ServiceClient serviceClient = new ServiceClient(configContext, null);
        serviceClient.setOptions(options);
        OperationClient opClient = serviceClient.createClient(ServiceClient.ANON_OUT_IN_OP);
        opClient.addMessageContext(messageContext);
        opClient.execute(true);
        MessageContext responseMCtx =
                opClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
View Full Code Here

        .createConfigurationContextFromFileSystem("../../repository",
            null);

    ServiceClient sender = new ServiceClient(configContext, null);
    sender.setOptions(options);
    OperationClient mepClient = sender
        .createClient(ServiceClient.ANON_OUT_IN_OP);

    MessageContext mc = new MessageContext();
    FileDataSource fileDataSource = new FileDataSource(file);
View Full Code Here

        // initialize the Sender
        ServiceClient serviceClient;
        OperationClient opClient;
        try {
            serviceClient = new ServiceClient(configurationContext, null);
            opClient = serviceClient.createClient(ServiceClient.ANON_OUT_IN_OP);
        } catch (AxisFault e) {
            throw new SOAPException(e);
        }

        options.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING,
View Full Code Here

                options.setAction("urn:" + opStr);
                MessageContext requetMessageContext = new MessageContext();
                requetMessageContext.setEnvelope(getRequestEnvelope(opStr, param1, param2,
                        serviceGroupContextId));

                OperationClient opClient = serviceClient.createClient(ServiceClient.ANON_OUT_IN_OP);
                opClient.addMessageContext(requetMessageContext);
                opClient.setOptions(options);

                opClient.execute(true);
View Full Code Here

                serviceClient.setOptions(options);
                MessageContext requetMessageContext = new MessageContext();
                requetMessageContext.setEnvelope(getPreviousRequestEnvelope(opStr, param,
                        serviceGroupContextId));

                OperationClient opClient = serviceClient.createClient(ServiceClient.ANON_OUT_IN_OP);
                opClient.addMessageContext(requetMessageContext);
                opClient.setOptions(options);

                opClient.execute(true);
View Full Code Here

                ConfigurationContextFactory.createConfigurationContextFromFileSystem(
                        TestingUtils.prefixBaseDirectory("target/test-resources/integrationRepo"), null);

        ServiceClient sender = new ServiceClient(configContext, null);
        sender.setOptions(options);
        OperationClient mepClient = sender.createClient(ServiceClient.ANON_OUT_IN_OP);

        MessageContext mc = new MessageContext();
        mc.setEnvelope(createEnvelope());
        FileDataSource fileDataSource = new FileDataSource(TestingUtils.prefixBaseDirectory("test-resources/mtom/test.jpg"));
        DataHandler dataHandler = new DataHandler(fileDataSource);
View Full Code Here

        // initialize the Sender
        ServiceClient serviceClient;
        OperationClient opClient;
        try {
            serviceClient = new ServiceClient(configurationContext, null);
            opClient = serviceClient.createClient(ServiceClient.ANON_OUT_IN_OP);
        } catch (AxisFault e) {
            throw new SOAPException(e);
        }

        options.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING,
View Full Code Here

        options.setTo(targetEPR);
        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
        options.setExceptionToBeThrownOnSOAPFault(false);
        MessageContext msgctx = new MessageContext();
        msgctx.setEnvelope(inEnvelope);
        OperationClient opClient = client.createClient(ServiceClient.ANON_OUT_IN_OP);
        opClient.addMessageContext(msgctx);
        opClient.execute(true);
        return opClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE).getEnvelope();
    }
View Full Code Here

            if (__log.isDebugEnabled()) {
                __log.debug("Axis2 sending message to " + axisEPR.getAddress() + " using MEX " + odeMex);
                __log.debug("Message: " + soapEnv);
            }

            final OperationClient operationClient = client.createClient(isTwoWay ? ServiceClient.ANON_OUT_IN_OP
                    : ServiceClient.ANON_OUT_ONLY_OP);
            operationClient.addMessageContext(mctx);
            // this Options can be alter without impacting the ServiceClient options (which is a requirement)
            Options operationOptions = operationClient.getOptions();
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.