Package xsul5.wsdl

Examples of xsul5.wsdl.WsdlDefinitions


            processResource.setXmlContent(process.xml());
        }

        // WSDL for the process
        workflowWSDLresource = wsdlResourceMap.remove(PROCESS_WSDL_TYTLE);
        WsdlDefinitions workflowWSDL = workflow.getWorkflowWSDL();
        logger.finest(workflowWSDL.xmlString());
        if (workflowWSDLresource == null) {
            workflowWSDLresource = new GcWsdlResource(PROCESS_WSDL_TYTLE,
                    workflowWSDL);
            links.add(workflowWSDLresource);
        } else {
            workflowWSDLresource.setXmlContent(workflowWSDL.xml());
        }

        Map<String, WsdlDefinitions> wsdlMap = workflow.getWSDLs();
        for (String id : wsdlMap.keySet()) {
            WsdlDefinitions wsdl = wsdlMap.get(id);
            GcWsdlResource wsdlResource = wsdlResourceMap.remove(id);
            if (wsdlResource == null) {
                wsdlResource = new GcWsdlResource(id, wsdl);
                links.add(wsdlResource);
            } else {
                wsdlResource.setXmlContent(wsdl.xml());
            }
        }

        // Remove the rest of unused WSDL from the links.
        for (GcWsdlResource resource : wsdlResourceMap.values()) {
View Full Code Here


        GpelProcess process = new GpelProcess(processResource.getXmlContent());
        workflow.setGpelProcess(process);

        // WSDL for the process
        workflowWSDLresource = wsdlResourceMap.remove(PROCESS_WSDL_TYTLE);
        WsdlDefinitions workflowWSDL = new WsdlDefinitions(workflowWSDLresource
                .getXmlContent());
        workflow.setWorkflowWSDL(workflowWSDL);

        // WSDLs for services.
        for (String wsdlID : wsdlResourceMap.keySet()) {
            GcWsdlResource wsdlResource = wsdlResourceMap.get(wsdlID);
            WsdlDefinitions definition = new WsdlDefinitions(wsdlResource
                    .getXmlContent());
            workflow.addWSDL(wsdlID, definition);
        }

        // Graph
View Full Code Here

            Graph graph = workflow.getGraph();
            for (WSNode node : GraphUtil.getNodes(graph, WSNode.class)) {
                String partnerLinkName = BPELScript.createPartnerLinkName(node
                        .getID());
                logger.finest("partnerLinkName: " + partnerLinkName);
                WsdlDefinitions wsdl = node.getComponent().getWSDL();
                logger.finest("WSDL QName: " + WSDLUtil.getWSDLQName(wsdl));

                if (WSDLUtil.isAWSDL(wsdl)) {
                    URI subWorkflowTemplateID = WorkflowComponent
                            .getWorkflowTemplateID(wsdl);
View Full Code Here

            URI instanceID = instance.getInstanceId();
            logger.info("instanceID: " + instanceID);
            workflow.setGPELInstanceID(instanceID);

            for (String partnerLinkName : wsdlMap.keySet()) {
                WsdlDefinitions wsdl = wsdlMap.get(partnerLinkName);
                logger.info("partnerLinkName: " + partnerLinkName);
                logger.info("WSDL QName: " + WSDLUtil.getWSDLQName(wsdl));

                GcUsesWsdlResource wsdlResource = new GcUsesWsdlResource(
                        partnerLinkName, wsdl);
View Full Code Here

            String workflowPartnerLinkName = BPELScript.WORKFLOW_PARTNER_LINK;
            GcProvidesWsdlResource workflowPublicWsdl = (GcProvidesWsdlResource) instance
                    .getLinkWithTitleAndRel(workflowPartnerLinkName,
                            GcProvidesWsdlResource.REL);

            WsdlDefinitions workflowCWSDL = new WsdlDefinitions(
                    workflowPublicWsdl.getXmlContent());
            return workflowCWSDL;
        } catch (RuntimeException e) {
            String message = "Error while starting a workflow instance. instance ID: "
                    + instanceID;
View Full Code Here

        }

        MonitorConfiguration monitorConfiguration = this.engine.getMonitor()
                .getConfiguration();
        XBayaConfiguration xbayaConfiguration = this.engine.getConfiguration();
        WsdlDefinitions wsdl;
        try {
            GcInstance instance = client.instantiate(workflow,
                    xbayaConfiguration.getDSCURL(), monitorConfiguration
                            .getTopic());
            wsdl = client.start(instance);
View Full Code Here

    GcInstance instance = client.instantiate(workflow,
        XBayaConstants.DEFAULT_DSC_URL, topic);
    System.out.println("===============================================");
    System.out.println(instance.getId());
    System.out.println(instance.getInstanceId());
    WsdlDefinitions wsdl = client.start(instance);
    System.out.println(workflow.getGPELTemplateID());

    LEADWorkflowInvoker invoker = null;
    try {
      if(leadContextHeader == null){
View Full Code Here

      Node fromNode = inPort.getFromNode();
      if (fromNode instanceof WSNode) {
        WSNode fromWsNode = (WSNode) fromNode;
        if (null != fromPort && fromPort instanceof DataPort) {
          DataPort fromDataPort = (DataPort) fromPort;
          WsdlDefinitions wsdl = engine.getWorkflow().getWSDLs().get(
              fromWsNode.getWSDLID());
          System.out.println(xsul5.XmlConstants.BUILDER
              .serializeToString(wsdl.xml()));
          Iterator<XmlNamespace> itr = wsdl.xml().namespaces()
              .iterator();
          try {
            XmlElement schema = wsdl.getTypes().element("schema")
                .clone();
            // do not change the following ordering of setting
            // namespaces.
            schema
                .setNamespace(xsul5.XmlConstants.BUILDER
View Full Code Here

                        }

                        // now go through the WSDLS and find the one with the proper port type
                        Set<String> keys = wsdls.keySet();
                        for (String key : keys) {
                            WsdlDefinitions wsdl = wsdls.get(key);
                            WsdlPortType portType = wsdl.getPortType(portTypeQname.getLocalPart());
                            if (null != portType && portType.getQName().equals(portTypeQname)) {
                                // this is the right porttype so extract the service and you will be done
                                Iterator<WsdlService> svcIterator = wsdl.services().iterator();
                                String nsPrefix = null;
                                if (svcIterator.hasNext()) {
                                    WsdlService plService = svcIterator.next();
                                    if (null == newNamespaceMap.get(wsdl.getTargetNamespace())) {
                                        nsPrefix = "p" + newNamespaceMap.size();
                                        newNamespaceMap.put(wsdl.getTargetNamespace(), nsPrefix);
                                    } else {
                                        nsPrefix = newNamespaceMap.get(wsdl.getTargetNamespace());
                                    }

                                    String portName = null;
                                    Iterator<WsdlPort> portItr = plService.ports().iterator();
                                    if (portItr.hasNext()) {
View Full Code Here

*
*/
public class WSDLCleaner {

    public static void cleanWSDL(WsdlDefinitions definition) {
        WsdlDefinitions wsdl = definition;
        Iterable<WsdlBinding> bindings = wsdl.bindings();
        ArrayList<WsdlBinding> removedBindings = new ArrayList<WsdlBinding>();
        for (WsdlBinding wsdlBinding : bindings) {
            XmlElement innerBinding = wsdlBinding.xml().element("binding");
            if (null != innerBinding
                    && !"http://schemas.xmlsoap.org/wsdl/soap/".equals(innerBinding.getNamespace().getName())) {

                removedBindings.add(wsdlBinding);
            }
        }
        // to mitigate the Concurrent modifications this is done separately
        for (WsdlBinding wsdlBinding : removedBindings) {
            wsdl.xml().removeElement(wsdlBinding.xml());
        }

        ArrayList<WsdlPort> removePorts = new ArrayList<WsdlPort>();
        Iterable<WsdlService> services = wsdl.services();
        for (WsdlService wsdlService : services) {
            Iterable<WsdlPort> ports = wsdlService.ports();
            for (WsdlPort wsdlPort : ports) {
                for (WsdlBinding removedBinding : removedBindings) {
                    if (removedBinding.getName().equals(wsdlPort.getBinding().getLocalPart())) {
                        removePorts.add(wsdlPort);
                        break;
                    }
                }
            }
            for (WsdlPort wsdlPort : removePorts) {
                wsdlService.xml().removeElement(wsdlPort.xml());
            }
            removePorts.clear();
        }

        // remove attributeFormDefault and elementFormDefault
        Iterable<XmlElement> schemas = wsdl.getTypes().elements(null, "schema");
        for (XmlElement schema : schemas) {
            XmlAttribute attributeFormDefault = schema.attribute("attributeFormDefault");
            schema.removeAttribute(attributeFormDefault);

            XmlAttribute elementFormDefault = schema.attribute("elementFormDefault");
View Full Code Here

TOP

Related Classes of xsul5.wsdl.WsdlDefinitions

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.