Author: jkaputin
Date: Tue Oct 25 14:06:12 2005
New Revision: 328483
URL: http://svn.apache.org/viewcvs?rev=328483&view=rev
Log:
Modified all calls to ErrorReporter.reportError to
include the ErrorLocator arg.
Modified:
incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java
Modified: incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java
URL:
http://svn.apache.org/viewcvs/incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java?rev=328483&r1=328482&r2=328483&view=diff
==============================================================================
--- incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java
(original)
+++ incubator/woden/java/src/org/apache/woden/internal/DOMWSDLReader.java Tue
Oct 25 14:06:12 2005
@@ -161,6 +161,7 @@
//The targetNamespace attribute is REQUIRED on wsdl:description.
//(WSDL 2.0 W3C spec, Part 2: 2.1.2)
getErrorReporter().reportError(
+ new ErrorLocatorImpl(), //TODO line/col nos.
"WSDL009",
new Object[] {documentBaseURI},
ErrorReporter.SEVERITY_FATAL_ERROR);
@@ -389,9 +390,11 @@
fault.setElement(qname);
} catch (WSDLException e) {
//report the parse-time error and let the validator handle it.
- getErrorReporter().reportError("WSDL504",
- new Object[] {"element", "fault"},
- ErrorReporter.SEVERITY_ERROR);
+ getErrorReporter().reportError(
+ new ErrorLocatorImpl(), //TODO line&col nos.
+ "WSDL504",
+ new Object[] {"element", "fault"},
+ ErrorReporter.SEVERITY_ERROR);
//TODO if validation is off and continue-on-error is off,
terminate here
}
@@ -512,6 +515,7 @@
//Bad qname, so report the error, leave
property's constraint
//field null and let validator handle it later.
getErrorReporter().reportError(
+ new ErrorLocatorImpl(), //TODO
line&col nos.
"WSDL504",
new Object[] {textValue,
tempEl.getLocalName()},
ErrorReporter.SEVERITY_ERROR,
@@ -553,7 +557,10 @@
//(WSDL 2.0 W3C spec, Part 2: 3.1.1 and 3.1.2)
getErrorReporter().reportError(
- "WSDL503", new Object[] {schema.getId()},
ErrorReporter.SEVERITY_ERROR);
+ new ErrorLocatorImpl(), //TODO line&col nos.
+ "WSDL503",
+ new Object[] {schema.getId()},
+ ErrorReporter.SEVERITY_ERROR);
//We will not be able to retrieve the elements and types for the
//target NS so no point in continuing to parse the schema.
@@ -661,21 +668,27 @@
} catch (ClassCastException e) {
getErrorReporter().reportError(
+ new ErrorLocatorImpl(), //TODO line&col nos.
"WSDL002", new Object[] {"Schema"},
ErrorReporter.SEVERITY_FATAL_ERROR, e);
} catch (XSException e) {
getErrorReporter().reportError(
+ new ErrorLocatorImpl(), //TODO line&col nos.
"WSDL002", new Object[] {"Schema"},
ErrorReporter.SEVERITY_FATAL_ERROR, e);
} catch (ClassNotFoundException e) {
getErrorReporter().reportError(
+ new ErrorLocatorImpl(), //TODO line&col nos.
"WSDL002", new Object[] {"Schema"},
ErrorReporter.SEVERITY_FATAL_ERROR, e);
} catch (InstantiationException e) {
getErrorReporter().reportError(
+ new ErrorLocatorImpl(), //TODO line&col nos.
"WSDL002", new Object[] {"Schema"},
ErrorReporter.SEVERITY_FATAL_ERROR, e);
} catch (IllegalAccessException e) {
getErrorReporter().reportError(
+ new ErrorLocatorImpl(), //TODO line&col nos.
"WSDL002", new Object[] {"Schema"},
ErrorReporter.SEVERITY_FATAL_ERROR, e);
} catch (InvocationTargetException e) {
getErrorReporter().reportError(
+ new ErrorLocatorImpl(), //TODO line&col nos.
"WSDL002", new Object[] {"Schema"},
ErrorReporter.SEVERITY_FATAL_ERROR, e);
}
@@ -715,6 +728,7 @@
getErrorReporter().reportError(
+ new ErrorLocatorImpl(), //TODO line&col nos.
"WSDL500",
new Object[] {schemaImport.getSchemaLocation(),
desc.getDocumentBaseURI()},
ErrorReporter.SEVERITY_ERROR);
@@ -748,7 +762,9 @@
String baseURI = desc.getDocumentBaseURI() != null ?
desc.getDocumentBaseURI() : "null";
- getErrorReporter().reportError("WSDL013",
+ getErrorReporter().reportError(
+ new ErrorLocatorImpl(), //TODO line&col nos.
+ "WSDL013",
new Object[] {baseURI, locURI},
ErrorReporter.SEVERITY_ERROR);
@@ -772,7 +788,11 @@
//schema retrieval failed (e.g. 'not found')
getErrorReporter().reportError(
- "WSDL015", new Object[] {schemaURL},
ErrorReporter.SEVERITY_WARNING, e4);
+ new ErrorLocatorImpl(), //TODO line&col nos.
+ "WSDL015",
+ new Object[] {schemaURL},
+ ErrorReporter.SEVERITY_WARNING,
+ e4);
//cannot continue without an imported schema
return schemaImport;
@@ -787,7 +807,10 @@
//(WSDL 2.0 W3C spec, Part 2: 3.1.1 'Importing XML Schema')
getErrorReporter().reportError(
- "WSDL501", new Object[] {schemaURL},
ErrorReporter.SEVERITY_ERROR);
+ new ErrorLocatorImpl(), //TODO line&col nos.
+ "WSDL501",
+ new Object[] {schemaURL},
+ ErrorReporter.SEVERITY_ERROR);
//Can't use the imported schema, so don't continue.
return schemaImport;
@@ -801,6 +824,7 @@
//(WSDL 2.0 W3C spec, Part 2: 3.1.1 'Importing XML Schema')
getErrorReporter().reportError(
+ new ErrorLocatorImpl(), //TODO line&col nos.
"WSDL502",
new Object[] {schemaImport.getNamespace(),
schema.getTargetNamespace(),
@@ -881,6 +905,7 @@
if (!QNameUtils.matches(qname, el))
{
getErrorReporter().reportError(
+ new ErrorLocatorImpl(), //TODO line&col nos.
"WSDL004",
new Object[] {qname, QNameUtils.newQName(el)},
ErrorReporter.SEVERITY_FATAL_ERROR);
@@ -926,7 +951,11 @@
catch (SAXException e)
{
getErrorReporter().reportError(
- "WSDL002", new Object[] {"SAX", desc},
ErrorReporter.SEVERITY_FATAL_ERROR, e);
+ new ErrorLocatorImpl(), //TODO line&col nos.
+ "WSDL002",
+ new Object[] {"SAX", desc},
+ ErrorReporter.SEVERITY_FATAL_ERROR,
+ e);
}
//TODO - potentially returns null. correct after deciding how
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]