Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » JDOM XML Validation
JDOM XML Validation [message #185590] Thu, 04 January 2007 14:38
Ben Sisson is currently offline Ben Sisson
Messages: 202
Registered: July 2009
Senior Member
This is somewhat related to another post but different in the approach so
I have created a different posting for it. I am basically trying to
validate an XML file using the scemas that are specified in the name
space. Someone that I work with suggested using the following code:

SAXBuilder builder = new SAXBuilder(true);
builder.setFeature("http://apache.org/xml/features/validation/schema",
true);
builder.setFeature("http://xml.org/sax/features/validation", true);
builder.setFeature(
" http://apache.org/xml/features/validation/schema-full-checki ng", true);

try
{
FileProcessing fp = new FileProcessing(xml, client_id);
builder.build(new InputSource(new StringReader
(fp.getContents(fp.getFile()))));
}

I have seen this code run before on a Java application but no on a web
service. When I run it on the web service I execute the first line
(create the SAXBuilder instance) I get the following message:

java.lang.reflect.InvocationTargetException

When I'm in debug mode and try to step through the first statement the
very next screen I get is the Class File Editor with a brief message:

The jar file axis.jar has not source attachment
You can attach the source by clicking Attach Source below:

I'm not sure why I get this message on the web service but it runs fine as
a Java application when I perform the same task.
Previous Topic:Existing project import
Next Topic:Debug Code
Goto Forum:
  


Current Time: Wed Jul 23 08:14:09 EDT 2014

Powered by FUDForum. Page generated in 0.01510 seconds