Java Reference
In-Depth Information
SAXException {
LOGGER.warn("Schema Validation Fatal Error: " +
e.getLocalizedMessage());
throw e;
}
}
What's happening here is fairly straightforward. The parser emits events when it stumbles
onto something in the XML instance that doesn't match the schema. Here I'm just logging the
problems and rethrowing the exceptions, but you could do something more interesting as your
needs suggest.
Adding Metro to the client in Maven
The obvious drawback to this solution is that you need to include the Metro JAR on the client.
If you're building your Java client application in Maven, here's what you need to add to your
POM's <dependencies> :
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>webservices-rt</artifactId>
<version>1.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>webservices-api</artifactId>
<version>1.3</version>
<scope>compile</scope>
</dependency>
Search WWH ::




Custom Search