How about something like:

        
        public void service(IEngineServiceView acrg0, IRequestCycle cycle,
                        ResponseOutputStream response) throws
ServletException, IOException {
                Object[] parms = this.getParameters(cycle);
                
                Document d = <get zee Document>
                response.setContentType("text/xml");
                d.write(response);
        }

> -----Original Message-----
> From: Sunanda Kariakarawana [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, September 06, 2005 5:47 AM
> To: [email protected]
> Subject: Please help me on how to get XML stream through a service
> 
> 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