You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Uwe Gerger <Uw...@bmw.de> on 2003/07/24 09:13:11 UTC

Example with StreamGenerator

Hello,
i'm would like to use the StreamGenerator in my application. For this I
searched for an example in my Cocoon 2.0.4 distribution, but without
success! Can anybody help me?

Thanks
	Uwe
-- 
Uwe Gerger                                _/_/_/   _/    _/  _/    _/
BMW AG, TG-53 IT-Technologie             _/   _/  _/_/_/_/  _/    _/
80788 Muenchen                          _/_/_/   _/ _/ _/  _/ _/ _/
Tel: +49 89 382 35687                  _/   _/  _/    _/  _/_/_/_/
Fax: +49 89 382 49040                 _/_/_/   _/    _/  _/    _/
mailto:Uwe.Gerger@bmw.de


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Example with StreamGenerator

Posted by Upayavira <uv...@upaya.co.uk>.
Uwe,

> what I need is to send a XML stream via POST from a Java servlet to
> Cocoon in order to use the stream generator! 
> 
> The XML stream is a String and I don't know what I have to do! Should I
> append the string to the URL so that it looks like this:
> localhost:8080/cocoon/test.xml<?xml version="1.0"><test></test> ????

No that won't work.

The way HTTP works is that URL parameters (name value pairs) can either
be appended to the URL (GET) or stored in the body of the request (POST).
It is also possible to replace this body with some arbitrary content,
e.g. post an XML document.

So if you want a servlet to do the post, you've got to find some
component to do it. I'm afraid I've only ever done it via VB and ASP (but
will soon need to do it in Java!)

You can see some HTTP code in the Cocoon 2.1 code:

/src/blocks/proxy/java/org/apache/cocoon/generation/*.java

But I couldn't find out how to do a post with that component.

Hope this helps.

Regards, Upayavira

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Example with StreamGenerator

Posted by Uwe Gerger <Uw...@bmw.de>.
Hello Upayavira,
what I need is to send a XML stream via POST from a Java servlet to
Cocoon in order to use the stream generator! 

The XML stream is a String and I don't know what I have to do! Should I
append the string to the URL so that it looks like this:
localhost:8080/cocoon/test.xml<?xml version="1.0"><test></test> ????

Thanks in advance for any help
	Uwe

uv@upaya.co.uk schrieb:
> 
> Uwe,
> 
> Can you explain what your need is? Then we can see if we can find the
> best solution for you.
> 
> Regards,
> 
> Upayavira
> 
> On Thu, 24 Jul 2003 14:17:59 +0200, "Uwe Gerger" <Uw...@bmw.de>
> said:
> > Do you mean the URL of the java servlet (in my case)? And then, what
> > does cocoon do?
> >
> > Thanks
> >       Uwe
> >
> >
> >
> > brunopierre4@yahoo.fr schrieb:
> > >
> > > why not sending to cocoon the url of the asp which generate your xml?
> > >
> > > > does the stream generator only works with POST?
> > > >
> > > > If yes, I don't know how to do this from a java servlet. Should I append
> > > > the xml stream to the URL so that it looks like this:
> > > > localhost:8080/cocoon/test.xml<?xml version="1.0"
> > > > encoding="UTF-8"?><test></test>
> > > >
> > > > How did you do it in your ASP site?
> > > >
> > > > Thanks
> > > > Uwe
> > > >
> > > > uv@upaya.co.uk schrieb:
> > > > >
> > > > > Uwe,
> > > > >
> > > > > > i'm would like to use the StreamGenerator in my application. For this
> > > I
> > > > > > searched for an example in my Cocoon 2.0.4 distribution, but without
> > > > > > success! Can anybody help me?
> > > > >
> > > > > I cannot help you with an example, but I can tell you that I did build a
> > > > > working site that uses it in a total of 15 minutes.
> > > > >
> > > > > An ASP based site built an XML object and sent it by HTTP POST to the
> > > > > cocoon server. The Cocoon pipeline started with a stream generator and
> > > > > followed it by a SourceWritingTransformer which wrote the body of the
> > > > > post to an XML file on disc.
> > > > >
> > > > > The stream generator just outputs the XML that was sent as the body of
> > > > > POST. There's not much more to it than that.
> > > > >
> > > > > Regards, Upayavira
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > > > For additional commands, e-mail: users-help@cocoon.apache.org
> > > >
> > > > --
> > > > Uwe Gerger                                _/_/_/   _/    _/  _/    _/
> > > > BMW AG, TG-53 IT-Technologie             _/   _/  _/_/_/_/  _/    _/
> > > > 80788 Muenchen                          _/_/_/   _/ _/ _/  _/ _/ _/
> > > > Tel: +49 89 382 35687                  _/   _/  _/    _/  _/_/_/_/
> > > > Fax: +49 89 382 49040                 _/_/_/   _/    _/  _/    _/
> > > > mailto:Uwe.Gerger@bmw.de
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > > For additional commands, e-mail: users-help@cocoon.apache.org
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail: users-help@cocoon.apache.org
> >
> > --
> > Uwe Gerger                                _/_/_/   _/    _/  _/    _/
> > BMW AG, TG-53 IT-Technologie             _/   _/  _/_/_/_/  _/    _/
> > 80788 Muenchen                          _/_/_/   _/ _/ _/  _/ _/ _/
> > Tel: +49 89 382 35687                  _/   _/  _/    _/  _/_/_/_/
> > Fax: +49 89 382 49040                 _/_/_/   _/    _/  _/    _/
> > mailto:Uwe.Gerger@bmw.de
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org

-- 
Uwe Gerger                                _/_/_/   _/    _/  _/    _/
BMW AG, TG-53 IT-Technologie             _/   _/  _/_/_/_/  _/    _/
80788 Muenchen                          _/_/_/   _/ _/ _/  _/ _/ _/
Tel: +49 89 382 35687                  _/   _/  _/    _/  _/_/_/_/
Fax: +49 89 382 49040                 _/_/_/   _/    _/  _/    _/
mailto:Uwe.Gerger@bmw.de


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Example with StreamGenerator

Posted by Upayavira <uv...@upaya.co.uk>.
Uwe,

Can you explain what your need is? Then we can see if we can find the
best solution for you.

Regards,

Upayavira


On Thu, 24 Jul 2003 14:17:59 +0200, "Uwe Gerger" <Uw...@bmw.de>
said:
> Do you mean the URL of the java servlet (in my case)? And then, what
> does cocoon do?
> 
> Thanks
> 	Uwe
> 
> 
> 
> brunopierre4@yahoo.fr schrieb:
> > 
> > why not sending to cocoon the url of the asp which generate your xml?
> > 
> > > does the stream generator only works with POST?
> > >
> > > If yes, I don't know how to do this from a java servlet. Should I append
> > > the xml stream to the URL so that it looks like this:
> > > localhost:8080/cocoon/test.xml<?xml version="1.0"
> > > encoding="UTF-8"?><test></test>
> > >
> > > How did you do it in your ASP site?
> > >
> > > Thanks
> > > Uwe
> > >
> > > uv@upaya.co.uk schrieb:
> > > >
> > > > Uwe,
> > > >
> > > > > i'm would like to use the StreamGenerator in my application. For this
> > I
> > > > > searched for an example in my Cocoon 2.0.4 distribution, but without
> > > > > success! Can anybody help me?
> > > >
> > > > I cannot help you with an example, but I can tell you that I did build a
> > > > working site that uses it in a total of 15 minutes.
> > > >
> > > > An ASP based site built an XML object and sent it by HTTP POST to the
> > > > cocoon server. The Cocoon pipeline started with a stream generator and
> > > > followed it by a SourceWritingTransformer which wrote the body of the
> > > > post to an XML file on disc.
> > > >
> > > > The stream generator just outputs the XML that was sent as the body of
> > > > POST. There's not much more to it than that.
> > > >
> > > > Regards, Upayavira
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > > For additional commands, e-mail: users-help@cocoon.apache.org
> > >
> > > --
> > > Uwe Gerger                                _/_/_/   _/    _/  _/    _/
> > > BMW AG, TG-53 IT-Technologie             _/   _/  _/_/_/_/  _/    _/
> > > 80788 Muenchen                          _/_/_/   _/ _/ _/  _/ _/ _/
> > > Tel: +49 89 382 35687                  _/   _/  _/    _/  _/_/_/_/
> > > Fax: +49 89 382 49040                 _/_/_/   _/    _/  _/    _/
> > > mailto:Uwe.Gerger@bmw.de
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail: users-help@cocoon.apache.org
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> 
> -- 
> Uwe Gerger                                _/_/_/   _/    _/  _/    _/
> BMW AG, TG-53 IT-Technologie             _/   _/  _/_/_/_/  _/    _/
> 80788 Muenchen                          _/_/_/   _/ _/ _/  _/ _/ _/
> Tel: +49 89 382 35687                  _/   _/  _/    _/  _/_/_/_/
> Fax: +49 89 382 49040                 _/_/_/   _/    _/  _/    _/
> mailto:Uwe.Gerger@bmw.de
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Example with StreamGenerator

Posted by Uwe Gerger <Uw...@bmw.de>.
Do you mean the URL of the java servlet (in my case)? And then, what
does cocoon do?

Thanks
	Uwe



brunopierre4@yahoo.fr schrieb:
> 
> why not sending to cocoon the url of the asp which generate your xml?
> 
> > does the stream generator only works with POST?
> >
> > If yes, I don't know how to do this from a java servlet. Should I append
> > the xml stream to the URL so that it looks like this:
> > localhost:8080/cocoon/test.xml<?xml version="1.0"
> > encoding="UTF-8"?><test></test>
> >
> > How did you do it in your ASP site?
> >
> > Thanks
> > Uwe
> >
> > uv@upaya.co.uk schrieb:
> > >
> > > Uwe,
> > >
> > > > i'm would like to use the StreamGenerator in my application. For this
> I
> > > > searched for an example in my Cocoon 2.0.4 distribution, but without
> > > > success! Can anybody help me?
> > >
> > > I cannot help you with an example, but I can tell you that I did build a
> > > working site that uses it in a total of 15 minutes.
> > >
> > > An ASP based site built an XML object and sent it by HTTP POST to the
> > > cocoon server. The Cocoon pipeline started with a stream generator and
> > > followed it by a SourceWritingTransformer which wrote the body of the
> > > post to an XML file on disc.
> > >
> > > The stream generator just outputs the XML that was sent as the body of
> > > POST. There's not much more to it than that.
> > >
> > > Regards, Upayavira
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail: users-help@cocoon.apache.org
> >
> > --
> > Uwe Gerger                                _/_/_/   _/    _/  _/    _/
> > BMW AG, TG-53 IT-Technologie             _/   _/  _/_/_/_/  _/    _/
> > 80788 Muenchen                          _/_/_/   _/ _/ _/  _/ _/ _/
> > Tel: +49 89 382 35687                  _/   _/  _/    _/  _/_/_/_/
> > Fax: +49 89 382 49040                 _/_/_/   _/    _/  _/    _/
> > mailto:Uwe.Gerger@bmw.de
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org

-- 
Uwe Gerger                                _/_/_/   _/    _/  _/    _/
BMW AG, TG-53 IT-Technologie             _/   _/  _/_/_/_/  _/    _/
80788 Muenchen                          _/_/_/   _/ _/ _/  _/ _/ _/
Tel: +49 89 382 35687                  _/   _/  _/    _/  _/_/_/_/
Fax: +49 89 382 49040                 _/_/_/   _/    _/  _/    _/
mailto:Uwe.Gerger@bmw.de


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Example with StreamGenerator

Posted by Bruno PIERRE <br...@yahoo.fr>.
why not sending to cocoon the url of the asp which generate your xml?


> does the stream generator only works with POST?
>
> If yes, I don't know how to do this from a java servlet. Should I append
> the xml stream to the URL so that it looks like this:
> localhost:8080/cocoon/test.xml<?xml version="1.0"
> encoding="UTF-8"?><test></test>
>
> How did you do it in your ASP site?
>
> Thanks
> Uwe
>
> uv@upaya.co.uk schrieb:
> >
> > Uwe,
> >
> > > i'm would like to use the StreamGenerator in my application. For this
I
> > > searched for an example in my Cocoon 2.0.4 distribution, but without
> > > success! Can anybody help me?
> >
> > I cannot help you with an example, but I can tell you that I did build a
> > working site that uses it in a total of 15 minutes.
> >
> > An ASP based site built an XML object and sent it by HTTP POST to the
> > cocoon server. The Cocoon pipeline started with a stream generator and
> > followed it by a SourceWritingTransformer which wrote the body of the
> > post to an XML file on disc.
> >
> > The stream generator just outputs the XML that was sent as the body of
> > POST. There's not much more to it than that.
> >
> > Regards, Upayavira
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
>
> --
> Uwe Gerger                                _/_/_/   _/    _/  _/    _/
> BMW AG, TG-53 IT-Technologie             _/   _/  _/_/_/_/  _/    _/
> 80788 Muenchen                          _/_/_/   _/ _/ _/  _/ _/ _/
> Tel: +49 89 382 35687                  _/   _/  _/    _/  _/_/_/_/
> Fax: +49 89 382 49040                 _/_/_/   _/    _/  _/    _/
> mailto:Uwe.Gerger@bmw.de
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Example with StreamGenerator

Posted by Uwe Gerger <Uw...@bmw.de>.
does the stream generator only works with POST? 

If yes, I don't know how to do this from a java servlet. Should I append
the xml stream to the URL so that it looks like this:
localhost:8080/cocoon/test.xml<?xml version="1.0"
encoding="UTF-8"?><test></test>

How did you do it in your ASP site?

Thanks
	Uwe

uv@upaya.co.uk schrieb:
> 
> Uwe,
> 
> > i'm would like to use the StreamGenerator in my application. For this I
> > searched for an example in my Cocoon 2.0.4 distribution, but without
> > success! Can anybody help me?
> 
> I cannot help you with an example, but I can tell you that I did build a
> working site that uses it in a total of 15 minutes.
> 
> An ASP based site built an XML object and sent it by HTTP POST to the
> cocoon server. The Cocoon pipeline started with a stream generator and
> followed it by a SourceWritingTransformer which wrote the body of the
> post to an XML file on disc.
> 
> The stream generator just outputs the XML that was sent as the body of
> POST. There's not much more to it than that.
> 
> Regards, Upayavira
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org

-- 
Uwe Gerger                                _/_/_/   _/    _/  _/    _/
BMW AG, TG-53 IT-Technologie             _/   _/  _/_/_/_/  _/    _/
80788 Muenchen                          _/_/_/   _/ _/ _/  _/ _/ _/
Tel: +49 89 382 35687                  _/   _/  _/    _/  _/_/_/_/
Fax: +49 89 382 49040                 _/_/_/   _/    _/  _/    _/
mailto:Uwe.Gerger@bmw.de


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Example with StreamGenerator

Posted by Upayavira <uv...@upaya.co.uk>.
Uwe,

> i'm would like to use the StreamGenerator in my application. For this I
> searched for an example in my Cocoon 2.0.4 distribution, but without
> success! Can anybody help me?

I cannot help you with an example, but I can tell you that I did build a
working site that uses it in a total of 15 minutes.

An ASP based site built an XML object and sent it by HTTP POST to the
cocoon server. The Cocoon pipeline started with a stream generator and
followed it by a SourceWritingTransformer which wrote the body of the
post to an XML file on disc.

The stream generator just outputs the XML that was sent as the body of
POST. There's not much more to it than that.

Regards, Upayavira

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org