Hi,
why not go about using a SAX InputSource for configuring Castor with a
mapping ? In other words, something similar to ....
URL mappingurl =
getClass().getClassLoader().getResource("com/test/mapping.xml");
mapping.loadMapping(new InputSource(mappingUrl.toAbsolutePath());
Kind Regards
Werner
On 25.03.2011 08:48, rag007 wrote:
>
> Hi All,
>
> I am using castor 1.3. I am using mapping file. I placed in my mapping file
> like this
>
> com.test
> -TestOne.java
> -mapping.xml
>
> In TestOne.java, i am using like
>
> Mapping mapping = new Mapping();
> mapping.loadMapping("D:/test/TestProject/com/test/mapping.xml");
>
> Instead of the full path, Is it possible to give like this
> mapping.loadMapping("mapping.xml")?
>
> I tried like this also
> java.net.URL
> mappingurl=getClass().getClassLoader().getResource("com/test/mapping.xml");
> Mapping mapping = new Mapping();
> mapping.loadMapping(mappingurl);
>
> I am getting error. I dont know the problem.
What error are you actually getting ?
>
> please help me asap. Thanks in advance.
>
>
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email