Package xsul.lead

Examples of xsul.lead.LeadContextHeader


            XmlElement leadHeader = soapHeader.element(LeadContextHeader.NS, LeadContextHeader.TYPE.getLocalPart());
            logger.info("leadHeader: " + XMLUtil.xmlElementToString(leadHeader));
            if (leadHeader == null) {
                return null;
            }
            LeadContextHeader leadContext = new LeadContextHeader(leadHeader);
            ServiceNotificationSender sender = new ServiceNotificationSender(soapFragrance, leadContext);
            sender.serviceInvoked(inputElement);

            return sender;
        } catch (RuntimeException e) {
View Full Code Here


        correlator = null;

        // pass some headers
        LeadContextHeaderHelper helper = new LeadContextHeaderHelper();
        helper.setXBayaConfiguration(new XBayaConfiguration());
        LeadContextHeader leadContext = helper.getLeadContextHeader();
        leadContext.setWorkflowId(URI.create("http://host/2005/11/09/workflowinstace"));
        leadContext.setNodeId("decoder1");
        leadContext.setTimeStep("5");
        leadContext.setServiceId("decoder-instance-10");

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

        correlator = null;

        // pass some headers
        LeadContextHeaderHelper helper = new LeadContextHeaderHelper();
        helper.setXBayaConfiguration(new XBayaConfiguration());
        LeadContextHeader leadContext = helper.getLeadContextHeader();
        leadContext.setWorkflowId(URI.create("http://host/2005/11/09/workflowinstace"));
        leadContext.setNodeId("decoder1");
        leadContext.setTimeStep("5");
        leadContext.setServiceId("decoder-instance-10");

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

        correlator = null;

        // pass some headers
        LeadContextHeaderHelper helper = new LeadContextHeaderHelper();
        helper.setXBayaConfiguration(new XBayaConfiguration());
        LeadContextHeader leadContext = helper.getLeadContextHeader();
        leadContext.setWorkflowId(URI.create("http://host/2005/11/09/workflowinstace"));
        leadContext.setNodeId("decoder1");
        leadContext.setTimeStep("5");
        leadContext.setServiceId("decoder-instance-10");

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

        LEADWorkflowInvoker invoker = null;
        try {

            WsdlDefinitions wsdl = workflow.getOdeInvokableWSDL(configuration.getDSCURL(), configuration.getODEURL());

            LeadContextHeader leadContext = XBayaUtil.buildLeadContextHeader(this.engine, monitorConfiguration,
                    StringUtil.convertToJavaIdentifier(engine.getWorkflow().getName()), resourceMapping);
            // /////////////////////////////////////
            leadContext.setExperimentId(monitorConfiguration.getTopic());

            // ////////////////////////////////////////////////////////////

            URI messageBoxURL = null;
            if (monitorConfiguration.isPullMode()) {
                messageBoxURL = monitorConfiguration.getMessageBoxURL();
            }

            // create an invoker with LEAD Context
            GsiInvoker secureInvoker = null;
            if (this.engine.getWorkflowClient().isSecure()) {
                MyProxyClient myProxyClient = this.engine.getMyProxyClient();
                secureInvoker = new GsiInvoker(myProxyClient.getProxy(), XBayaSecurity.getTrustedCertificates());

                leadContext.setScmsUrl(URI.create("https://tyr12.cs.indiana.edu:60443/SCMS?wsdl"));

            }
            invoker = new LEADWorkflowInvoker(wsdl, leadContext, messageBoxURL, secureInvoker);
        } catch (ComponentException e) {
            if (this.canceled) {
View Full Code Here

        logger.info(definitions.xmlStringPretty());

        // Create lead context.
        LeadContextHeaderHelper leadContextHelper = new LeadContextHeaderHelper();
        leadContextHelper.setXBayaConfiguration(this.configuration);
        LeadContextHeader leadContext = leadContextHelper.getLeadContextHeader();

        URI messageBoxURL = null;
        if (this.configuration.isPullMode()) {
            messageBoxURL = this.configuration.getMessageBoxURL();
        }
View Full Code Here

     */
    public void estWithUserCredential() throws ComponentException, IOException, GeneralSecurityException {
        boolean userCred = true;
        GSSCredential proxy = null;
        WsdlDefinitions wsdl = null; // Set WSDL of the workflow.
        LeadContextHeader leadContext = null; // Set the LEAD Context.
        URI messageBoxURL = null; // This one can be null;

        String trustedcerts = System.getProperty("trustedcerts");
        String certskey = System.getProperty("certskey");

View Full Code Here

          proxy = SecurityUtil.getGSSCredential(this.username,
              this.password,
              this.configuration.getMyProxyServer());
        }

        LeadContextHeader leadCtxHeader = null;
        try {
          if (this.mode == GUI_MODE) {
            leadCtxHeader = XBayaUtil.buildLeadContextHeader(
                this.getWorkflow(),
                this.configuration,
                new MonitorConfiguration(this.configuration
                    .getBrokerURL(), this.topic, true,
                    this.configuration.getMessageBoxURL()),
                wsNode.getID(), null);
          } else {
            leadCtxHeader = XBayaUtil.buildLeadContextHeader(
                this.getWorkflow(),
                this.configuration,
                new MonitorConfiguration(this.configuration
                    .getBrokerURL(), this.topic, true,
                    this.configuration.getMessageBoxURL()),
                wsNode.getID(), null);
          }
        } catch (URISyntaxException e) {
          throw new XBayaException(e);
        }

        leadCtxHeader.setServiceId(node.getID());
        try {
          leadCtxHeader.setWorkflowId(new URI(this.getWorkflow()
              .getName()));

          // We do this so that the wsdl resolver can is setup
          // wsdlresolver.getInstance is static so once this is
          // done
          // rest of the loading should work.

          XBayaSecurity.init();

        } catch (URISyntaxException e) {
          throw new XBayaRuntimeException(e);
        }

        /*
         * Resource Mapping Header
         */
        if (this.resourceMapping != null) {
          leadCtxHeader.setResourceMapping(this.resourceMapping);
        }

        /*
         * If there is a instance control component connects to this
         * component send information in soap header
         */
        for (Node n : wsNode.getControlInPort().getFromNodes()) {
          if (n instanceof InstanceNode) {
            // TODO make it as constant
            LeadResourceMapping x = new LeadResourceMapping(
                "AMAZON");

            x.addAttribute("ACCESS_KEY", AmazonCredential
                .getInstance().getAwsAccessKeyId());
            x.addAttribute("SECRET_KEY", AmazonCredential
                .getInstance().getAwsSecretAccessKey());

            if (((InstanceNode) n).isStartNewInstance()) {
              x.addAttribute("AMI_ID",
                  ((InstanceNode) n).getIdAsValue());
              x.addAttribute("INS_TYPE",
                  ((InstanceNode) n).getInstanceType());
            } else {
              x.addAttribute("INS_ID",
                  ((InstanceNode) n).getIdAsValue());
            }

            x.addAttribute("USERNAME",
                ((InstanceNode) n).getUsername());

            // set to leadHeader
            leadCtxHeader.setResourceMapping(x);
          }
        }

        invoker = new WorkflowInvokerWrapperForGFacInvoker(
            portTypeQName, gfacURLString, this.engine.getMonitor()
View Full Code Here

        } else {
          proxy = SecurityUtil.getGSSCredential(this.username,
              this.password,
              this.configuration.getMyProxyServer());
        }
        LeadContextHeader leadCtxHeader = null;
        try {
          if (this.mode == GUI_MODE) {
            leadCtxHeader = XBayaUtil.buildLeadContextHeader(
                this.getWorkflow(),
                this.configuration,
View Full Code Here

        // LEAD Context Header
        // Create lead context.
        LeadContextHeaderHelper leadContextHelper = new LeadContextHeaderHelper();
        leadContextHelper.setXBayaConfiguration(this.configuration);
        LeadContextHeader leadContext = leadContextHelper.getLeadContextHeader();
        leadContext.setWorkflowId(URI.create("http://host/2005/11/09/workflowinstace"));
        leadContext.setNodeId("decoder1");
        leadContext.setTimeStep("5");
        leadContext.setServiceInstanceId(URI.create("decoder-instance-10"));

        XmlElement element3 = XMLUtil.xmlElement5ToXmlElement3(definitions.xml());
        xsul.wsdl.WsdlDefinitions definitions3 = new xsul.wsdl.WsdlDefinitions(element3);

        WSIFClient wclient = WSIFRuntime.getDefault().newClientFor(definitions3, "TestCMD_Example1SoapPort");
View Full Code Here

TOP

Related Classes of xsul.lead.LeadContextHeader

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.