Package org.eclipse.wst.wsdl

Examples of org.eclipse.wst.wsdl.Definition


  }

  public Collection getModelObjects(Object component)
  {
    List list = new ArrayList();
    Definition definition = (Definition)component;
    list.addAll(definition.getEImports());
    list.add(definition.getETypes());
    list.addAll(definition.getEMessages());
    list.addAll(definition.getEPortTypes());
    list.addAll(definition.getEBindings());
    list.addAll(definition.getEServices());
    list.addAll(definition.getEExtensibilityElements());
    return list;
  }
View Full Code Here


    for (Iterator i = getImports(namespace).iterator(); i.hasNext();)
    {
      Import theImport = (Import)i.next();
      ((ImportImpl)theImport).importDefinitionOrSchema();
      Definition importedDefinition = theImport.getEDefinition();
      if (importedDefinition != null && WSDLConstants.isMatchingNamespace(namespace, importedDefinition.getTargetNamespace()))
      {
        list.add(importedDefinition);
      }
    }
View Full Code Here

  {
    Iterator componentsIterator = componentsList.iterator();
    while (componentsIterator.hasNext())
    {
      WSDLElement wsdlElement = (WSDLElement)componentsIterator.next();
      Definition enclosingDefinition = wsdlElement.getEnclosingDefinition();
      if (enclosingDefinition != null)
      {
        String targetNamespace = enclosingDefinition.getTargetNamespace();

        QName componentQName = getQNameForWSDLElement(componentType, wsdlElement);

        if (componentQName != null)
        {
View Full Code Here

  protected String getNamespace(EObject object) {
    String namespace = null;
    if (object instanceof IBPELServicesProxy) {
      return ((IBPELServicesProxy)object).getQName().getNamespaceURI();
    } else if (object instanceof PartnerLinkType || object instanceof Property) {
      Definition def = ((org.eclipse.wst.wsdl.ExtensibilityElement)object).getEnclosingDefinition();
      if (def != null) {
        namespace = def.getTargetNamespace();
      }
    } else if (object instanceof XSDNamedComponent) {
      return ((XSDNamedComponent)object).getTargetNamespace();     
    } else {
      for(Iterator featureIt = object.eClass().getEAllAttributes().iterator(); featureIt.hasNext() && namespace == null; ) {
View Full Code Here

       
        if (imp.getLocation() == null) {
          return result ;
        }
       
        Definition definition = findAndLoad ( imp , "wsdl" );
       
        if (refType.equals(TOP)) {
          return definition;
        }
       
View Full Code Here

   
    if (getImportType().equals(imp.getImportType()) == false) {
          return Collections.emptyList();
        }
   
        Definition definition = findAndLoad ( imp , "wsdl" );
       
        if (definition == null) {
          return Collections.emptyList();
        }
       
        if (what == RESOLVE_DEFINITION) {
          ArrayList<Object> al = new ArrayList<Object>(1);
          al.add(definition);
          return al;
        }
       
        if (definition.getETypes() == null) {
          return Collections.emptyList();
        }
       
        return definition.getETypes().getSchemas();         
  }
View Full Code Here

      reconcileReferences(false);
  }

  public void reconcileReferences(boolean deep) {
    Definition definition = getEnclosingDefinition();
    Element element = getElement();
    if (element != null && element.hasAttribute(MessagepropertiesConstants.PROPERTY_ALIAS_PROPERTY_NAME_ATTRIBUTE))
      {
      if (definition != null)
      {
          QName qname = createQName(definition, element.getAttribute(MessagepropertiesConstants.PROPERTY_ALIAS_PROPERTY_NAME_ATTRIBUTE));
          // resolve the qname to a property
          // TODO could this reference an imported property?
          for (Iterator i = definition.getExtensibilityElements().iterator(); i.hasNext();)
          {
            ExtensibilityElement extensibilityElement = (ExtensibilityElement) i.next();
            if (extensibilityElement instanceof Property)
            {
              Property property = (Property) extensibilityElement;
              if (property.getQName().equals(qname) && property != getPropertyName())
              {
                setPropertyName(property);
                break;
              }
            }
          }
      }
      }
    if (element != null && element.hasAttribute(MessagepropertiesConstants.PROPERTY_ALIAS_MESSAGE_TYPE_ATTRIBUTE))
      {
      if (definition != null)
      {
          QName messageQName = createQName(definition, element.getAttribute(MessagepropertiesConstants.PROPERTY_ALIAS_MESSAGE_TYPE_ATTRIBUTE));
          Message newMessage = (messageQName != null) ? (Message) definition.getMessage(messageQName) : null;
          if (newMessage != null && newMessage!=  getMessageType())
            setMessageType(newMessage);
      }
      } else {
        setMessageType(null);
View Full Code Here

    }
   
    // Reconcile the PortType reference.
    if (element != null && element.hasAttribute(PartnerlinktypeConstants.PORT_TYPE_ATTRIBUTE))
      {
        Definition definition = getEnclosingDefinition();
        if (definition != null)
        {
          QName portTypeQName = createQName(definition, element.getAttribute(PartnerlinktypeConstants.PORT_TYPE_ATTRIBUTE));
         
          PortType newPortType = null;
View Full Code Here

  }

  public void reconcileReferences(boolean deep) {
    if (element != null && element.hasAttribute(MessagepropertiesConstants.PROPERTY_TYPE_ATTRIBUTE))
      {
        Definition definition = getEnclosingDefinition();
        QName qname = createQName(definition, element.getAttribute(MessagepropertiesConstants.PROPERTY_TYPE_ATTRIBUTE));
        if (qname != null) {
          XSDTypeDefinition xsdType = ((DefinitionImpl) definition).resolveTypeDefinition(qname.getNamespaceURI(), qname.getLocalPart());
          if (xsdType != null && getType() != xsdType) {
            setType(xsdType);
View Full Code Here


public class BPELServicesUtility {
  static public QName getQName(Property property) {
    QName qname;
    Definition def = property.getEnclosingDefinition();
    if (def == null) {
      qname = new QName(property.getName());
    } else {
      qname = new QName(def.getTargetNamespace(), property.getName());
    }
    return qname;
  }
View Full Code Here

TOP

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

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.