xmlSchema location in EJB Container
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Scott_Allan
Posted On:   Friday, March 28, 2003 05:14 PM

The program does not seem able to locate the .xsd document. I'm sure it has something to do with the fact that it is processing inside the ejb container. I am using the Application Client to read a server side XML file and converting to a String since I was not able to access the file from the session bean. Please tell me the best way to make the xml schema file available. XMLReader xr = new org.apache.xerces.parsers.SAXParser(); xr.setFeature("http://xml.org/sax/features/validation",true); xr.setFeature("http://apache.org/xml/features/validation/schema",true); xr.setFeature("http://apache.org/xml/features/validation/schema-full-checking"   More>>



The program does not seem able to locate the .xsd document.



I'm sure it has something to do with the fact that it is processing inside the ejb container. I am using the Application Client to read a server side XML file and converting to a String since I was not able to access the file from the session bean. Please tell me the best way to make the xml schema file available.




XMLReader xr = new org.apache.xerces.parsers.SAXParser();

xr.setFeature("http://xml.org/sax/features/validation",true);

xr.setFeature("http://apache.org/xml/features/validation/schema",true);

xr.setFeature("http://apache.org/xml/features/validation/schema-full-checking",true);

xr.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation", "d:\transactions.xsd";

xr.setContentHandler(this);

xr.setErrorHandler(this);

StringReader r = new StringReader(xmlString);

xr.parse(new InputSource(r));

   <<Less

Re: xmlSchema location in EJB Container

Posted By:   Christopher_Koenigsberg  
Posted On:   Saturday, March 29, 2003 08:40 AM

Unless I am mistaken, no EJB is ever supposed to try to read or write any files on the local filesystem.



So give it an http url instead.

About | Sitemap | Contact