Package xsul5.wsdl

Examples of xsul5.wsdl.WsdlPortTypeInput


        WsdlPortType portType = iterator.next();
        Iterator<WsdlPortTypeOperation> operations = portType
            .operations().iterator();
        while (operations.hasNext()) {
          WsdlPortTypeOperation operation = operations.next();
          WsdlMessagePart leadHeaderPart = new WsdlMessagePart(
              LEAD_HEADER);
          leadHeaderPart.setName(LEAD_HEADER);
          // we hand set this element to xml because when you use the
          // API it doent add the namespace correctly
          leadHeaderPart.xml().setAttributeValue(ELEMENT,
              LC_CONTEXT);

          wsdl.getMessage(
              operation.getInput().getMessage().getLocalPart())
              .addPart(leadHeaderPart);
        }
      }

      Iterator<WsdlBinding> bindingItr = wsdl.bindings().iterator();
      while (bindingItr.hasNext()) {
        WsdlBinding wsdlBinding = (WsdlBinding) bindingItr.next();
        Iterator<WsdlBindingOperation> operationsItr = wsdlBinding
            .operations().iterator();
        while (operationsItr.hasNext()) {
          WsdlBindingOperation wsdlBindingOperation = (WsdlBindingOperation) operationsItr
              .next();
          org.xmlpull.infoset.XmlElement input = wsdlBindingOperation
              .xml().element(INPUT);
          org.xmlpull.infoset.XmlElement body = input.element(BODY);
          if(body == null){
            //This is a HTTP binding so continue with the next
            continue;
           
          }
         
          body.setAttributeValue(PARTS, INPUT);
          XmlNamespace ns = body.getNamespace();

          org.xmlpull.infoset.XmlElement header = input.newElement(
              ns, HEADER);
          header.setAttributeValue(PART, LEAD_HEADER);
          header.setAttributeValue(USE, LITERAL);
          String inputMessage = findInputMessage(
              wsdlBindingOperation, wsdl);
          header.setAttributeValue(MESSAGE, inputMessage);
          body.removeAttribute(body.attribute(PARTS));
          String inputPartName = null;

          WsdlMessage wsdlMessage = wsdl
              .getMessage(findInputMessaQname(
                  wsdlBindingOperation, wsdl).getLocalPart());
          Iterable<WsdlMessagePart> parts = wsdlMessage.parts();
          Iterator<WsdlMessagePart> partsItr = parts.iterator();
          while (partsItr.hasNext()) {
            WsdlMessagePart wsdlMessagePart = (WsdlMessagePart) partsItr
                .next();
            if (!LEAD_HEADER.equals(wsdlMessagePart.getName())) {
              inputPartName = wsdlMessagePart.getName();
              break;
            }
          }

          if (null == inputPartName) {
View Full Code Here


        Iterator<WsdlService> iterator = services.iterator();
        if (iterator.hasNext()) {
            Iterable<WsdlPort> ports = iterator.next().ports();
            Iterator<WsdlPort> portIterator = ports.iterator();
            if (portIterator.hasNext()) {
                WsdlPort port = portIterator.next();
                Iterable children = port.xml().children();
                Iterator childIterator = children.iterator();
                while (childIterator.hasNext()) {
                    Object next = childIterator.next();
                    if (next instanceof XmlElementWithViewsImpl) {
                        org.xmlpull.infoset.XmlAttribute epr = ((XmlElementWithViewsImpl) next).attribute("location");
View Full Code Here

    Iterator<WsdlService> serviceItr = wsdl.services().iterator();
    if (serviceItr.hasNext()) {
      WsdlService service = serviceItr.next();
      Iterator<WsdlPort> portItr = service.ports().iterator();
      if (portItr.hasNext()) {
        WsdlPort port = portItr.next();
        org.xmlpull.infoset.XmlElement address = port.xml().element(
            "address");
        if (address != null) {
          URI uri = null;
          try {
            uri = new URI(ODEEprEndingWithPort
View Full Code Here

    Iterator<WsdlService> iterator = services.iterator();
    if (iterator.hasNext()) {
      Iterable<WsdlPort> ports = iterator.next().ports();
      Iterator<WsdlPort> portIterator = ports.iterator();
      if (portIterator.hasNext()) {
        WsdlPort port = portIterator.next();
        Iterable children = port.xml().children();
        Iterator childIterator = children.iterator();
        while (childIterator.hasNext()) {
          Object next = childIterator.next();
          if (next instanceof XmlElementWithViewsImpl) {
            org.xmlpull.infoset.XmlAttribute epr = ((XmlElementWithViewsImpl) next).attribute("location");
View Full Code Here

    }else{
      throw new IllegalStateException("NO Service found in the workflow WSDL:"+workflowName);
    }
   
    Iterator<WsdlPort> ports = service.ports().iterator();
    WsdlPort port = null;
    if(ports.hasNext()){
      port = ports.next();
    }else{
      throw new IllegalStateException("NO Port found in the workflow WSDL:"+workflowName);
    }
    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());
   
   
    XmlElement process = deploy.addElement(odeNs, PROCESS);
    process.setAttributeValue(NAME, PROCESS+":"+workflowName);
    //active
    XmlElement active = process.addElement(odeNs, "active");
    active.addChild("true");
   
    //provide
    XmlElement provide = process.addElement
    (odeNs, "provide");
    provide.setAttributeValue("partnerLink", "workflowUserPartner");
    XmlElement providerService = provide.addElement(odeNs, "service");
    providerService.setAttributeValue("port", port.getName());
    providerService.setAttributeValue(NAME, targetNamespacePrefix+":"+service.getName());
   
   
   
    org.xmlpull.infoset.XmlElement wsdlXml = workflowWSDL.xml();
View Full Code Here

        } else {
            throw new IllegalStateException("NO Service found in the workflow WSDL:" + workflowName);
        }

        Iterator<WsdlPort> ports = service.ports().iterator();
        WsdlPort port = null;
        if (ports.hasNext()) {
            port = ports.next();
        } else {
            throw new IllegalStateException("NO Port found in the workflow WSDL:" + workflowName);
        }
        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());

        XmlElement process = deploy.addElement(odeNs, PROCESS);
        process.setAttributeValue(NAME, PROCESS + ":" + workflowName);
        // active
        XmlElement active = process.addElement(odeNs, "active");
        active.addChild("true");

        // provide
        XmlElement provide = process.addElement(odeNs, "provide");
        provide.setAttributeValue("partnerLink", "workflowUserPartner");
        XmlElement providerService = provide.addElement(odeNs, "service");
        providerService.setAttributeValue("port", port.getName());
        providerService.setAttributeValue(NAME, targetNamespacePrefix + ":" + service.getName());

        org.xmlpull.infoset.XmlElement wsdlXml = workflowWSDL.xml();
        Iterable<org.xmlpull.infoset.XmlElement> partnerLinkTypes = wsdlXml.elements(null, "partnerLinkType");
View Full Code Here

    private void addReceive(ReceiveNode node, GpelSequence sequence) {
        String id = node.getID();
        String operationName = id;

        // Create this operation and type in WSDL.
        WsdlPortType portType = this.workflowWSDL.addReceivePortType(
                operationName, node);
        QName portTypeQName = portType.getQName();

        // Partner link
        String partnerLinkName = createPartnerLinkName(id);
        XmlNamespace partnerLinkTypeNS = this.targetNamespace;
        String partnerLinkTypeName = id + PARTNER_LINK_TYPE_SUFFIX;
View Full Code Here

                }
            }
            this.description = buf.toString();
        }

        WsdlPortType portType = this.wsdl.getPortType(this.portTypeQName
                .getLocalPart());
        if (portType == null) {
            throw new ComponentException("portType, " + this.portTypeQName
                    + " is not defined.");
        }
View Full Code Here

    public WorkflowComponent(WsdlDefinitions wsdl, QName portTypeQName,
            String operationName) throws ComponentException {
        super(wsdl, portTypeQName, operationName);
        try {
            // Get template ID from WSDL
            WsdlPortType portType = this.wsdl.getPortType(portTypeQName
                    .getLocalPart());
            XmlElement templateIDElement = portType.xml().element(
                    GPEL_NAMESPACE, WORKFLOW_TEMPLATE_ID_TAG);
            String templateIDString = templateIDElement.requiredText();
            this.templateID = new URI(templateIDString);
        } catch (URISyntaxException e) {
            throw new ComponentException(e);
View Full Code Here

     */
    public static URI getWorkflowTemplateID(WsdlDefinitions definitions)
            throws ComponentException {
        try {
            // Get template ID from WSDL
            WsdlPortType portType = WSDLUtil.getFirstPortType(definitions);
            XmlElement templateIDElement = portType.xml().element(
                    GPEL_NAMESPACE, WORKFLOW_TEMPLATE_ID_TAG);
            if (templateIDElement == null) {
                // Not a workflow
                return null;
            } else {
View Full Code Here

TOP

Related Classes of xsul5.wsdl.WsdlPortTypeInput

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.