Package org.xmlpull.infoset

Examples of org.xmlpull.infoset.XmlElement


            String valueString;
            if (value == null) {
                valueString = "";
            } else {
                if (value instanceof XmlElement) {
                    XmlElement valueElement = (XmlElement) value;
                    valueString = XMLUtil.xmlElementToString(valueElement);
                } else {
                    // Only string comes here for now.
                    valueString = value.toString();
                }
View Full Code Here


  }

  public void generateODEBPEL(GpelProcess gpelProcess, String workflowName, WsdlDefinitions workflowWSDL, Map<String, WsdlDefinitions> wsdls) {
   
   
    XmlElement bpelXml = gpelProcess.xml();
    if( null != bpelXml.attributeValue(NAME) ){
      //already done
      return;
    }
   
    gpelProcess.xml().setAttributeValue(NAME,
View Full Code Here

  private void addImports(GpelProcess process, WsdlDefinitions workflowWSDL, Map<String, WsdlDefinitions> wsdls) {
    Iterator<String> iterator = wsdls.keySet().iterator();
    while(iterator.hasNext()){
      String id = iterator.next();
      WsdlDefinitions wsdl = wsdls.get(id);
      XmlElement importElement = process.xml().newElement(process.xml().getNamespace(), "import");
      importElement.setAttributeValue("importType", "http://schemas.xmlsoap.org/wsdl/");
      importElement.setAttributeValue("location", wsdl.xml().attributeValue("name")+".wsdl");
      importElement.setAttributeValue("namespace", wsdl.getTargetNamespace());
      process.xml().addChild(0, importElement);
     
    }
   
    XmlElement importElement = process.xml().newElement(process.xml().getNamespace(), "import");
    importElement.setAttributeValue("importType", "http://schemas.xmlsoap.org/wsdl/");
   
    importElement.setAttributeValue("location", workflowWSDL.xml().attributeValue("name")+".wsdl");
    importElement.setAttributeValue("namespace", workflowWSDL.getTargetNamespace());
    process.xml().addChild(0, importElement);
   
    process.xml().declareNamespace(XmlConstants.BUILDER.newNamespace("leadcntx", "http://lead.extreme.indiana.edu/namespaces/2005/10/lead-context-header"));
   
   
View Full Code Here

        GpelAssign assign = (GpelAssign)next;
        Iterator<GpelAssignCopy> itr = assign.copyOperations().iterator();
        while(itr.hasNext()){
          GpelAssignCopy copy = itr.next();
          String query = copy.getFrom().xml().attributeValue(QUERY_STR);
          XmlElement copyElmt = copy.getFrom().xml();
          //remove if attribute is found earlier
          if( null != query){
            copyElmt.removeAttribute(copyElmt.attribute(QUERY_STR));
            copyElmt.setAttributeValue(QUERY_STR, "/"+extractDataType(query));
          }
         
         
          query = copy.getTo().xml().attributeValue(QUERY_STR);
          XmlElement toElmt = copy.getTo().xml();
          //remove if attribute is found earlier
          if( null != query){
            toElmt.removeAttribute(toElmt.attribute(QUERY_STR));
            toElmt.setAttributeValue(QUERY_STR, "/"+extractDataType(query));
          }
         
        }
      }
    }
View Full Code Here

        }
       
        GpelAssign assign = (GpelAssign)last;
        XmlNamespace ns = assign.xml().getNamespace();
       
        XmlElement container = XmlConstants.BUILDER.parseFragmentFromString("<dummyelement></dummyelement>");
       
       
        String portTypeattr = next.xml().attributeValue(PORT_TYPE_STR);
        String operation = next.xml().attributeValue(OPERATION_STR);
        if(null == portTypeattr || "".equals(portTypeattr)){
          throw new XBayaRuntimeException("No Porttype found for Invoke:"+next);
        }
        String portTypeName = portTypeattr.substring(portTypeattr.indexOf(':')+1);
        String messagePartName = null;
        if(isInvoke(next)){
          Iterator<String> keys = wsdls.keySet().iterator();
         
          while(keys.hasNext()){
            String key = keys.next();
            WsdlDefinitions wsdl = wsdls.get(key);
            WsdlPortType portType = wsdl.getPortType(portTypeName);
            if( null != portType){
              WsdlPortTypeOperation wsdlOperation = portType.getOperation(operation);
              WsdlMessagePart part  = wsdl.getMessage(wsdlOperation.getInput().getMessage().getLocalPart()).parts().iterator().next();
              XmlElement childElement = container.addElement(part.getElement().getLocalPart());
              Iterator<GpelAssignCopy> copyItr = assign.copyOperations().iterator();
              while(copyItr.hasNext()){
                GpelAssignCopy copyItm = copyItr.next();
                childElement.addElement(getElementName(copyItm.getTo().getQuery()));
                if(messagePartName == null){
                  messagePartName = copyItm.getTo().xml().attributeValue(PART_STR);
                }
              }
              break;
            }
          }
        }else {
          //reply
         
         
            WsdlPortType portType = workflowWSDL.getPortType(portTypeName);
            if( null != portType){
              WsdlPortTypeOperation wsdlOperation = portType.getOperation(operation);
              WsdlMessagePart part  = workflowWSDL.getMessage(wsdlOperation.getOutput().getMessage().getLocalPart()).parts().iterator().next();
              XmlElement childElement = container.addElement(part.getElement().getLocalPart());
              Iterator<GpelAssignCopy> copyItr = assign.copyOperations().iterator();
              while(copyItr.hasNext()){
                GpelAssignCopy copyItm = copyItr.next();
                childElement.addElement(getElementName(copyItm.getTo().getQuery()));
                if(messagePartName == null){
                  messagePartName = copyItm.getTo().xml().attributeValue(PART_STR);
                }
              }
          }
View Full Code Here

     * @return the node xml
     */
    @Override
    protected XmlElement toXML() {

        XmlElement nodeElement = super.toXML();
        nodeElement.setAttributeValue(GraphSchema.NS,
                GraphSchema.NODE_TYPE_ATTRIBUTE, GraphSchema.NODE_TYPE_EXIT);
        return nodeElement;
    }
View Full Code Here

        this.dialog.hide();
    }

    private void ok() {
        String inputMetadataText = this.inputPanel.getMetadata();
        XmlElement inputMetadata;
        if (inputMetadataText.length() == 0) {
            inputMetadata = null;
        } else {
            try {
                inputMetadata = XMLUtil.stringToXmlElement(inputMetadataText);
            } catch (RuntimeException e) {
                String warning = "The input metadata is ill-formed.";
                this.engine.getErrorWindow().error(warning, e);
                return;
            }
        }

        String outputMetadataText = this.outputPanel.getMetadata();
        XmlElement outputMetadata;
        if (outputMetadataText.length() == 0) {
            outputMetadata = null;
        } else {
            try {
                outputMetadata = XMLUtil.stringToXmlElement(outputMetadataText);
View Full Code Here

        File workflowFile = new File(this.temporalDirectory, filename
                + XBayaConstants.WORKFLOW_FILE_SUFFIX);
        XMLUtil.saveXML(workflow.toXML(), workflowFile);

        // Read the workflow
        XmlElement workflowElement = XMLUtil.loadXML(workflowFile);
        workflow = new Workflow(workflowElement);

        // Create BPEL again
        bpel = new BPELScript(workflow);
        bpel.create(BPELScriptType.GPEL);
View Full Code Here

        super.parseConfiguration(configElement);
    }

    @Override
    protected XmlElement toXML() {
        XmlElement nodeElement = super.toXML();
        nodeElement.setAttributeValue(GraphSchema.NS,
                GraphSchema.NODE_TYPE_ATTRIBUTE, GraphSchema.NODE_TYPE_MERGE);
        return nodeElement;
    }
View Full Code Here

     * @see wsmg.NotificationHandler#handleNotification(java.lang.String)
     */
    public void handleNotification(String message) {
        try {
            String soapBody = WsmgUtil.getSoapBodyContent(message);
            XmlElement event = XMLUtil.stringToXmlElement(soapBody);
            handleEvent(new MonitorEvent(event), true, this.workflow.getGraph());
           
        } catch (XmlBuilderException e) {
            // Just log them because they can be unrelated messages sent to
            // this topic by accident.
View Full Code Here

TOP

Related Classes of org.xmlpull.infoset.XmlElement

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.