Package org.eclipse.wst.wsdl

Examples of org.eclipse.wst.wsdl.PortType


      {
        binding.setQName(new QName(binding.getQName().getNamespaceURI(), getName()));
      }
      if (getRefName() != null)
      {
        PortType portType = getPortType();
        binding.setEPortType(portType);
        if (portType == null)
        {
          //The model doesn't reconile with it's Element properly when we're setting a null for it's PortType
          binding.getElement().setAttribute("type", "");
        }
      }

      List bindingOperations = binding.getEBindingOperations();
      PortType portType = binding.getEPortType();

      if (!getOverwrite())
      {
        // Don't Overwrite
        if (portType == null)
        {
          return binding;
        }
        else
        {
          List operations = portType.getOperations();

          /*******************************************************************************
           * Determine which Operations require new a new corresponding BindingOperations
           *******************************************************************************/
          List newBindingOpsNeeded = new ArrayList();
          for (int index = 0; index < operations.size(); index++)
          {
            Operation operation = (Operation)operations.get(index);

            boolean foundMatch = false;
            Iterator bindingOperationsIt = bindingOperations.iterator();
            while (bindingOperationsIt.hasNext())
            {
              BindingOperation bindingOperation = (BindingOperation)bindingOperationsIt.next();

              if (namesEqual(bindingOperation.getName(), operation.getName()))
              {
                foundMatch = true;
                break;
              }
            }

            if (!foundMatch)
            {
              newBindingOpsNeeded.add(operation);
            }
          }
          // newBindingOpsNeeded is the List of Operations needing new corresponding
          // BindingOperation's
          List newBindingOps = createNewBindingOperations(newBindingOpsNeeded);

          // don't add required namespace if nothing is really being added
          if (!newBindingOps.isEmpty()) {
            addRequiredNamespaces(binding);           
          }
         
          // Generate the contents of the new BindingOperation's
          Iterator newBindingOpsIt = newBindingOps.iterator();
          while (newBindingOpsIt.hasNext())
          {
            BindingOperation newBindingOp = (BindingOperation)newBindingOpsIt.next();
            generateBindingOperation(newBindingOp);
            generateBindingOperationContent(newBindingOp);
          }
        }

        generateBindingContent(binding);
      }
      else
      {
        // Overwrite
        if (portType == null)
        {
          // We need to blow away everything under the Binding.  No PortType associated with this Binding
          bindingOperations.clear();
          return binding;
        }
        else
        {
          addRequiredNamespaces(binding);
          List operations = portType.getOperations();

          /******************************************************
           * Compare the Operations
           ******************************************************/
          // Remove any BindingOperations which are no longer used
View Full Code Here


    {
      Iterator portTypeIt = definition.getEPortTypes().iterator();

      while (portTypeIt.hasNext())
      {
        PortType pt = (PortType)portTypeIt.next();
        List prefixedNames = getPrefixedNames(pt);
        if (prefixedNames.contains(getRefName()))
        {
          return pt;
        }
View Full Code Here

  public void reconcileReferences(boolean deep)
  {
    if (element != null)
    {
      Binding binding = (Binding)getContainer();
      PortType portType = binding.getEPortType();
      if (portType != null)
      {
        BindingInput input = getEBindingInput();
        BindingOutput output = getEBindingOutput();

        String inputName = input != null ? input.getName() : null;
        String outputName = output != null ? output.getName() : null;

        setOperation(portType.getOperation(getName(), inputName, outputName));
      }
    }
    super.reconcileReferences(deep);
  }
View Full Code Here

  }

  private List getList(Object component, Object modelObject)
  {
    List result = null;
    PortType portType = (PortType)component;
    if (modelObject instanceof Operation)
    {
      result = portType.getEOperations();
    }
    else if (modelObject instanceof ExtensibilityElement)
    {
      result = getExtensibilityElements();
    }
View Full Code Here

    return result;
  }

  public Collection getModelObjects(Object component)
  {
    PortType portType = (PortType)component;

    List list = portType.getEOperations();
    return list;
  }
View Full Code Here

   * <!-- end-user-doc -->
   * @generated
   */
  public void setEPortType(PortType newEPortType)
  {
    PortType oldEPortType = ePortType;
    ePortType = newEPortType;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, WSDLPackage.BINDING__EPORT_TYPE, oldEPortType, ePortType));
  }
View Full Code Here

    Element theElement = getElement();
    if (theElement != null)
    {
      if (eReference == null || eReference == WSDLPackage.Literals.BINDING__EPORT_TYPE)
      {
        PortType portType = getEPortType();
        if (portType != null)
        {
          QName qName = portType.getQName();
          niceSetAttributeURIValue(theElement, WSDLConstants.TYPE_ATTRIBUTE, qName.getNamespaceURI() + "#" + qName.getLocalPart());
        }
      }
    }
  }
View Full Code Here

  {
    if (element != null)
    {
      Definition definition = (Definition)getEnclosingDefinition();
      QName portTypeQName = createQName(definition, element.getAttribute(WSDLConstants.TYPE_ATTRIBUTE), element);
      PortType newPortType = portTypeQName != null ? (PortType)definition.getPortType(portTypeQName) : null;
      if (newPortType != getEPortType())
      {
        setEPortType(newPortType);
      }
    }
View Full Code Here

        addMessage(message);
        break;
      }
      case WSDLConstants.PORT_TYPE:
      {
        PortType portType = WSDLFactory.eINSTANCE.createPortType();
        portType.setEnclosingDefinition(this);
        portType.setElement(child);
        addPortType(portType);
        break;
      }
      case WSDLConstants.SERVICE:
      {
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public void setPortType(PortType newPortType) {
    PortType oldPortType = portType;
    portType = newPortType;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, BPELPackage.PARTNER_ACTIVITY__PORT_TYPE, oldPortType, portType));
  }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.wsdl.PortType

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.