Package org.apache.axis2.client

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


        ConfigurationContext configContext = ConfigurationContextFactory.
                createConfigurationContextFromFileSystem(repository, null);
        ServiceClient serviceClient = new ServiceClient(configContext, null);
        serviceClient.getOptions().setTimeOutInMilliSeconds(3*60*1000);

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

        return serviceClient;

    }
View Full Code Here


                createConfigurationContextFromFileSystem(repository, null);
        ServiceClient serviceClient = new ServiceClient(configContext, null);
        serviceClient.getOptions().setTimeOutInMilliSeconds(3*60*1000);

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

        return serviceClient;

    }

View Full Code Here

        // is used by the implementations that extend the behavior of the default Carbon Event
        // Dispatcher.
        ServiceClient serviceClient;
        if (configContext != null) {
            serviceClient = new ServiceClient(configContext, null);
            serviceClient.engageModule("addressing");
        } else {
            serviceClient = new ServiceClient();
        }
        Options options = new Options();
        options.setTo(new EndpointReference(endpoint));
View Full Code Here

            }
        }
        // If we have the policy, use it.
        if (policy != null) {
            options.setProperty("rampartPolicy", policy);
            serviceClient.engageModule("rampart");
        }
        //options.setProperty(MessageContext.CLIENT_API_NON_BLOCKING, Boolean.TRUE);
        options.setAction(EventingConstants.WSE_PUBLISH);
        serviceClient.setOptions(options);
        serviceClient.addHeader(topic);
View Full Code Here

            serviceClient.getOptions().setAction(DiscoveryConstants.WS_DISCOVERY_HELLO_ACTION);
        } else {
            serviceClient.getOptions().setAction(DiscoveryConstants.WS_DISCOVERY_BYE_ACTION);
        }

        serviceClient.engageModule("addressing");

        Registry registry = (Registry)SuperTenantCarbonContext.getCurrentContext(axisConf).getRegistry(
                RegistryType.SYSTEM_CONFIGURATION);
        Policy policy = DiscoveryMgtUtils.getClientSecurityPolicy(registry);
        if (policy != null) {
View Full Code Here

        Registry registry = (Registry)SuperTenantCarbonContext.getCurrentContext(axisConf).getRegistry(
                RegistryType.SYSTEM_CONFIGURATION);
        Policy policy = DiscoveryMgtUtils.getClientSecurityPolicy(registry);
        if (policy != null) {
            serviceClient.engageModule("rampart");
            serviceClient.getOptions().setProperty(
                    RampartMessageData.KEY_RAMPART_POLICY, policy);
        }

        return serviceClient;
View Full Code Here

        AxisService axisService = serviceClient.getAxisService();
        AxisOperation axisOperation = axisService.getOperation(new QName(operation));
        axisOperation.getMessage("Out").getPolicySubject().attachPolicy(loadPolicy());

        try {
            serviceClient.engageModule("rampart");
        } catch (AxisFault e) {
            String msg = "Cannot engage Rampart module";
            log.error(msg, e);
            throw new EC2Exception(msg, e);
        }
View Full Code Here

            serviceClient = new ServiceClient(configContext, null);
        } else {
            serviceClient = new ServiceClient();
        }
        Options options = new Options();
        serviceClient.engageModule("addressing");
        options.setTo(new EndpointReference(endpoint));
        // Try obtaining the policy if we don't have it.
        if (policy == null) {
            if (this.notificationManager != null) {
                String policyPath = this.notificationManager.getPropertyValue("securityPolicy");
View Full Code Here

            }
        }
        // If we have the policy, use it.
        if (policy != null) {
            options.setProperty("rampartPolicy", policy);
            serviceClient.engageModule("rampart");
        }
        options.setProperty(MessageContext.CLIENT_API_NON_BLOCKING, Boolean.TRUE);
        options.setAction(EventingConstants.WSE_PUBLISH);
        serviceClient.setOptions(options);
        serviceClient.addHeader(topic);
View Full Code Here

        if (trpUrl != null && !"null".equals(trpUrl)) {
            opts.setProperty(Constants.Configuration.TRANSPORT_URL, trpUrl);
        }

        if (addUrl != null && !"null".equals(addUrl)) {
            serviceclient.engageModule("addressing");
            opts.setTo(new EndpointReference(addUrl));
        }

        opts.setAction("urn:getQuote");
        serviceclient.setOptions(opts);
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.