Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 198390 | Differences between
and this patch

Collapse All | Expand All

(-)src-wsdl/org/eclipse/wst/wsdl/internal/impl/WSDLElementImpl.java (-4 / +23 lines)
Lines 1589-1598 Link Here
1589
    int index = name.indexOf(":");
1589
    int index = name.indexOf(":");
1590
    if (index == -1)
1590
    if (index == -1)
1591
      return null;
1591
      return null;
1592
    else if (getEnclosingDefinition() != null)
1592
1593
      return getEnclosingDefinition().getNamespace(name.substring(0, index));
1593
    Definition enclosingDefinition = getEnclosingDefinition();
1594
    else
1594
    
1595
      return null;
1595
    String namespaceURI = null;
1596
1597
    if (enclosingDefinition != null)
1598
    {
1599
      String prefix = name.substring(0, index);
1600
      
1601
      // First try to locate the namespace URI in the definition's prefix to namespace map.
1602
      // This will provide backward compatibility for existing clients.
1603
      
1604
      namespaceURI = enclosingDefinition.getNamespace(prefix);
1605
      
1606
      if (namespaceURI == null)
1607
      {
1608
        // We did not find it at the tope level, try to find a locally defined namespace prefix.
1609
1610
        namespaceURI = getNamespaceURIFromPrefix(element, prefix);
1611
      }
1612
    }
1613
1614
    return namespaceURI;
1596
  }
1615
  }
1597
1616
1598
  protected String getLocalName(Element element)
1617
  protected String getLocalName(Element element)

Return to bug 198390