Package xsul.xwsif_runtime

Examples of xsul.xwsif_runtime.WSIFClient


//      WSIFService service = WSIFServiceFactory.newInstance().getService(
//          WSDLUtil.wsdlDefinitions5ToWsdlDefintions3(proxyWSDL) );
//            WSIFPort port = service.getPort();
//            WSIFClient wclient = WSIFRuntime.getDefault().newClientFor(port);
           
      WSIFClient wclient = WSIFRuntime.newClient(engineURL.toString())
          .addHandler(
              new StickySoapHeaderHandler("use-lead-header",
                  leadContext)).useAsyncMessaging(correlator)
          .setAsyncResponseTimeoutInMs(33000L); // to simplify testing
      // set to just few
      // seconds

      WSIFPort port = wclient.getPort();
      WSIFOperation operation = port.createOperation("deploy");

      WSIFMessage outputMessage = operation.createOutputMessage();
      WSIFMessage faultMessage = operation.createFaultMessage();
      XmlElement inputMessageElement = xmlObjectToEl(getDeploymentPayload(
View Full Code Here


    WSDLCleaner.cleanWSDL(streamEngine);

    WSIFService service = WSIFServiceFactory.newInstance().getService(
        WSDLUtil.wsdlDefinitions5ToWsdlDefintions3(streamEngine));
    WSIFPort port = service.getPort();
    WSIFClient client = WSIFRuntime.getDefault().newClientFor(port);

    String operationName = "registerQuery";
    WSIFOperation operation = port.createOperation(operationName);
    WSIFMessage inputMessage = operation.createInputMessage();
    WSIFMessage outputMessage = operation.createOutputMessage();
View Full Code Here

    WSIFServiceFactory factory = WSIFServiceFactory.newInstance();

    WSIFService service = factory.getService(WSDLUtil
        .wsdlDefinitions5ToWsdlDefintions3(streamEngine));
    WSIFClient client = WSIFRuntime.getDefault()
        .newClientFor(service, null);
    WSIFPort port = client.getPort();
    String operationName = "registerQuery";
    WSIFOperation operation = port.createOperation(operationName);
    WSIFMessage inputMessage = operation.createInputMessage();
    WSIFMessage outputMessage = operation.createOutputMessage();
    WSIFMessage faultMessage = operation.createFaultMessage();
View Full Code Here

      correlator = null;

      // pass some headers
      LeadContextHeader leadContext = getLeadContextHeader();

      WSIFClient wclient = WSIFRuntime.newClient(engineURL.toString())
          .addHandler(
              new StickySoapHeaderHandler("use-lead-header",
                  leadContext)).useAsyncMessaging(correlator)
          .setAsyncResponseTimeoutInMs(33000L); // to simplify testing
      // set to just few
      // seconds

      WSIFPort port = wclient.getPort();
      WSIFOperation operation = port.createOperation("createInstance");

      WSIFMessage outputMessage = operation.createOutputMessage();
      WSIFMessage faultMessage = operation.createFaultMessage();
View Full Code Here

            Map<String, String> outputMap, MonitorNotifier notifier) {

        WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
        WSIFService service = factory.getService(WSDLUtil
                .wsdlDefinitions5ToWsdlDefintions3(definitions));
        WSIFClient client = WSIFRuntime.getDefault()
                .newClientFor(service, null);
        WSIFPort port = client.getPort();
        WSIFOperation operation = port.createOperation(operationName);
        WSIFMessage inputMessage = operation.createInputMessage();

        for (String key : inputMap.keySet()) {
            String value = inputMap.get(key);
View Full Code Here

    LeadContextHeader leadContextHeader = new LeadContextHeader("NEI", dn);
    leadContextHeader.setUserDn(dn);
    StickySoapHeaderHandler soapHeaderHandler = new StickySoapHeaderHandler(
        "use-lead-header", leadContextHeader);

    WSIFClient wcl = XmlBeansWSIFRuntime.newClient(wsdlLoc);
    wcl.addHandler(soapHeaderHandler);

    AgentPortType stub = (AgentPortType) wcl
        .generateDynamicStub(AgentPortType.class);

    return stub;

  }
View Full Code Here

   
   
   
    public static WSIFClient createWSIFClient(ApplicationGlobalContext globalConfiguration,
            String serviceURL,GSSCredential sessionCredentail) throws GfacException {
        WSIFClient client;
        if (serviceURL.startsWith("https")) {
            SoapHttpDynamicInfosetInvoker invoker = createSecureInvoker(globalConfiguration);
            String wsdlAsStr = invoker.invokeHttpGet(serviceURL);
            // System.out.println(wsdlAsStr);
            XmlElement el = XmlConstants.BUILDER
                    .parseFragmentFromReader(new StringReader(wsdlAsStr));
            WsdlDefinitions def = new WsdlDefinitions(el);
            WSIFServiceFactory wsf = WSIFServiceFactory.newInstance();
            WSIFService serv = wsf.getService(def);
            serv.addLocalProvider(new Provider(invoker));
            client = XmlBeansWSIFRuntime.getDefault().newClientFor(serv.getPort());
            ((XsulSoapPort) client.getPort()).setInvoker(invoker);
        } else {
            client = XmlBeansWSIFRuntime.newClient(serviceURL);
        }
        return client;
    }
View Full Code Here

        }
    }
   
    public static WSIFClient createWSIFClient(GlobalContext globalConfiguration,
            String serviceURL) throws XregistryException {
        WSIFClient client;
        try {
            if (serviceURL.startsWith("https")) {
                boolean useHostKey = true;

                if (globalConfiguration == null) {
                    throw new XregistryException(
                            "To make Secure WSIF client Global configuration must nor be Null");
                }
                SoapHttpDynamicInfosetInvoker invoker = createSecureInvoker(globalConfiguration,
                        useHostKey);
                String wsdlAsStr = invoker.invokeHttpGet(serviceURL);
                // System.out.println(wsdlAsStr);
                XmlElement el = XmlConstants.BUILDER
                        .parseFragmentFromReader(new StringReader(wsdlAsStr));
                WsdlDefinitions def = new WsdlDefinitions(el);
               
               
                WSIFServiceFactory wsf = WSIFServiceFactory.newInstance();
                WSIFService serv = wsf.getService(def);
                serv.addLocalProvider(new Provider(invoker));
                client = XmlBeansWSIFRuntime.getDefault().newClientFor(serv.getPort());
                ((XsulSoapPort) client.getPort()).setInvoker(invoker);
               
               
               
//                WsdlResolver wsdlResolver = WsdlResolver.getInstance();
//                wsdlResolver.setSecureInvoker(invoker);
View Full Code Here

      GlobalContext globalContext = new GlobalContext(true);
       String trustedCA = System.getProperty("ssl.hostcertsKeyFile");
      String hostCert =  System.getProperty("ssl.trustedCertsFile");
    globalContext.setTrustedCertsFile(trustedCA);
    globalContext.setHostcertsKeyFile(hostCert);
      WSIFClient client = Utils.createWSIFClient(globalContext, registryServiceWsdlUrl);
        proxy = (XregistryPortType)client.generateDynamicStub(XregistryPortType.class);
        userDN = globalContext.getUserDN();
        System.out.println("Create Stub for "+ registryServiceWsdlUrl + " using "+ userDN);
    }
View Full Code Here

        proxy = (XregistryPortType)client.generateDynamicStub(XregistryPortType.class);
        userDN = globalContext.getUserDN();
        System.out.println("Create Stub for "+ registryServiceWsdlUrl + " using "+ userDN);
    }
    public DocumentRegistryClient(GlobalContext context,String registryServiceWsdlUrl) throws XregistryException{
        WSIFClient client = Utils.createWSIFClient(context, registryServiceWsdlUrl);
        proxy = (XregistryPortType)client.generateDynamicStub(XregistryPortType.class);
        userDN = context.getUserDN();
        System.out.println("Create Stub for "+ registryServiceWsdlUrl + " using "+ userDN);
    }
View Full Code Here

TOP

Related Classes of xsul.xwsif_runtime.WSIFClient

Copyright © 2018 www.massapicom. 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.