axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: loading resources from service archive?
Date Thu, 28 Feb 2008 15:27:07 GMT

Thanks for your suggestion - still not working for me.

Here's what I tried - perhaps you can spot something newbie I'm doing:

public class MyService implements MyServiceInterface{

      // Session startup handler.
      public void init( ServiceContext ctx ) {

            ClassLoader cl = MyService.class.getClassLoader();
            ClassLoader clp = MyService.class.getClassLoader().getParent();

            InputStream input = cl.getResourceAsStream( "log4j.xml");
            InputStream input2 = cl.getResourceAsStream( "log4j.xml");

            JarFile jar;
            ZipEntry ze;
            try {
                  jar = new JarFile(
                  ze = jar.getEntry( "log4j.xml");

            } catch (IOException e) {

      // ... service operations implementations

   At the moment I'm doing this in Eclipse - that does tend to complicate
   MyServiceInterface is the renamed skeleton interface generate by
   Both class loaders return (different) non-null references.
   Both input streams return null.
   The aar file and the contained xml file that I'm trying to load as a
   resource are both found.

Any further suggestion are most appreciated!

- Steve

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message