Package org.xmlpull.infoset

Examples of org.xmlpull.infoset.XmlElement


          writer = new FileWriter(new File(wsdlFile.getParent(), QName.valueOf(string).getLocalPart()));
          writer.write(XmlConstants.BUILDER.serializeToStringPretty(wsdlMap.get(string).xml()));
          writer.close();
        }
       
        XmlElement deployDescriptor = wf.getODEDeploymentDescriptor(
            this.engine.getConfiguration().getDSCURL(),
            this.engine.getConfiguration().getODEURL());
        writer = new FileWriter(new File(wsdlFile.getParent(), "deploy.xml"));
        writer.write(XmlConstants.BUILDER.serializeToString(deployDescriptor));
        writer.close();
View Full Code Here


    /**
     * @see edu.indiana.extreme.xbaya.graph.impl.PortImpl#toXML()
     */
    @Override
    protected XmlElement toXML() {
        XmlElement portElement = super.toXML();
        portElement.setAttributeValue(GraphSchema.NS,
                GraphSchema.PORT_TYPE_ATTRIBUTE, GraphSchema.PORT_TYPE_EPR);
        return portElement;
    }
View Full Code Here

    /**
     * @see edu.indiana.extreme.xbaya.graph.impl.EdgeImpl#toXML()
     */
    @Override
    protected XmlElement toXML() {
        XmlElement edgeElement = super.toXML();
        edgeElement.setAttributeValue(GraphSchema.NS,
                GraphSchema.EDGE_TYPE_ATTRIBUTE, GraphSchema.EDGE_TYPE_DATA);
        return edgeElement;
    }
View Full Code Here

    public void handleNotification(String message) {
        try {
            // No SOAP header is included.
            // String soapBody = WsmgUtil.getSoapBodyContent(message);
            // XmlElement event = XMLUtil.stringToXmlElement(soapBody);
            XmlElement event = XMLUtil.stringToXmlElement(message);
            this.monitor.handleNotification(event);
        } catch (XmlBuilderException e) {
            // Just log them because they can be unrelated messages sent to
            // this topic by accident.
            logger.warning("Could not parse received notification: " + message,
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);
            this.monitor.handleNotification(event);
        } catch (XmlBuilderException e) {
            // Just log them because they can be unrelated messages sent to
            // this topic by accident.
            logger.warning("Could not parse received notification: " + message,
View Full Code Here

public class TridentTransformer {
 
 
 
  public void process(WsdlDefinitions wsdl){
    XmlElement types = wsdl.getTypes();
    Iterable<XmlElement> schemas = types.elements(null, "schema");
    XmlElement theSchema = null;
    LinkedList<XmlElement> removeList = new LinkedList<XmlElement>();
    for (XmlElement schema : schemas) {
      String tns = schema.attributeValue("targetNamespace");
      if(null != tns  && -1 != tns.indexOf("http://www.extreme.indiana.edu/xbaya")){
        theSchema = schema;
      }else{
        removeList.add(schema);
      }
    }
    for (XmlElement schema : removeList) {
      types.removeChild(schema);
    }
   
    types.addChild(XMLUtil.stringToXmlElement(GFacSimpleTypesXSD.XSD));
    types.addChild(XMLUtil.stringToXmlElement(LeadCrosscutXSD.XSD));
    types.addChild(XMLUtil.stringToXmlElement(LeadContextHeaderXSD.XSD));
   
    XmlElement xml = wsdl.xml();
    XMLUtil.removeElements(xml, "partnerLinkType");
    XMLUtil.removeElements(xml, "default");
   
  }
View Full Code Here

     */
    public static Date getTimestamp(XmlElement event) {
        if (event == null) {
            throw new IllegalArgumentException("null");
        }
        XmlElement timestampEl = event.element(WOR_NS, TIMESTAMP_TAG);
        if (timestampEl == null)
            return null;
        String timestamp = timestampEl.requiredText();
        DcDate date = DcDate.create(timestamp);
        return new Date(date.getTimeInMillis());
    }
View Full Code Here

     */
    public static String getNodeID(XmlElement event) {
        if (event == null) {
            throw new IllegalArgumentException("null");
        }
        XmlElement idElement = getIDElement(event);
        String nodeID = null;
        if (idElement != null) {
            nodeID = idElement.attributeValue(WOR_NS,
                    WORKFLOW_NODE_ID_ATTRIBUTE);
        }
        if (nodeID == null) {
            nodeID = "";
        }
View Full Code Here

    public static URI getWorkflowID(XmlElement event) {
        if (event == null) {
            throw new IllegalArgumentException("null");
        }
        EventType type = getType(event);
        XmlElement idElement = getIDElement(event);
        if (idElement == null) {
            return null;
        }

        String workflowID;
        switch (type) {
        case WORKFLOW_INITIALIZED:
        case WORKFLOW_TERMINATED:
            // Special cases
            workflowID = idElement.attributeValue(WOR_NS, SERVICE_ID_ATTRIBUTE);
            break;
        default:
            // Default
            workflowID = idElement
                    .attributeValue(WOR_NS, WORKFLOW_ID_ATTRIBUTE);
            break;
        }
        if (workflowID == null || workflowID.length() == 0) {
            return null;
View Full Code Here

    public static String getMessage(XmlElement event) {
        if (event == null) {
            throw new IllegalArgumentException("null");
        }
        String description = null;
        XmlElement descElement = event.element(WOR_NS, DESCRIPTION_TAG);
        if (descElement != null) {
            description = descElement.requiredText();
        }

        if (description == null || description.length() == 0) {
            // It might be a data-related notification
            XmlElement dataProduct = event.element(WOR_NS, DATA_PRODUCT_TAG);
            if (dataProduct != null) {
                descElement = dataProduct.element(WOR_NS, DESCRIPTION_TAG);
                if (descElement != null) {
                    description = descElement.requiredText();
                }
            }
        }
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.