3 Replies Latest reply on Apr 7, 2008 5:43 PM by Antonio Broughton

    Loading a file into an InputStream within webservice code

    Antonio Broughton Newbie

      Hi,

      I have a webservice I have created, and it works fine.

      However, I am now wanting to load a file (xslt file in my case), to pass it through to Xalan for transformation.

      However... I do not know how to load the file.

      The main issue I am having, is I don't know where the file should be...

      I am currently using getResourceAsStream() function... is this correct?:

      InputStream loInputXSLT = getClass().getResourceAsStream("/xslt/file.xslt");


      Class is defined as the following:
      @Name("myWebService")
      @Stateless
      @WebService(name = "MyWeb", serviceName = "MyWeb")
      public class MyWeb implements MyWebRemote {


      I am also using the seam framework, but I don't think this is a seam specific question, so I am asking it here :)