Deepak,

You need to implement URIResolver.

The InputStream and Reader arguments allow you to provide the URILocationImpl with the way in which to read the URI. So for example, in your URIResolver class you can do something like the following:

    public URILocation resolve(String href, String documentBase)
        throws URIException
    {
        // create a reader or inputstream for resource
        URL url = new URL("http//localhost:7001/MyServlet?" + href)
        return new  URILocationImpl(url.openStream(), href);
    }

HTH,

--Keith


Deepak wrote:
Dear All,

I want to know what is the use of follwoing 2
constructors of the URILocationImpl?

URILocationImpl(java.io.InputStream is,
java.lang.String href) URILocationImpl(java.io.Reader reader, java.lang.String href) Creates a new URILocationImpl
I want castor to retrive locally all the
schemaLocation mentioned in the import tag of schema.I
want to implement URIResolver to achieve it. For e.g.
if utility.xsd is mentioned in the schemaLocation
attribute then i want castor to look at
http//localhost:7001/MyServlet?utility.xsd. I have
implemented my URIResolver class and changing the
URILocation to the above URL but castor is giving me
ConnectException. Why? I can get this utility.xsd file
by simple URLConnection. Can above 2 constructors be
used is some way so castor can read URILocation?

Thanks & Regards,
Deepak


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------




-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to