Package xsul5.wsdl

Examples of xsul5.wsdl.WsdlBindingOperation


        // ID to retrieve the workflow instance
        URI instanceID = instance.getInstanceId();
        logger.info("instanceID: " + instanceID);

        // Start the workflow instance.
        WsdlDefinitions wsdl = client.start(instance);

        // Create lead context.
        LeadContextHeaderHelper leadContextHelper = new LeadContextHeaderHelper();
        leadContextHelper.setXBayaConfiguration(this.configuration);
        LeadContextHeader leadContext = leadContextHelper
View Full Code Here


        String processString = process.xmlStringPretty();
        FileWriter writer = new FileWriter(bpelFile);
        writer.write(processString);
        writer.close();
       
        WsdlDefinitions workflowWSDL = wf.getOdeWorkflowWSDL(this.engine.getConfiguration().getDSCURL(),
            this.engine.getConfiguration().getODEURL());
        String workflowWsdlStr = XmlConstants.BUILDER.serializeToStringPretty(workflowWSDL.xml());
        writer = new FileWriter(wsdlFile);
        writer.write(workflowWsdlStr);
       
        Map<String, WsdlDefinitions> wsdlMap = wf.getOdeServiceWSDLs(
            this.engine.getConfiguration().getDSCURL(),
View Full Code Here

    // Create the invoker
    LEADWorkflowInvoker invoker = null;
    try {
     
      WsdlDefinitions wsdl = workflow.getOdeInvokableWSDL(configuration.getDSCURL(), configuration.getODEURL());
     
      LeadContextHeader leadContext = WSDLUtil.buildLeadContextHeader(this.engine,
          monitorConfiguration, StringUtil.convertToJavaIdentifier(engine
              .getWorkflow().getName()),resourceMapping);
      ///////////////////////////////////////
View Full Code Here

     * @throws ComponentException
     */
    public static List<WSComponent> createComponents(XmlElement componentElement)
            throws ComponentException {
        try {
            WsdlDefinitions definitions = new WsdlDefinitions(componentElement);
            return createComponents(definitions);
        } catch (RuntimeException e) {
            throw new ComponentException(ErrorMessages.COMPONENT_FORMAT_ERROR,
                    e);
        }
View Full Code Here

    Map<WsdlDefinitions, String> ids = new HashMap<WsdlDefinitions, String>();
    // Use LinkedHashMap to preserve the order of WSDLs, which is useful for
    // some unit tests.

    for (WSNode node : GraphUtil.getNodes(this.graph, WSNode.class)) {
      WsdlDefinitions wsdl = node.getComponent().getWSDL();
      if (wsdls.containsValue(wsdl)) {
        String id = ids.get(wsdl);
        node.setWSDLID(id);
      } else {
        // Assign unique key
View Full Code Here

    workflowElement.addElement(this.graph.toXML());

    // WSDLs
    XmlElement wsdlsElement = workflowElement.addElement(NS_XWF, WSDLS_TAG);
    for (String id : wsdls.keySet()) {
      WsdlDefinitions wsdl = wsdls.get(id);
      XmlElement wsdlElement = wsdlsElement.addElement(NS_XWF, WSDL_TAG);
      wsdlElement.setAttributeValue(NS_XWF, ID_ATTRIBUTE, id);
      wsdlElement.setText(XMLUtil.xmlElementToString(wsdl.xml()));
    }

    // Image
    if (this.image != null) {
      try {
View Full Code Here

    // This map is to avoid creating multiple instances for the a component
    Map<WSComponentKey, WSComponent> components = new HashMap<WSComponentKey, WSComponent>();
    for (WSNode node : GraphUtil.getWSNodes(this.graph)) {
      String id = node.getWSDLID();
      logger.finest("id: " + id);
      WsdlDefinitions wsdl = this.wsdlMap.get(id);

      if (wsdl == null) {
        // XXX This happens while loading a workflow that is created by
        // the version 2.2.6_2 or below from GPEL.
        // Need to look for wsdl manually.
View Full Code Here

    this.graph = WSGraphFactory.createGraph(graphElement);

    XmlElement wsdlsElement = workflowElement.element(WSDLS_TAG);
    for (XmlElement wsdlElement : wsdlsElement.elements(null, WSDL_TAG)) {
      String wsdlText = wsdlElement.requiredText();
      WsdlDefinitions wsdl = WSDLUtil.stringToWSDL(wsdlText);
      String id = wsdlElement.attributeValue(NS_XWF, ID_ATTRIBUTE);
      if (id == null || id.length() == 0) {
        // xwf up to 2.2.6_2 doesn't have ID.
        id = WSDLUtil.getWSDLQName(wsdl).toString();
      }
      addWSDL(id, wsdl);
    }

    bindComponents();

    // Image
    XmlElement imageElement = workflowElement.element(IMAGE_TAG);
    if (imageElement != null) {
      String base64 = imageElement.requiredText();
      byte[] bytes = Base64.decodeBase64(base64.getBytes());
      try {
        this.image = ImageIO.read(new ByteArrayInputStream(bytes));
      } catch (IOException e) {
        // This should not happen and it's OK that image is broken. We
        // can reproduce it anytime.
        logger.caught(e);
      }
    }

    XmlElement bpelElement = workflowElement.element(BPEL_TAG);
    if (bpelElement != null) {
      try {
        String bpelString = bpelElement.requiredText();
        XmlNamespace gpelNS = XmlInfosetBuilder.newInstance()
            .newNamespace(BPELScript.GPEL, BPELScript.GPELNS);
        GpelConstants.GPEL_NS = gpelNS;
        this.gpelProcess = new GpelProcess(
            XMLUtil.stringToXmlElement(bpelString));
      } catch (RuntimeException e) {
        String error = "Failed to parse the BPEL document.";
        throw new GraphException(error, e);
      }
    }

    XmlElement workflowWSDLElement = workflowElement
        .element(WORKFLOW_WSDL_TAG);
    if (workflowWSDLElement != null) {
      try {
        String wsdlText = workflowWSDLElement.requiredText();
        this.workflowWSDL = new WsdlDefinitions(
            XMLUtil.stringToXmlElement(wsdlText));
      } catch (RuntimeException e) {
        String error = "Failed to parse the workflow WSDL.";
        throw new GraphException(error, e);
      }
View Full Code Here

    ODEWSDLTransformer wsdlTransformer = new ODEWSDLTransformer();
    script.create(BPELScriptType.BPEL2);
    this.odeProcess = script.getGpelProcess();
    this.odeProcess.setTargetNamespace(XBayaConstants.LEAD_NS);

    WsdlDefinitions abstractWorkflowWsdl = script.getWorkflowWSDL()
        .getWsdlDefinitions();
    this.odeWorkflowWSDL = abstractWorkflowWsdl;
    this.odeInvokableWSDL = WSDLUtil.stringToWSDL(abstractWorkflowWsdl
        .xmlString());
    wsdlTransformer.makeWorkflowWSDLConcrete(this.odeInvokableWSDL,
        this.getName(), dscUrl);
    wsdlTransformer.setOdeLocation(odeEprEndingWithPort, this.getName(),
        this.odeInvokableWSDL);

    this.odeWsdlMap = new HashMap<String, WsdlDefinitions>();
    Collection<XmlElement> itr = script.getWSDLs();
    for (XmlElement xmlElement : itr) {
      WsdlDefinitions wsdl = WSDLUtil.stringToWSDL(XmlConstants.BUILDER
          .serializeToString(xmlElement));
      String id = xmlElement.attributeValue(NS_XWF, ID_ATTRIBUTE);
      if (id == null || id.length() == 0) {
        // xwf up to 2.2.6_2 doesn't have ID.
        id = WSDLUtil.getWSDLQName(wsdl).toString();
        if (null == id || "".equals(id)
            || (id.startsWith("{") && id.endsWith("}"))) {
          QName wsdlQname = new QName(NS_XWF.getName(),
              WSDLUtil.getFirstOperationName(wsdl,
                  WSDLUtil.getFirstPortTypeQName(wsdl)));
          id = wsdlQname.toString();
          wsdl.xml().setAttributeValue("name",
              wsdlQname.getLocalPart());
        }
      }
      WSDLCleaner.cleanWSDL(wsdl);
      this.odeWsdlMap.put(id, wsdl);
    }

    new ODEBPELTransformer().generateODEBPEL(this.odeProcess,
        this.getName(), this.odeWorkflowWSDL, this.odeWsdlMap);

    wsdlTransformer.trasnformToODEWsdls(this.getName(), dscUrl,
        this.odeWorkflowWSDL, this.odeWsdlMap);

    String wsdlString = XMLUtil.xmlElementToString(this.odeWorkflowWSDL
        .xml());
    this.tridentWSDL = new WsdlDefinitions(
        XMLUtil.stringToXmlElement(wsdlString));
    new TridentTransformer().process(this.tridentWSDL);

    if (streaming) {
      StreamTransformer streamTransformer = new StreamTransformer();
View Full Code Here

  public static void main(String[] args) throws XBayaException,
      URISyntaxException, GSSException, IOException {
    String workflowAsString = getWorkflow();

    Workflow workflow = new Workflow(workflowAsString);
    WsdlDefinitions wsdl = workflow.getTridentWorkflowWSDL(
        XBayaConstants.DEFAULT_DSC_URL,
        XBayaConstants.DEFAULT_ODE_URL.toString());
    System.out.println("llllllllllllllllllllllllll");
    System.out.println(wsdl.xmlStringPretty());

    ODEClient client = new ODEClient();
    Pair<String, String>[] in = new Pair[3];

    List<WSComponentPort> inputs = client.getInputs(workflow);
View Full Code Here

TOP

Related Classes of xsul5.wsdl.WsdlBindingOperation

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.