[jboss-user] [JBossWS] - Loading a file into an InputStream within webservice code

anacarda do-not-reply at jboss.com
Sun Mar 30 17:51:27 EDT 2008


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 :)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139948#4139948

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4139948



More information about the jboss-user mailing list