Package org.apache.axis2.client

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


        }

        //Set the action
        client.getOptions().setAction(action);
        client.getOptions().setTo(new EndpointReference(issuerAddress));
        client.engageModule("rampart");
        return client;
    }

    /**
     * @param result
View Full Code Here


            ConfigurationContext configContext = ConfigurationContextFactory.
                        createConfigurationContextFromFileSystem(repo, null);
            ServiceClient serviceClient = new ServiceClient(configContext, null);
           

            serviceClient.engageModule("addressing");
            serviceClient.engageModule("rampart");

            //TODO : figure this out !!
            boolean basic256Supported = true;
           
View Full Code Here

                        createConfigurationContextFromFileSystem(repo, null);
            ServiceClient serviceClient = new ServiceClient(configContext, null);
           

            serviceClient.engageModule("addressing");
            serviceClient.engageModule("rampart");

            //TODO : figure this out !!
            boolean basic256Supported = true;
           
            if(basic256Supported) {
View Full Code Here

//    clientOptions.setProperty(SandeshaClient.RM_SPEC_VERSION,Sandesha2Constants.SPEC_VERSIONS.v1_1);  //uncomment this to send the messages according to the v1_1 spec.
//    clientOptions.setProperty(AddressingConstants.WS_ADDRESSING_VERSION,AddressingConstants.Submission.WSA_NAMESPACE);
   
    clientOptions.setProperty(SandeshaClientConstants.SANDESHA_LISTENER, new SandeshaListenerImpl ());
    ServiceClient serviceClient = new ServiceClient (configContext,null);
    serviceClient.engageModule(new QName ("sandesha2"));
   
    clientOptions.setAction("urn:wsrm:Ping");
    serviceClient.setOptions(clientOptions);
   
    clientOptions.setProperty(SandeshaClientConstants.LAST_MESSAGE, "true");
View Full Code Here

    clientOptions.setAction("urn:wsrm:EchoString");
   
    clientOptions.setProperty(Constants.Configuration.USE_CUSTOM_LISTENER, Boolean.TRUE);
    clientOptions.setProperty(SandeshaClientConstants.RM_SPEC_VERSION, Sandesha2Constants.SPEC_VERSIONS.v1_0);
   
    serviceClient.engageModule(new QName ("sandesha2"));
   
    //You must set the following two properties in the request-reply case.
    clientOptions.setTransportInProtocol(Constants.TRANSPORT_HTTP);

    //This asks Axis2 not to start a listner.
View Full Code Here

        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

        options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);

        ServiceClient sender = new ServiceClient();
        sender.engageModule(new QName(Constants.MODULE_ADDRESSING));
        sender.setOptions(options);
        OMElement result = sender.sendReceive(getPayload());

        try {
            XMLStreamWriter writer = XMLOutputFactory.newInstance()
View Full Code Here

            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
            options.setUseSeparateListener(true);

            //Blocking Invocation
            ServiceClient sender = new ServiceClient();
            sender.engageModule(new QName(Constants.MODULE_ADDRESSING));
            sender.setOptions(options);
            OMElement result = sender.sendReceive(payload);

            StringWriter writer = new StringWriter();
            result.serialize(XMLOutputFactory.newInstance()
View Full Code Here

        Options options = new Options();
        options.setTo(new EndpointReference(toEpr));
        options.setTransportInProtocol(Constants.TRANSPORT_TCP);

        ServiceClient sender = new ServiceClient();
        sender.engageModule(new QName(Constants.MODULE_ADDRESSING));
        sender.setOptions(options);
        OMElement result = sender.sendReceive(getPayload());

        try {
            XMLStreamWriter writer = XMLOutputFactory.newInstance()
View Full Code Here

        //then modify the axis2.xml that is generating there according to
        //phases that being included in the "module.xml"
        ConfigurationContext configContext = new ConfigurationContextFactory().
                createConfigurationContextFromFileSystem(repository.getAbsolutePath());
        ServiceClient serviceClient = new ServiceClient(configContext, null);
        serviceClient.engageModule(new QName("LoggingModule"));
//        call.engageModule(new QName("LoggingModule"));
    }
}

View Full Code Here

            client.getServiceContext().setProperty(RAMPART_POLICY, issuerPolicy);
            client.getOptions().setSoapVersionURI(this.soapVersion);
            if(this.addressingNs != null) {
                client.getOptions().setProperty(AddressingConstants.WS_ADDRESSING_VERSION, this.addressingNs);
            }
            client.engageModule("addressing");
            client.engageModule("rampart");

            //Process the STS and service policy policy
            this.processPolicy(issuerPolicy, servicePolicy);
           
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.