Package xsul5.wsdl

Examples of xsul5.wsdl.WsdlPortTypeInput


    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

        if (wsdlName == null) {
            wsdlName = "NoName"; // TODO
        }
        this.wsdlQName = new QName(this.targetNamespace, wsdlName);

        WsdlDocumentation documentation = this.wsdl.getDocumentation();
        if (documentation != null) {
            StringBuffer buf = new StringBuffer();
            for (Object child : documentation.xml().children()) {
                if (child instanceof String) {
                    buf.append(child.toString());
                } else if (child instanceof XmlCharacters) {
                    buf.append(((XmlCharacters) child).getText());
                }
View Full Code Here

            throws ComponentException {

        WsdlPortTypeInput input = operation.getInput();
        // No input is possible.
        if (input != null) {
            WsdlMessage inputMessage = input.lookupMessage();
            this.inputs = parseMessage(inputMessage, true);
        }

        WsdlPortTypeOutput output = operation.getOutput();
        // No output is possible.
        if (output != null) {
            WsdlMessage outputMessage = output.lookupMessage();
            this.outputs = parseMessage(outputMessage, false);
        }
    }
View Full Code Here

       
        if(input){
          WsdlPortTypeInput messageRef = operation.getInput();
          if(null != messageRef &&
              null != messageRef.getMessage()){
            WsdlMessage message = wsdlDefinitions.getMessage(messageRef.getMessage().getLocalPart());
            if(null != message){
              return new QName(wsdlDefinitions.getTargetNamespace(), message.getName(), key);
            }
          }
        }else{
          xsul5.wsdl.WsdlPortTypeOutput messageRef = operation.getOutput();
          if(null != messageRef &&
              null != messageRef.getMessage()){
            WsdlMessage message = wsdlDefinitions.getMessage(messageRef.getMessage().getLocalPart());
            if(null != message){
              return new QName(wsdlDefinitions.getTargetNamespace(), message.getName(), key);
            }
          }
        }
       
       
View Full Code Here

   
    String nsPrefix = null;
    String oldNSPrefix = null;
    boolean introduceNewNS = false;
    String operationName = node.getOperationName();
    WsdlMessage newInputMessage = null;
    Iterable<WsdlPortType> servicePortTypes = serviceWSDL.portTypes();
    WsdlPortTypeOperation serviceOperation = null;
    WsdlPortType servicePortType = null;
    for (WsdlPortType wsdlPortType : servicePortTypes) {
     
      serviceOperation = wsdlPortType.getOperation(operationName);
      if(serviceOperation != null){
        QName inputMessageName = serviceOperation.getInput().getMessage();
        WsdlMessagePart part = WSDLUtil.getfirst(serviceWSDL.getMessage(inputMessageName.getLocalPart()).parts());
       
        nsPrefix = part.getElement().getPrefix();
        oldNSPrefix = nsPrefix;
        introduceNewNS = false;
        while( null != wsdl.xml().lookupNamespaceByPrefix(nsPrefix)){
          //this namespace is already there so keep adding control at the end and check for
          //its existance
          nsPrefix += "_control";
          introduceNewNS = true;
        }
       
        wsdl.xml().declareNamespace(BUILDER.newNamespace(nsPrefix, serviceTns));
       
       
        WsdlMessage inputMessage = serviceWSDL.getMessage(inputMessageName.getLocalPart());
        newInputMessage = wsdl.addMessage(inputMessageName.getLocalPart());
        Iterable<WsdlMessagePart> parts = inputMessage.parts();
        for (WsdlMessagePart wsdlMessagePart : parts) {
          XmlElement newPart = null;
          if(introduceNewNS){
            XmlElement clone = wsdlMessagePart.xml().clone();
            String xmlAsString = BUILDER.serializeToString(clone).replaceAll(oldNSPrefix+":", nsPrefix+":");
            newPart= BUILDER.parseFragmentFromString(xmlAsString);
          }else{
            newPart = wsdlMessagePart.xml().clone();
          }
          newInputMessage.xml().addElement(newPart);
        }
        //add lead header part to the new input messag because this message is copied from the service wsdl.
       
        XmlElement newLeadHeaderPart = newInputMessage.xml().addElement(newInputMessage.xml().getNamespace(), "part");
        newLeadHeaderPart.setAttributeValue("name", "leadHeader");
        newLeadHeaderPart.setAttributeValue("element", "lc:context");
       
        WsdlMessage newOutputMessage = null;
        if(null != serviceOperation.getOutput()){
          QName outputMessageName = serviceOperation.getOutput().getMessage();
          WsdlMessage outputMessage = serviceWSDL.getMessage(outputMessageName.getLocalPart());
          newOutputMessage = wsdl.addMessage(outputMessageName.getLocalPart());
          Iterable<WsdlMessagePart> parts2 = outputMessage.parts();
          for (WsdlMessagePart wsdlMessagePart : parts2) {
            XmlElement newPart = null;
            if(introduceNewNS){
              XmlElement clone = wsdlMessagePart.xml().clone();
              String xmlAsString = BUILDER.serializeToString(clone).replaceAll(oldNSPrefix+":", nsPrefix+":");
View Full Code Here

              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())) {
View Full Code Here

            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){
View Full Code Here

    for (WsdlPortType wsdlPortType : servicePortTypes) {
     
      serviceOperation = wsdlPortType.getOperation(operationName);
      if(serviceOperation != null){
        QName inputMessageName = serviceOperation.getInput().getMessage();
        WsdlMessagePart part = WSDLUtil.getfirst(serviceWSDL.getMessage(inputMessageName.getLocalPart()).parts());
       
        nsPrefix = part.getElement().getPrefix();
        oldNSPrefix = nsPrefix;
        introduceNewNS = false;
        while( null != wsdl.xml().lookupNamespaceByPrefix(nsPrefix)){
          //this namespace is already there so keep adding control at the end and check for
          //its existance
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.