Package org.apache.axis2.client

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


      System.out.println("ERROR: Please set the directory you unzipped Sandesha2 as the first option.");
      return;
    }
   
    Call call = new Call(AXIS2_CLIENT_PATH);
    call.engageModule(new QName("Sandesha2-0.9"));
    Options clientOptions = new Options ();
    clientOptions.setProperty(Options.COPY_PROPERTIES,new Boolean (true));
    call.setClientOptions(clientOptions);
   
    //You must set the following two properties in the request-reply case.
View Full Code Here

      System.out.println("ERROR: Please change <SANDESHA2_HOME> to your Sandesha2 installation directory.");
      return;
    }
   
    Call call = new Call(AXIS2_CLIENT_PATH);
    call.engageModule(new QName("Sandesha2-0.9"));
    Options clientOptions = new Options ();
    clientOptions.setProperty(Options.COPY_PROPERTIES,new Boolean (true));
    clientOptions.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
    call.setClientOptions(clientOptions);
   
View Full Code Here

        method.addChild(value);

        Call call =
                new Call(
                serviceContext);
        call.engageModule(new QName(Constants.MODULE_ADDRESSING));

        try {
            Options options = new Options();
            options.setTo(targetEPR);
            options.setTransportInfo(Constants.TRANSPORT_HTTP,
View Full Code Here

            call.setClientOptions(options);
            options.setTo(targetEPR);

            //The boolean flag informs the axis2 engine to use two separate transport connection
            //to retrieve the response.
            call.engageModule(new QName(Constants.MODULE_ADDRESSING));
            options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
            options.setUseSeparateListener(true);

            //Blocking Invocation
            OMElement result = call.invokeBlocking("echo",
View Full Code Here

        }
        //copy the LoggingModule.mar to "modules" folder.
        //then modify the axis2.xml that is generating there according to
        //phases that being included in the "module.xml"
        Call call = new Call(repository.getAbsolutePath());
        call.engageModule(new QName("LoggingModule"));
    }
}

View Full Code Here

        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

        } 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

            }
        }

        // 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

        }

        // 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

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.