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 252257 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/wst/wsdl/validation/internal/wsdl11/WSDL11BasicValidator.java (-5 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2007 IBM Corporation and others.
2
 * Copyright (c) 2001, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 45-51 Link Here
45
import org.eclipse.wst.wsdl.validation.internal.wsdl11.xsd.SchemaAttributeTable;
45
import org.eclipse.wst.wsdl.validation.internal.wsdl11.xsd.SchemaAttributeTable;
46
import org.eclipse.wst.wsdl.validation.internal.wsdl11.xsd.XSDValidator;
46
import org.eclipse.wst.wsdl.validation.internal.wsdl11.xsd.XSDValidator;
47
47
48
import com.ibm.wsdl.Constants;
48
import com.ibm.wsdl.extensions.schema.SchemaConstants;
49
/**
49
/**
50
 * Validate the elements defined in a WSDL 1.1 Document.
50
 * Validate the elements defined in a WSDL 1.1 Document.
51
 */
51
 */
Lines 605-613 Link Here
605
    boolean partvalid = false;
605
    boolean partvalid = false;
606
    // First take care of the situation where it's from the schema namespace.
606
    // First take care of the situation where it's from the schema namespace.
607
    // The 1999, 2000 and 2001 schema namespaces are all accepted.
607
    // The 1999, 2000 and 2001 schema namespaces are all accepted.
608
    if (namespace.equals(Constants.NS_URI_XSD_2001)
608
    if (namespace.equals(SchemaConstants.NS_URI_XSD_2001)
609
      || namespace.equals(Constants.NS_URI_XSD_1999)
609
      || namespace.equals(SchemaConstants.NS_URI_XSD_1999)
610
      || namespace.equals(Constants.NS_URI_XSD_2000))
610
      || namespace.equals(SchemaConstants.NS_URI_XSD_2000))
611
    {
611
    {
612
      SchemaAttributeTable xsdTable = new SchemaAttributeTable();
612
      SchemaAttributeTable xsdTable = new SchemaAttributeTable();
613
      if (xsdTable.containsSymbol(name))
613
      if (xsdTable.containsSymbol(name))
(-)src/org/eclipse/wst/wsdl/validation/internal/wsdl11/WSDLDocument.java (-14 / +28 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2007 IBM Corporation and others.
2
 * Copyright (c) 2001, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 44-49 Link Here
44
import javax.wsdl.extensions.ExtensionDeserializer;
44
import javax.wsdl.extensions.ExtensionDeserializer;
45
import javax.wsdl.extensions.ExtensionRegistry;
45
import javax.wsdl.extensions.ExtensionRegistry;
46
import javax.wsdl.extensions.UnknownExtensibilityElement;
46
import javax.wsdl.extensions.UnknownExtensibilityElement;
47
import javax.wsdl.extensions.schema.Schema;
47
import javax.wsdl.factory.WSDLFactory;
48
import javax.wsdl.factory.WSDLFactory;
48
import javax.xml.namespace.QName;
49
import javax.xml.namespace.QName;
49
50
Lines 513-519 Link Here
513
    QName portTypeName;
514
    QName portTypeName;
514
    try
515
    try
515
    {
516
    {
516
      portTypeName = DOMUtils.getQualifiedAttributeValue(bindingEl, Constants.ATTR_TYPE, Constants.ELEM_BINDING, false);
517
      portTypeName = DOMUtils.getQualifiedAttributeValue(bindingEl, Constants.ATTR_TYPE, Constants.ELEM_BINDING, false, def);
517
    }
518
    }
518
    catch (Exception e)
519
    catch (Exception e)
519
    {
520
    {
Lines 962-969 Link Here
962
      }
963
      }
963
      else
964
      else
964
      {
965
      {
965
        // XML Validation will catch this
966
    	// message allows extensibility elements
966
        DOMUtils.throwWSDLException(tempEl);
967
        msg.addExtensibilityElement(parseExtensibilityElement(Message.class, tempEl, def));
967
      }
968
      }
968
969
969
      tempEl = DOMUtils.getNextSiblingElement(tempEl);
970
      tempEl = DOMUtils.getNextSiblingElement(tempEl);
Lines 991-997 Link Here
991
    QName elementName;
992
    QName elementName;
992
    try
993
    try
993
    {
994
    {
994
      elementName = DOMUtils.getQualifiedAttributeValue(partEl, Constants.ATTR_ELEMENT, Constants.ELEM_MESSAGE, false);
995
      elementName = DOMUtils.getQualifiedAttributeValue(partEl, Constants.ATTR_ELEMENT, Constants.ELEM_MESSAGE, false, def);
995
    }
996
    }
996
    catch (Exception e)
997
    catch (Exception e)
997
    {
998
    {
Lines 1004-1010 Link Here
1004
    {
1005
    {
1005
      typeName = DOMUtils.getQualifiedAttributeValue(partEl, Constants.ATTR_TYPE,
1006
      typeName = DOMUtils.getQualifiedAttributeValue(partEl, Constants.ATTR_TYPE,
1006
        // Corrected - was ATTR_ELEMENT
1007
        // Corrected - was ATTR_ELEMENT
1007
  Constants.ELEM_MESSAGE, false);
1008
  Constants.ELEM_MESSAGE, false, def);
1008
    }
1009
    }
1009
    catch (Exception e)
1010
    catch (Exception e)
1010
    {
1011
    {
Lines 1087-1093 Link Here
1087
1088
1088
          try
1089
          try
1089
          {
1090
          {
1090
            qValue = DOMUtils.getQName(strValue, el);
1091
            qValue = DOMUtils.getQName(strValue, el, def);
1091
          }
1092
          }
1092
          catch (WSDLException e)
1093
          catch (WSDLException e)
1093
          {
1094
          {
Lines 1232-1237 Link Here
1232
    Input input = null;
1233
    Input input = null;
1233
    Output output = null;
1234
    Output output = null;
1234
    List faults = new Vector();
1235
    List faults = new Vector();
1236
    List extElements = new ArrayList();
1235
1237
1236
    while (tempEl != null)
1238
    while (tempEl != null)
1237
    {
1239
    {
Lines 1255-1263 Link Here
1255
      }
1257
      }
1256
      else
1258
      else
1257
      {
1259
      {
1258
        // invalid element in the operation
1260
    	// operation allows extensibility elements
1259
        // XML check will catch this
1261
        extElements.add(parseExtensibilityElement(Operation.class, tempEl, def));
1260
        DOMUtils.throwWSDLException(tempEl);
1261
      }
1262
      }
1262
1263
1263
      tempEl = DOMUtils.getNextSiblingElement(tempEl);
1264
      tempEl = DOMUtils.getNextSiblingElement(tempEl);
Lines 1450-1455 Link Here
1450
        }
1451
        }
1451
      }
1452
      }
1452
    }
1453
    }
1454
    
1455
    if (extElements.size() > 0)
1456
    {
1457
      Iterator extElementsIterator = extElements.iterator();
1458
      while (extElementsIterator.hasNext())
1459
      {
1460
          op.addExtensibilityElement((ExtensibilityElement)extElementsIterator.next());
1461
      }
1462
    }
1453
1463
1454
    OperationType style = null;
1464
    OperationType style = null;
1455
1465
Lines 1555-1561 Link Here
1555
    QName bindingStr;
1565
    QName bindingStr;
1556
    try
1566
    try
1557
    {
1567
    {
1558
      bindingStr = DOMUtils.getQualifiedAttributeValue(portEl, Constants.ATTR_BINDING, Constants.ELEM_PORT, false);
1568
      bindingStr = DOMUtils.getQualifiedAttributeValue(portEl, Constants.ATTR_BINDING, Constants.ELEM_PORT, false, def);
1559
    }
1569
    }
1560
    catch (Exception e)
1570
    catch (Exception e)
1561
    {
1571
    {
Lines 1676-1682 Link Here
1676
    QName messageName = null;
1686
    QName messageName = null;
1677
    try
1687
    try
1678
    {
1688
    {
1679
      messageName = DOMUtils.getQualifiedAttributeValue(inputEl, Constants.ATTR_MESSAGE, Constants.ELEM_INPUT, false);
1689
      messageName = DOMUtils.getQualifiedAttributeValue(inputEl, Constants.ATTR_MESSAGE, Constants.ELEM_INPUT, false, def);
1680
    }
1690
    }
1681
    catch (Exception e)
1691
    catch (Exception e)
1682
    {
1692
    {
Lines 1741-1747 Link Here
1741
    QName messageName = null;
1751
    QName messageName = null;
1742
    try
1752
    try
1743
    {
1753
    {
1744
      messageName = DOMUtils.getQualifiedAttributeValue(outputEl, Constants.ATTR_MESSAGE, Constants.ELEM_OUTPUT, false);
1754
      messageName = DOMUtils.getQualifiedAttributeValue(outputEl, Constants.ATTR_MESSAGE, Constants.ELEM_OUTPUT, false, def);
1745
    }
1755
    }
1746
    catch (Exception e)
1756
    catch (Exception e)
1747
    {
1757
    {
Lines 1806-1812 Link Here
1806
    QName messageName = null;
1816
    QName messageName = null;
1807
    try
1817
    try
1808
    {
1818
    {
1809
      messageName = DOMUtils.getQualifiedAttributeValue(faultEl, Constants.ATTR_MESSAGE, Constants.ELEM_INPUT, false);
1819
      messageName = DOMUtils.getQualifiedAttributeValue(faultEl, Constants.ATTR_MESSAGE, Constants.ELEM_INPUT, false, def);
1810
    }
1820
    }
1811
    catch (Exception e)
1821
    catch (Exception e)
1812
    {
1822
    {
Lines 1929-1934 Link Here
1929
    {
1939
    {
1930
      Element elem = ((UnknownExtensibilityElement)extElem).getElement();
1940
      Element elem = ((UnknownExtensibilityElement)extElem).getElement();
1931
      registerChildElementsRecursively(elem);
1941
      registerChildElementsRecursively(elem);
1942
    } else if (extElem instanceof Schema)
1943
    {
1944
        Element elem = ((Schema)extElem).getElement();
1945
        registerChildElementsRecursively(elem);
1932
    }
1946
    }
1933
  }
1947
  }
1934
1948
(-)src/org/eclipse/wst/wsdl/validation/internal/wsdl11/WSDLReaderImpl.java (-3 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2005 IBM Corporation and others.
2
 * Copyright (c) 2001, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 11-17 Link Here
11
11
12
package org.eclipse.wst.wsdl.validation.internal.wsdl11;
12
package org.eclipse.wst.wsdl.validation.internal.wsdl11;
13
13
14
import java.io.Reader;
14
import java.io.InputStream;
15
import java.net.URL;
15
import java.net.URL;
16
import java.util.ArrayList;
16
import java.util.ArrayList;
17
import java.util.Hashtable;
17
import java.util.Hashtable;
Lines 346-352 Link Here
346
    {
346
    {
347
      URL contextURL = (contextURI != null) ? StringUtils.getURL(null, contextURI) : null;
347
      URL contextURL = (contextURI != null) ? StringUtils.getURL(null, contextURI) : null;
348
      URL url = StringUtils.getURL(contextURL, wsdlURI);
348
      URL url = StringUtils.getURL(contextURL, wsdlURI);
349
      Reader reader = StringUtils.getContentAsReader(url);
349
      InputStream reader = StringUtils.getContentAsInputStream(url);
350
      InputSource inputSource = new InputSource(reader);
350
      InputSource inputSource = new InputSource(reader);
351
      Document doc = getDocument(inputSource, wsdlURI);
351
      Document doc = getDocument(inputSource, wsdlURI);
352
      reader.close();
352
      reader.close();
(-)src/org/eclipse/wst/wsdl/validation/internal/wsdl11/ImportHolder.java (-5 / +6 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2006 IBM Corporation and others.
2
 * Copyright (c) 2001, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 13-19 Link Here
13
13
14
import java.io.File;
14
import java.io.File;
15
import java.io.IOException;
15
import java.io.IOException;
16
import java.io.Reader;
16
import java.io.InputStream;
17
import java.net.URL;
17
import java.net.URL;
18
import java.util.ArrayList;
18
import java.util.ArrayList;
19
import java.util.Iterator;
19
import java.util.Iterator;
Lines 39-44 Link Here
39
import org.xml.sax.InputSource;
39
import org.xml.sax.InputSource;
40
40
41
import com.ibm.wsdl.Constants;
41
import com.ibm.wsdl.Constants;
42
import com.ibm.wsdl.extensions.schema.SchemaConstants;
42
import com.ibm.wsdl.util.StringUtils;
43
import com.ibm.wsdl.util.StringUtils;
43
import com.ibm.wsdl.util.xml.DOMUtils;
44
import com.ibm.wsdl.util.xml.DOMUtils;
44
import com.ibm.wsdl.util.xml.QNameUtils;
45
import com.ibm.wsdl.util.xml.QNameUtils;
Lines 143-149 Link Here
143
        }
144
        }
144
      }
145
      }
145
      // Handle schema imports.
146
      // Handle schema imports.
146
      else if (QNameUtils.matches(Constants.Q_ELEM_XSD_2001, documentElement))
147
      else if (QNameUtils.matches(SchemaConstants.Q_ELEM_XSD_2001, documentElement))
147
      {
148
      {
148
        createXSDImport();
149
        createXSDImport();
149
      }
150
      }
Lines 273-279 Link Here
273
//      locationURI = classpathURI;
274
//      locationURI = classpathURI;
274
//      contextURI = null;
275
//      contextURI = null;
275
//    }
276
//    }
276
    Reader reader = null;
277
    InputStream reader = null;
277
    if (locationURI != null)
278
    if (locationURI != null)
278
    {
279
    {
279
        try
280
        try
Lines 321-327 Link Here
321
			{
322
			{
322
			  try
323
			  try
323
			  {
324
			  {
324
                reader = StringUtils.getContentAsReader(url);
325
                reader = StringUtils.getContentAsInputStream(url);
325
			  }
326
			  }
326
			  catch(IOException e)
327
			  catch(IOException e)
327
			  {
328
			  {
(-)META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 24-30 Link Here
24
 org.apache.ant;bundle-version="[1.6.5,2.0.0)";resolution:=optional,
24
 org.apache.ant;bundle-version="[1.6.5,2.0.0)";resolution:=optional,
25
 org.eclipse.wst.common.uriresolver;bundle-version="[1.1.0,1.2.0)",
25
 org.eclipse.wst.common.uriresolver;bundle-version="[1.1.0,1.2.0)",
26
 org.eclipse.wst.validation;bundle-version="[1.2.0,1.3.0)",
26
 org.eclipse.wst.validation;bundle-version="[1.2.0,1.3.0)",
27
 javax.wsdl;bundle-version="[1.4.0,1.5.0)",
27
 javax.wsdl;bundle-version="[1.5.0,1.6.0)",
28
 org.apache.xerces;bundle-version="[2.8.0,3.0.0)";visibility:=reexport,
28
 org.apache.xerces;bundle-version="[2.8.0,3.0.0)";visibility:=reexport,
29
 org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
29
 org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
30
 org.eclipse.wst.xml.core;bundle-version="[1.1.0,1.2.0)"
30
 org.eclipse.wst.xml.core;bundle-version="[1.1.0,1.2.0)"
(-)src/org/eclipse/wst/wsdl/validation/internal/wsdl11/xsd/InlineSchemaGenerator.java (-7 / +7 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2006 IBM Corporation and others.
2
 * Copyright (c) 2001, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 25-31 Link Here
25
import org.w3c.dom.Node;
25
import org.w3c.dom.Node;
26
import org.w3c.dom.NodeList;
26
import org.w3c.dom.NodeList;
27
27
28
import com.ibm.wsdl.Constants;
28
import com.ibm.wsdl.extensions.schema.SchemaConstants;
29
29
30
/**
30
/**
31
 * Generate a String representation of a schema for an inline schema. Will add imports for unresolved
31
 * Generate a String representation of a schema for an inline schema. Will add imports for unresolved
Lines 54-60 Link Here
54
  protected static final String TYPE = "type";
54
  protected static final String TYPE = "type";
55
  protected static final String NAME = "name";
55
  protected static final String NAME = "name";
56
  protected static final String[] ignoreNamespaces =
56
  protected static final String[] ignoreNamespaces =
57
    { Constants.NS_URI_XSD_1999, Constants.NS_URI_XSD_2000, Constants.NS_URI_XSD_2001 };
57
    { SchemaConstants.NS_URI_XSD_1999, SchemaConstants.NS_URI_XSD_2000, SchemaConstants.NS_URI_XSD_2001 };
58
58
59
  protected static InlineSchemaGenerator instance = null;
59
  protected static InlineSchemaGenerator instance = null;
60
60
Lines 252-260 Link Here
252
          }
252
          }
253
        }
253
        }
254
        // Replace old schema namespaces with the new schema namespace.
254
        // Replace old schema namespaces with the new schema namespace.
255
        if(nodeValue.equals(Constants.NS_URI_XSD_1999) || nodeValue.equals(Constants.NS_URI_XSD_2000))
255
        if(nodeValue.equals(SchemaConstants.NS_URI_XSD_1999) || nodeValue.equals(SchemaConstants.NS_URI_XSD_2000))
256
         {
256
         {
257
          nodeValue = Constants.NS_URI_XSD_2001;
257
          nodeValue = SchemaConstants.NS_URI_XSD_2001;
258
        }
258
        }
259
        xsdString.append(nodeValue).append("\"");
259
        xsdString.append(nodeValue).append("\"");
260
      }
260
      }
Lines 271-279 Link Here
271
      {
271
      {
272
        String key = (String)keys.nextElement();
272
        String key = (String)keys.nextElement();
273
        String declNS = (String)reqNSDecl.get(key);
273
        String declNS = (String)reqNSDecl.get(key);
274
        if(declNS.equals(Constants.NS_URI_XSD_1999) || declNS.equals(Constants.NS_URI_XSD_2000))
274
        if(declNS.equals(SchemaConstants.NS_URI_XSD_1999) || declNS.equals(SchemaConstants.NS_URI_XSD_2000))
275
         {
275
         {
276
          declNS = Constants.NS_URI_XSD_2001;
276
          declNS = SchemaConstants.NS_URI_XSD_2001;
277
        }
277
        }
278
        xsdString.append(" ").append(key).append("=\"").append(declNS).append("\"");
278
        xsdString.append(" ").append(key).append("=\"").append(declNS).append("\"");
279
      }
279
      }
(-)src/org/eclipse/wst/wsdl/validation/internal/wsdl11/xsd/InlineSchemaValidator.java (-8 / +9 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2006 IBM Corporation and others.
2
 * Copyright (c) 2001, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 21-27 Link Here
21
21
22
import javax.wsdl.Definition;
22
import javax.wsdl.Definition;
23
import javax.wsdl.Types;
23
import javax.wsdl.Types;
24
import javax.wsdl.extensions.UnknownExtensibilityElement;
24
import javax.wsdl.extensions.schema.Schema;
25
25
26
import org.apache.xerces.xs.XSModel;
26
import org.apache.xerces.xs.XSModel;
27
import org.eclipse.wst.wsdl.validation.internal.util.ErrorMessage;
27
import org.eclipse.wst.wsdl.validation.internal.util.ErrorMessage;
Lines 33-38 Link Here
33
import org.w3c.dom.Node;
33
import org.w3c.dom.Node;
34
34
35
import com.ibm.wsdl.Constants;
35
import com.ibm.wsdl.Constants;
36
import com.ibm.wsdl.extensions.schema.SchemaConstants;
36
37
37
/**
38
/**
38
 * Plugin validator for the WSDL Validation framework. Validates inline schema found in a WSDL document.
39
 * Plugin validator for the WSDL Validation framework. Validates inline schema found in a WSDL document.
Lines 67-73 Link Here
67
  public void validate(Object element, List parents, IWSDL11ValidationInfo valInfo)
68
  public void validate(Object element, List parents, IWSDL11ValidationInfo valInfo)
68
  {
69
  {
69
  	List elements = new ArrayList();
70
  	List elements = new ArrayList();
70
    UnknownExtensibilityElement elem = (UnknownExtensibilityElement) element;
71
  	Schema elem = (Schema) element;
71
    Definition wsdlDefinition = (Definition) parents.get(parents.size() - 1);
72
    Definition wsdlDefinition = (Definition) parents.get(parents.size() - 1);
72
    String baseLocation = wsdlDefinition.getDocumentBaseURI();
73
    String baseLocation = wsdlDefinition.getDocumentBaseURI();
73
    // Add in the namespaces defined in the doc already that aren't defined locally in this schema.
74
    // Add in the namespaces defined in the doc already that aren't defined locally in this schema.
Lines 89-98 Link Here
89
	
90
	
90
    // If the namespace given is one of the old schema namespaces produce a warning.
91
    // If the namespace given is one of the old schema namespaces produce a warning.
91
	String namespace = w3celement.getNamespaceURI();
92
	String namespace = w3celement.getNamespaceURI();
92
	if(namespace.equals(Constants.NS_URI_XSD_1999) || namespace.equals(Constants.NS_URI_XSD_2000))
93
	if(namespace.equals(SchemaConstants.NS_URI_XSD_1999) || namespace.equals(SchemaConstants.NS_URI_XSD_2000))
93
	 {
94
	 {
94
	  valInfo.addWarning(
95
	  valInfo.addWarning(
95
	      messagegenerator.getString(_WARN_OLD_SCHEMA_NAMESPACE, QUOTE + Constants.NS_URI_XSD_2001 + QUOTE), element);
96
	      messagegenerator.getString(_WARN_OLD_SCHEMA_NAMESPACE, QUOTE + SchemaConstants.NS_URI_XSD_2001 + QUOTE), element);
96
	}
97
	}
97
	
98
	
98
    // now create and call the validator for the inline schema
99
    // now create and call the validator for the inline schema
Lines 182-188 Link Here
182
	  Set namespaces = new TreeSet(); 
183
	  Set namespaces = new TreeSet(); 
183
      while (iSchemas.hasNext()) 
184
      while (iSchemas.hasNext()) 
184
      { 
185
      { 
185
        UnknownExtensibilityElement extElem = (UnknownExtensibilityElement) iSchemas.next(); 
186
        Schema extElem = (Schema) iSchemas.next(); 
186
        String thisNamespace = extElem.getElement().getAttribute(Constants.ATTR_TARGET_NAMESPACE); 
187
        String thisNamespace = extElem.getElement().getAttribute(Constants.ATTR_TARGET_NAMESPACE); 
187
        if(thisNamespace != null) 
188
        if(thisNamespace != null) 
188
        { 
189
        { 
Lines 193-199 Link Here
193
194
194
      while (iSchemas.hasNext())
195
      while (iSchemas.hasNext())
195
      {
196
      {
196
        UnknownExtensibilityElement extElem = (UnknownExtensibilityElement) iSchemas.next();
197
    	  Schema extElem = (Schema) iSchemas.next();
197
        String thisNamespace = extElem.getElement().getAttribute(Constants.ATTR_TARGET_NAMESPACE);
198
        String thisNamespace = extElem.getElement().getAttribute(Constants.ATTR_TARGET_NAMESPACE);
198
        if (thisNamespace != null && !thisNamespace.equalsIgnoreCase(targetNamespace))
199
        if (thisNamespace != null && !thisNamespace.equalsIgnoreCase(targetNamespace))
199
        {
200
        {
Lines 302-308 Link Here
302
   */
303
   */
303
  private String replaceNamespace(String message, String namespace)
304
  private String replaceNamespace(String message, String namespace)
304
   {
305
   {
305
     String xsd2001 = Constants.NS_URI_XSD_2001;
306
     String xsd2001 = SchemaConstants.NS_URI_XSD_2001;
306
     int start = message.indexOf(xsd2001);
307
     int start = message.indexOf(xsd2001);
307
     int end = start + xsd2001.length();
308
     int end = start + xsd2001.length();
308
     if(start < 0)
309
     if(start < 0)
(-)src/org/eclipse/wst/wsdl/validation/internal/xml/LineNumberDOMParser.java (-3 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2005 IBM Corporation and others.
2
 * Copyright (c) 2001, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 26-32 Link Here
26
import org.xml.sax.SAXNotRecognizedException;
26
import org.xml.sax.SAXNotRecognizedException;
27
import org.xml.sax.SAXNotSupportedException;
27
import org.xml.sax.SAXNotSupportedException;
28
28
29
import com.ibm.wsdl.Constants;
29
import com.ibm.wsdl.extensions.schema.SchemaConstants;
30
30
31
/**
31
/**
32
 * A DOM parser that will register location information with the elements in the model.
32
 * A DOM parser that will register location information with the elements in the model.
Lines 107-113 Link Here
107
    // For elements from the Schema namespace we want to preserve them
107
    // For elements from the Schema namespace we want to preserve them
108
    // the way they were entered. Revert the values to the non-normalized values.
108
    // the way they were entered. Revert the values to the non-normalized values.
109
    String ns = arg0.uri;
109
    String ns = arg0.uri;
110
    if(ns != null && (ns.equals(Constants.NS_URI_XSD_2001) || ns.equals(Constants.NS_URI_XSD_1999) || ns.equals(Constants.NS_URI_XSD_2000)))
110
    if(ns != null && (ns.equals(SchemaConstants.NS_URI_XSD_2001) || ns.equals(SchemaConstants.NS_URI_XSD_1999) || ns.equals(SchemaConstants.NS_URI_XSD_2000)))
111
    {
111
    {
112
      int numatts = arg1.getLength();
112
      int numatts = arg1.getLength();
113
      for(int i = 0; i < numatts; i++)
113
      for(int i = 0; i < numatts; i++)
(-)src/org/eclipse/wst/wsdl/validation/internal/xml/DefaultXMLValidator.java (-6 / +7 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2001, 2006 IBM Corporation and others.
2
 * Copyright (c) 2001, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 47-52 Link Here
47
import org.xml.sax.helpers.DefaultHandler;
47
import org.xml.sax.helpers.DefaultHandler;
48
48
49
import com.ibm.wsdl.Constants;
49
import com.ibm.wsdl.Constants;
50
import com.ibm.wsdl.extensions.schema.SchemaConstants;
50
51
51
/**
52
/**
52
 * The default implementation of IXMLValidator.
53
 * The default implementation of IXMLValidator.
Lines 81-89 Link Here
81
  {
82
  {
82
    super();
83
    super();
83
    
84
    
84
    ignoredNamespaceList.add(Constants.NS_URI_XSD_1999);
85
    ignoredNamespaceList.add(SchemaConstants.NS_URI_XSD_1999);
85
    ignoredNamespaceList.add(Constants.NS_URI_XSD_2000);
86
    ignoredNamespaceList.add(SchemaConstants.NS_URI_XSD_2000);
86
    ignoredNamespaceList.add(Constants.NS_URI_XSD_2001);
87
    ignoredNamespaceList.add(SchemaConstants.NS_URI_XSD_2001);
87
    
88
    
88
    adjustLocationErrorKeySet.add("cvc-complex-type.2.4.b");
89
    adjustLocationErrorKeySet.add("cvc-complex-type.2.4.b");
89
    adjustLocationErrorKeySet.add("cvc-complex-type.2.3");
90
    adjustLocationErrorKeySet.add("cvc-complex-type.2.3");
Lines 265-271 Link Here
265
	 */
266
	 */
266
	public void endElement(String uri, String localName, String qName)
267
	public void endElement(String uri, String localName, String qName)
267
			throws SAXException {
268
			throws SAXException {
268
		if(localName.equals("documentation") && (uri.equals(Constants.NS_URI_WSDL) || uri.equals(Constants.NS_URI_XSD_2001)|| uri.equals(Constants.NS_URI_XSD_1999) || uri.equals(Constants.NS_URI_XSD_2000)))
269
		if(localName.equals("documentation") && (uri.equals(Constants.NS_URI_WSDL) || uri.equals(SchemaConstants.NS_URI_XSD_2001)|| uri.equals(SchemaConstants.NS_URI_XSD_1999) || uri.equals(SchemaConstants.NS_URI_XSD_2000)))
269
		{
270
		{
270
		  isChildOfDoc = false;
271
		  isChildOfDoc = false;
271
		}
272
		}
Lines 278-284 Link Here
278
	public void startElement(String uri, String localName, String qName,
279
	public void startElement(String uri, String localName, String qName,
279
			Attributes atts) throws SAXException {
280
			Attributes atts) throws SAXException {
280
		startElementLocations.push(new LocationCoordinate(locator.getLineNumber(), locator.getColumnNumber()));
281
		startElementLocations.push(new LocationCoordinate(locator.getLineNumber(), locator.getColumnNumber()));
281
		if(localName.equals("documentation") && (uri.equals(Constants.NS_URI_WSDL) || uri.equals(Constants.NS_URI_XSD_2001)|| uri.equals(Constants.NS_URI_XSD_1999) || uri.equals(Constants.NS_URI_XSD_2000)))
282
		if(localName.equals("documentation") && (uri.equals(Constants.NS_URI_WSDL) || uri.equals(SchemaConstants.NS_URI_XSD_2001)|| uri.equals(SchemaConstants.NS_URI_XSD_1999) || uri.equals(SchemaConstants.NS_URI_XSD_2000)))
282
		{
283
		{
283
		  isChildOfDoc = true;
284
		  isChildOfDoc = true;
284
		}
285
		}

Return to bug 252257