<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.00.3504.2500" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN
class=052301222-04102002>Hi,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=052301222-04102002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=052301222-04102002>My apologies if this
has been asked on this list before. I had a look through the archives but could
not see anything on this exact topic. Please direct me to the post if it has
however and I just missed.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=052301222-04102002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=052301222-04102002>We have a set of EJB
Session beans that process incoming request from clients that are XML messages
(it is not yet a full blown web service, but hopefully someday it will be). The
XML documents currently specify a schema in their root node and validation seems
to be operating quite nicely.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=052301222-04102002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=052301222-04102002>The issue we have is
that the paths specified to the schemas are in the form
"schemas/inboundCustomerOrder.xsd". We use a SAXBuilder to create the document
in memory and pass 'true' to the SAXBuilder constructor. We then call
SAXBuilder.build(...) passing a Reader in. Now it would appear that the internal
workings look for the schema by doing something like 'new File(schemaPath)' and
then obviously create an InputStream of some description and read the schema
file. This forces (in our case) the 'schemas' directory to be in our Weblogic
root, since this is where the relative path is verified from. This is very
unfriendly to our customers and not exactly J2EE compliant.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=052301222-04102002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=052301222-04102002>What would like to
be able to do is somehow package the schemas into our .ear file so that it is
all together and deployed all nicely. We can probably figure out how to mount
the schemas in the .ear file, but that is pointless since there is no way (that
we can see) to instruct the parser where to load the schema from, or pass the
schema as an InputStream or anything like that. We have thought of maybe trying
to use a HTTP URL as the schema location, but we think this is a "fragile"
solution as it means our whole application is at the mercy of a lowly web server
- if it goes down we are in big trouble.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=052301222-04102002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=052301222-04102002>Anyone grasp what we
are getting at? :)</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=052301222-04102002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=052301222-04102002>Are missing
something, or have we really hit a brick wall here?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=052301222-04102002></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=052301222-04102002>Thanks in
advance,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=052301222-04102002>Craig</SPAN></FONT></DIV></BODY></HTML>