I am using this to download files form the server in the project I am working on (http://www.sipfoundry.org/sipXconfig/). Maybe it'll give you some ideas on how to solve your problem:

download service: http://scm.sipfoundry.org/rep/sipX/main/sipXconfig/web/src/org/sipfoundry/sipxconfig/components/DownloadService.java
download link:
http://scm.sipfoundry.org/rep/sipX/main/sipXconfig/web/src/org/sipfoundry/sipxconfig/components/DownloadLink.java

Do not forget to register your service in .application file.
Damian


Sunanda Kariakarawana wrote:
Hi,

Can someone please help to get an xml stream through a service? I have
created a service. It will call a method in a java class which will query
the database and create the xml stream and return it to the service. From
the service I want to flush it to the response stream. I am using Tapestry
3.0.3 and Tomcat 4.1.12.

public class LOVService extends AbstractService
{
  public static final String SERVICE_NAME = "listOfValues";
public ILink getLink(IRequestCycle cycle, IComponent component, Object[]
parameters)
  {
    return constructLink(cycle, SERVICE_NAME, null, parameters, true);
  }
public void service(
      IEngineServiceView engine,
      IRequestCycle cycle,
      ResponseOutputStream output)
      throws ServletException, IOException
      {
      output.setContentType("text/xml");
      /*I am getting the xml here.*/
  }
public String getName()
  {
    return SERVICE_NAME;
  }
}
Thanks in advance.
Sunanda



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to