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


        myConfigContext.getAxisConfiguration().getModules();

        ServiceClient serviceClient = new ServiceClient(myConfigContext, null);
        Options opts = new Options();
        serviceClient.engageModule("addressing");




        UnifiedEndpointFactory uepFactory = new UnifiedEndpointFactory();
View Full Code Here

            stub = new RelyingPartyServiceStub(configCtx, serviceURL);
            ServiceClient client = stub._getServiceClient();
            // Engage rampart as we are going to sign requests to Relying Party
            // Service
            client.engageModule("rampart");
            // Get a RampartConfig with default crypto information
            Policy rampartConfig = IdentityBaseUtil.getDefaultRampartConfig();
            Policy signOnly = IdentityBaseUtil.getSignOnlyPolicy();
            Policy mergedPolicy = signOnly.merge(rampartConfig);
            // Attach the RampartConfig policy to the client, rest of the
View Full Code Here

    }

    public ProfileHistory[] getProfileHistory() throws Exception {
        try {
            ServiceClient client = provAdminStub._getServiceClient();
            client.engageModule("addressing"); // IMPORTANT
            Options options = client.getOptions();
            options.setUseSeparateListener(true);
            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
            provAdminStub.startgetProfileHistory(callback);
            handleCallback();
View Full Code Here

    }

    public void removeAllFeaturesWithProperty(String key, String value) throws Exception {
        try {
            ServiceClient client = provAdminStub._getServiceClient();
            client.engageModule("addressing"); // IMPORTANT
            Options options = client.getOptions();
            options.setUseSeparateListener(true);
            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

            if ("org.wso2.carbon.p2.category.type".equals(key) && "server".equalsIgnoreCase(value)) {
View Full Code Here

            }
        }

        try {
            ServiceClient client = repositoryAdminServiceStub._getServiceClient();
            client.engageModule("addressing"); // IMPORTANT
            Options options = client.getOptions();
            options.setUseSeparateListener(true);
            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
            repositoryAdminServiceStub.startaddRepository(repoURL, nickName, callback);
            handleCallback();
View Full Code Here

    }

    public void performInstallation(String actionType) throws Exception {
        try {
            ServiceClient client = provAdminStub._getServiceClient();
            client.engageModule("addressing"); // IMPORTANT
            Options options = client.getOptions();
            options.setUseSeparateListener(true);
            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
            provAdminStub.startperformProvisioningAction(actionType, callback);
            handleCallback();
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));
                    options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);
                    if (endpoint.toLowerCase().startsWith("mailto:")) {
                        Map headerMap = new HashMap();
                        String topicText = topicEle.getText();
View Full Code Here

    Options options = client.getOptions();
    options.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
    options.setUserName("admin");
    options.setPassword("admin");

    client.engageModule("rampart");
  }

  public Resource newResource() {
    return new ResourceImpl();
  }
View Full Code Here

        }

        if (metaDataFile != null) {
            payLoad = loadXMLAsElement(metaDataFile);
            if (addUrl != null && !"null".equals(addUrl)) {
                serviceClient.engageModule("addressing");
                option.setTo(new EndpointReference(addUrl));
            }
            if (trpUrl != null && !"null".equals(trpUrl)) {
                option.setProperty(Constants.Configuration.TRANSPORT_URL, trpUrl);
            }
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.