Examples of engageModule()


Examples of org.apache.axis2.client.Call.engageModule()

  private void run () throws AxisFault {
    Call call = new Call(AXIS2_CLIENT_PATH);
    Options clientOptions = new Options ();
    call.setClientOptions(clientOptions);
   
    call.engageModule(new QName("sandesha"));
    clientOptions.setProperty(ClientAPI.AcksTo,"http://www-lk.wso2.com:9080/axis2/services/AnonymousService/echoString"); //Optional
   
    clientOptions.setTo(new EndpointReference(to));
    clientOptions.setProperty(MessageContextConstants.TRANSPORT_URL,transportTo);
    clientOptions.setProperty(ClientAPI.OFFERED_SEQUENCE_ID,SandeshaUtil.getUUID())//Optional
View Full Code Here

Examples of org.apache.axis2.client.MessageSender.engageModule()

    Options clientOptions = new Options ();
    clientOptions.setProperty(Options.COPY_PROPERTIES,new Boolean (true));
    sender.setClientOptions(clientOptions);
    clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
    clientOptions.setProperty(Sandesha2ClientAPI.AcksTo,acksToEPR);
    sender.engageModule(new QName ("Sandesha2-0.9"));
    clientOptions.setTo(new EndpointReference(toEPR));
    clientOptions.setProperty(Sandesha2ClientAPI.SEQUENCE_KEY,"sequence1");
    sender.send("ping",getPingOMBlock("ping1"));
    sender.send("ping",getPingOMBlock("ping2"));
    clientOptions.setProperty(Sandesha2ClientAPI.LAST_MESSAGE, "true");
View Full Code Here

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

        OMElement topicOm = factory.createOMElement("Topic", nsaip);
        factory.createOMText(topicOm, topic);

        // set addressing, transport and proxy url

        serviceClient.engageModule("addressing");
        options.setTo(new EndpointReference(addUrl));
        options.setAction(action);
        options.setProperty(MessageContext.TRANSPORT_NON_BLOCKING,
                Boolean.FALSE); // set for fire and foget
        serviceClient.setOptions(options);
View Full Code Here

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

        } else if ("quote".equals(mode) || "dualquote".equals(mode)) {
            payload = StockQuoteHandler.createStandardQuoteRequest(
                    symbol, Integer.parseInt(itr));
            options.setAction("urn:getQuote");
            if ("dualquote".equals(mode)) {
                serviceClient.engageModule("addressing");
                options.setUseSeparateListener(true);
            }
        }

        // set addressing, transport and proxy url
View Full Code Here

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

            }
        }

        // set addressing, transport and proxy url
        if (addUrl != null && !"null".equals(addUrl)) {
            serviceClient.engageModule("addressing");
            options.setTo(new EndpointReference(addUrl));
        }
        if (trpUrl != null && !"null".equals(trpUrl)) {
            options.setProperty(Constants.Configuration.TRANSPORT_URL, trpUrl);
        }
View Full Code Here

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

        }

        // apply any service policies if any
        if (svcPolicy != null && !"null".equals(svcPolicy) && svcPolicy.length() > 0) {
            System.out.println("Using WS-Security");
            serviceClient.engageModule("addressing");
            serviceClient.engageModule("rampart");
            options.setProperty(
                    RampartMessageData.KEY_RAMPART_POLICY, loadPolicy(svcPolicy));
        }
View Full Code Here

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

        // apply any service policies if any
        if (svcPolicy != null && !"null".equals(svcPolicy) && svcPolicy.length() > 0) {
            System.out.println("Using WS-Security");
            serviceClient.engageModule("addressing");
            serviceClient.engageModule("rampart");
            options.setProperty(
                    RampartMessageData.KEY_RAMPART_POLICY, loadPolicy(svcPolicy));
        }

        if (Boolean.parseBoolean(rest)) {
View Full Code Here

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

            System.out.println("Sending as REST");
            options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);
        }
        if (Boolean.parseBoolean(wsrm) || Boolean.parseBoolean(wsrm11)) {
            System.out.println("Using WS-RM");
            serviceClient.engageModule("sandesha2");
            if (Boolean.parseBoolean(wsrm11)){
               options.setProperty(SandeshaClientConstants.RM_SPEC_VERSION, Sandesha2Constants.SPEC_VERSIONS.v1_1);
            }
            options.setProperty(SandeshaClientConstants.LAST_MESSAGE, Constants.VALUE_TRUE);
            options.setProperty(SandeshaClientConstants.OFFERED_SEQUENCE_ID, UIDGenerator.generateURNString());
View Full Code Here

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

        options.setAction("urn:echo");
        options.setTo(new EndpointReference(args[0]));
        options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,  loadPolicy(args[2]));
        client.setOptions(options);
       
        client.engageModule("addressing");
        client.engageModule("rampart");

        OMElement response = client.sendReceive(getPayload("Hello world"));
       
        System.out.println(response);
View Full Code Here

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

        options.setTo(new EndpointReference(args[0]));
        options.setProperty(RampartMessageData.KEY_RAMPART_POLICY,  loadPolicy(args[2]));
        client.setOptions(options);
       
        client.engageModule("addressing");
        client.engageModule("rampart");

        OMElement response = client.sendReceive(getPayload("Hello world"));
       
        System.out.println(response);
       
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.