Package org.xmlpull.infoset

Examples of org.xmlpull.infoset.XmlNamespace


        if(last == null || !isAssign(last)){
          throw new XBayaRuntimeException("Assign activity not found for the Invoke "+next.xmlStringPretty());
        }
       
        GpelAssign assign = (GpelAssign)last;
        XmlNamespace ns = assign.xml().getNamespace();
       
        XmlElement container = XmlConstants.BUILDER.parseFragmentFromString("<dummyelement></dummyelement>");
       
       
        String portTypeattr = next.xml().attributeValue(PORT_TYPE_STR);
View Full Code Here


              "Assign activity not found for the Invoke"
                  + next.xmlStringPretty());
        }

        // we are good and should add the header copy.
        XmlNamespace ns = last.xml().getNamespace();
        GpelAssignCopyFrom headerFrom = new GpelAssignCopyFrom(ns);
        headerFrom.xml().setAttributeValue(PART_STR, LEAD_HEADER_STR);
        headerFrom.xml().setAttributeValue(VARIABLE_STR, WORKFLOW_INPUT_STR);

        GpelAssignCopyTo headerTo = new GpelAssignCopyTo(ns);
View Full Code Here

    }

    private void addInitialReceive(GpelSequence sequence) {
        // Create a partner link
        String partnerLinkName = WORKFLOW_PARTNER_LINK;
        XmlNamespace partnerLinkTypeNS = this.workflowWSDL.getTargetNamespace();
        String partnerLinkTypeName = this.workflowPrefix
                + PARTNER_LINK_TYPE_SUFFIX;
        String myRollName = this.workflowPrefix + MY_ROLE_SUFFIX;

        this.process.addPartnerLink(partnerLinkName, partnerLinkTypeNS,
View Full Code Here

        WSComponent wsdlComponent = node.getComponent();
        String operation = wsdlComponent.getOperationName();

        QName portTypeQName = wsdlComponent.getPortTypeQName();
        XmlNamespace namespace = XMLUtil.declareNamespaceIfNecessary(id
                .toLowerCase(), portTypeQName.getNamespaceURI(), false,
                this.process.xml());

        // Variable
        String inputVariableName = id + INPUT_SUFFIX;
        this.process.addMessageVariable(inputVariableName, namespace,
                portTypeQName.getLocalPart());
        String outputVariableName = id + OUTPUT_SUFFIX;
        this.process.addMessageVariable(outputVariableName, namespace,
                portTypeQName.getLocalPart());

        // Assign
        List<GpelAssignCopy> copies = new ArrayList<GpelAssignCopy>();
        for (Port port : node.getInputPorts()) {
            Port fromPort = port.getFromPort();
            if (fromPort == null) {
                // optional input
                continue;
            }
            GpelAssignCopyFrom from = createAssignCopyFrom(port);
            GpelAssignCopyTo to = createAssignCopyTo(port, true);

            GpelAssignCopy copy = new GpelAssignCopy(this.bpelNS, from, to);
            copies.add(copy);
        }

        GpelAssign assign = new GpelAssign(this.bpelNS, copies);
        sequence.addActivity(assign);

        PartnerLinkRole partnerRoll = this.workflowWSDL
                .getPartnerRoll(portTypeQName);
        if (partnerRoll == null) {
            String partnerLinkTypeName = id + PARTNER_LINK_TYPE_SUFFIX;
            String partnerRollName = id + PARTNER_ROLE_SUFFIX;
            partnerRoll = this.workflowWSDL.addPartnerLinkTypeAndRoll(
                    partnerLinkTypeName, partnerRollName, portTypeQName);
        }
        PartnerLinkType partnerLinkType = partnerRoll.getPartnerLinkType();

        // partnerLink
        String partnerLinkName = createPartnerLinkName(id);
        XmlNamespace partnerLinkTypeNS = this.targetNamespace;
        this.process.addPartnerLink(partnerLinkName, partnerLinkTypeNS,
                partnerLinkType.getName(), null, partnerRoll.getName());

        // Invoke
        GpelInvoke invoke = new GpelInvoke(this.bpelNS, partnerLinkName, namespace,
View Full Code Here

            from.setVariable(fromID + OUTPUT_SUFFIX);
            from.setPart(fromWsdlComponent.getOutputPartName());

            if (fromWsdlPort.isSchemaUsed()) {
                String typesTargetNamespace = fromWsdlPort.getTargetNamespace();
                XmlNamespace namespace = XMLUtil.declareNamespaceIfNecessary(
                        fromID.toLowerCase() + TYPENS_SUFFIX,
                        typesTargetNamespace, false, this.process.xml());

                from.setQuery("/" + namespace.getPrefix() + ":"
                        + fromWsdlComponent.getOutputTypeName() + "/"
                        + fromWsdlPort.getName());
            } else {
                // No query needed?
            }
View Full Code Here

            if (toComponentPort.isSchemaUsed()) {
                // Normal case.
                // e.g. <part name="name" type="typens:fooType">
                String typesTargetNamespace = toComponentPort
                        .getTargetNamespace();
                XmlNamespace namespace = XMLUtil.declareNamespaceIfNecessary(
                        toID.toLowerCase() + TYPENS_SUFFIX,
                        typesTargetNamespace, false, this.process.xml());

                String typeName = input ? toWSComponent.getInputTypeName()
                        : toWSComponent.getOutputTypeName();
                to.setQuery("/" + namespace.getPrefix() + ":" + typeName + "/"
                        + toComponentPort.getName());
            } else {
                // e.g. <part name="name" type="xsd:string">
                // No query is needed?
            }
View Full Code Here

   * @return The namespace found or declared.
   */
  public static XmlNamespace declareNamespaceIfNecessary(
      String prefixCandidate, String uri, boolean alwaysUseSuffix,
      XmlElement element) {
    XmlNamespace namespace = element.lookupNamespaceByName(uri);
    if (namespace == null) {
      return declareNamespace(prefixCandidate, uri, alwaysUseSuffix,
          element);
    } else {
      return namespace;
View Full Code Here

      prefix = prefixCandidate + i;
      while (element.lookupNamespaceByPrefix(prefix) != null) {
        i++;
      }
    }
    XmlNamespace namespace = element.declareNamespace(prefix, uri);
    return namespace;
  }
View Full Code Here

    String targetNamespace = gpelProcess.getTargetNamespace();
    String targetNamespacePrefix = "wfns";
   
   
   
    XmlNamespace odeNs = builder.newNamespace("http://www.apache.org/ode/schemas/dd/2007/03");
    XmlElement deploy = builder.newFragment(odeNs, "deploy");
    deploy.declareNamespace(PROCESS, targetNamespace);
    deploy.declareNamespace(targetNamespacePrefix, workflowWSDL.getTargetNamespace());
   
   
View Full Code Here

   * @throws CloneNotSupportedException
   */
  public void addreceive(GpelProcess process, WsdlDefinitions workflowWsdl, String operationName, String receiveMessage ) throws CloneNotSupportedException {

    GpelVariablesContainer variables = process.getVariables();
    XmlNamespace ns = variables.xml().getNamespace();
    GpelVariable var = new GpelVariable(ns, "newReceiveVar");
    variables.addVariable(var);
    var.setMessageTypeQName(new QName(workflowWsdl.getTargetNamespace(),
        receiveMessage));

View Full Code Here

TOP

Related Classes of org.xmlpull.infoset.XmlNamespace

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.