You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "klasyk99@poczta.onet.pl" <kl...@poczta.onet.pl> on 2007/06/02 17:24:28 UTC
I can't read file from aar
I have a classes, when i'm seeing inside aar (webservice Axis'a)
this file is inside as /ja/ja.xml, there are also another classes
aat has been put into webservice inside unpacked axis2.war, which is
in jboss
URL object toString() in my code
getClass().getResource("/com/ja/ja.xml"); return
jar:file:/C:/DOCUME~1/mkr/USTAWI~1/Temp/axis247457.aar!/com/ja/ja.xml
file C:/DOCUME~1/mkr/USTAWI~1/Temp/axis247457.aar exists
but, when i tryed load it into byte table
or as DOM object i have null, or unmature end of file
how can i load it?
url.openStream(); should work, but doesn't
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
URL url = getClass().getResource("/com/ja/ja.xml");
factory.setValidating(true);
InputStream inputStream = url.openStream();
byte [] tableofByte = new byte[10000];
inputStream.read(tableofByte);
document = builder.parse(inputStream);
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org