Package org.apache.axis2.client

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


                options.setAction("urn:" + opStr);
                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


        .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

                clientOptions.setProperty(
                    org.apache.synapse.config.xml.Constants.RAMPART_POLICY,
                    getPolicy(synapseOutMessageContext, wsSecPolicyKey));
            }
        }
        OperationClient mepClient = axisAnonymousOperation.createClient(
            serviceCtx, clientOptions);
        mepClient.addMessageContext(axisOutMsgCtx);

        if (clientOptions.isUseSeparateListener()) {
            mepClient.setCallback(new AsyncCallback(synapseOutMessageContext));
View Full Code Here

                    OMAbstractFactory.getSOAP11Factory() : OMAbstractFactory.getSOAP12Factory();
                fac.createSOAPHeader(axisOutMsgCtx.getEnvelope());
            }
        }

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

        if (!outOnlyMessage) {
View Full Code Here

        String key;
        for (Object o : options.getProperties().keySet()) {
            key = (String)o;
            serviceContext.setProperty(key, options.getProperties().get(key));
        }
        OperationClient operationClient = axisOperation.createClient(serviceContext, options);

        // if overide options have been set, that means we need to make sure
        // those options override the options of even the operation client. So,
        // what we do is switch the parents around to make that work.
        if (overrideOptions != null) {
View Full Code Here

        Options clientOptions = cloneOptions(msgCtx.getOptions());
        clientOptions.setExceptionToBeThrownOnSOAPFault(false);
        /* This value doesn't overrideend point config. */
        clientOptions.setTimeOutInMilliSeconds(60000);

        return axisAnonymousOperation.createClient(serviceCtx, clientOptions);
    }

    private Policy loadPolicy(String fileName, String basePath) {
        Policy policyDoc = null;
        FileLoadingUtil fileLoader = new FileLoadingUtil(basePath);
View Full Code Here

        Options clientOptions = HumanServiceUtil.cloneOptions(msgCtx.getOptions());
        clientOptions.setExceptionToBeThrownOnSOAPFault(false);
        /* This value doesn't overrideend point config. */
        clientOptions.setTimeOutInMilliSeconds(60000);

        OperationClient mepClient = axisAnonymousOperation.createClient(serviceCtx, clientOptions);

        return mepClient;
    }

    private Policy loadPolicy(String fileName, String basePath) {
View Full Code Here

        String key;
        for (Iterator iter = options.getProperties().keySet().iterator();iter.hasNext();){
            key = (String) iter.next();
            serviceContext.setProperty(key, options.getProperties().get(key));
        }
        OperationClient operationClient = axisOperation.createClient(serviceContext, options);

        // if overide options have been set, that means we need to make sure
        // those options override the options of even the operation client. So,
        // what we do is switch the parents around to make that work.
        if (overrideOptions != null) {
View Full Code Here

                SOAPFactory fac = axisOutMsgCtx.isSOAP11() ?
                    OMAbstractFactory.getSOAP11Factory() : OMAbstractFactory.getSOAP12Factory();
                fac.createSOAPHeader(axisOutMsgCtx.getEnvelope());
            }
        }
        OperationClient mepClient = axisAnonymousOperation.createClient(
            serviceCtx, clientOptions);
        mepClient.addMessageContext(axisOutMsgCtx);
        axisOutMsgCtx.setAxisMessage(
            axisAnonymousOperation.getMessage(WSDLConstants.MESSAGE_LABEL_OUT_VALUE));
View Full Code Here

    public OperationClient createClient(QName operation) throws AxisFault {
        AxisOperation axisOp = axisService.getOperation(operation);
        if (axisOp == null) {
            throw new AxisFault("Operation '" + operation + "' not found");
        }
        return axisOp.createClient(serviceContext, options);
    }

    /**
     * This will close the out put stream or , and remove entry from waiting
     * queue of the transport Listener queue
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.