Re: Cocoon 2 - Webservice

2014-04-07 Thread warrell harries
It's as simple as just using the stream generator.

map:match pattern=webService
map:generate type=stream/
map:transform src=doYourStuff.xsl/
map:serialize type=xml/
/map:match


Take Baby Steps and it will become clear

Regards

Warrell



On 7 April 2014 16:48, spintus-mail...@web.de wrote:

 Hello,
 Unfortunately, I'm only now to respond. Restful was recommended to me by my
 instructor. I would like to send the XML file via POST to cocoon, recycle
 there and spend as PDF, HTML, or RTF.
 Currently, I have not yet an overview if there is a ready-made opportunity
 to Cocoon XML to accept documents through POST?




 Von: Jos Snellings [mailto:jos.snelli...@upperware.biz]
 Gesendet: Samstag, 5. April 2014 15:23
 An: users@cocoon.apache.org
 Betreff: Re: Cocoon 2 - Webservice

 Hi Klaus,

 As REST is a principle, it is possible to implement a service in a
 REST-ful
 manner.
 However, is it correct to state, as your message suggests, that the service
 would perform a sort of document conversion of an
 XML document in a specified format, to a PDF file?

 If this is the case, my idea would be:
 - cocoon 2 is a good choice, no need to upgrade
 - do not care about the REST religion, and just generate a pdf document

 Jos





 On Sat, Apr 5, 2014 at 3:06 PM, Klaus Nuhr spintus-mail...@web.de wrote:
 Hello to everyone in the mailing list :),

 I would like to implement a WebService via Cocoon. In this case, the client
 should send a XML file to my service, it will be processed accordingly and
 delivered as a pdf back to the client.

 The processing of a local XML works great. Now must be implemented as a
 webservice. I would have preferred RESTful, but seems all so only with
 cocoon 3 to come.

 Is there in this respect a tutorial or sample code?


 Greetings

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




 --
 La majestueuse égalité des lois, qui interdit au riche comme au pauvre de
 coucher sous les ponts, de mendier dans les rues et de voler du pain.
 -- Anatole France


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




Re: Cocoon 2 - Webservice

2014-04-07 Thread Jos Snellings
Yes, that is it.
If all you need to do is to generate a pdf document, your last step will be
a FOP-serialization.
This means that the only work is in coding your xsl:fo transform.

Cheers,
Jos


On Mon, Apr 7, 2014 at 5:48 PM, spintus-mail...@web.de wrote:

 Hello,
 Unfortunately, I'm only now to respond. Restful was recommended to me by my
 instructor. I would like to send the XML file via POST to cocoon, recycle
 there and spend as PDF, HTML, or RTF.
 Currently, I have not yet an overview if there is a ready-made opportunity
 to Cocoon XML to accept documents through POST?




 Von: Jos Snellings [mailto:jos.snelli...@upperware.biz]
 Gesendet: Samstag, 5. April 2014 15:23
 An: users@cocoon.apache.org
 Betreff: Re: Cocoon 2 - Webservice

 Hi Klaus,

 As REST is a principle, it is possible to implement a service in a
 REST-ful
 manner.
 However, is it correct to state, as your message suggests, that the service
 would perform a sort of document conversion of an
 XML document in a specified format, to a PDF file?

 If this is the case, my idea would be:
 - cocoon 2 is a good choice, no need to upgrade
 - do not care about the REST religion, and just generate a pdf document

 Jos





 On Sat, Apr 5, 2014 at 3:06 PM, Klaus Nuhr spintus-mail...@web.de wrote:
 Hello to everyone in the mailing list :),

 I would like to implement a WebService via Cocoon. In this case, the client
 should send a XML file to my service, it will be processed accordingly and
 delivered as a pdf back to the client.

 The processing of a local XML works great. Now must be implemented as a
 webservice. I would have preferred RESTful, but seems all so only with
 cocoon 3 to come.

 Is there in this respect a tutorial or sample code?


 Greetings

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




 --
 La majestueuse égalité des lois, qui interdit au riche comme au pauvre de
 coucher sous les ponts, de mendier dans les rues et de voler du pain.
 -- Anatole France


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




-- 
La majestueuse égalité des lois, qui interdit au riche comme au pauvre de
coucher sous les ponts, de mendier dans les rues et de voler du pain.

*-- Anatole France*


Re: Cocoon 2 - Webservice

2014-04-07 Thread Andreas Kuehne
Hi Jos,
 If all you need to do is to generate a pdf document, your last step will be
 a FOP-serialization.
 This means that the only work is in coding your xsl:fo transform.
yes, that also my favorite way to do it!
But if you are not used to XML, XSLT and FO you have a bumpy and lengthy
road ahead. So let's give Klaus a hint that it may take some time ..

Greetings,

Andreas

 Cheers,
 Jos


 On Mon, Apr 7, 2014 at 5:48 PM, spintus-mail...@web.de wrote:

 Hello,
 Unfortunately, I'm only now to respond. Restful was recommended to me by my
 instructor. I would like to send the XML file via POST to cocoon, recycle
 there and spend as PDF, HTML, or RTF.
 Currently, I have not yet an overview if there is a ready-made opportunity
 to Cocoon XML to accept documents through POST?




 Von: Jos Snellings [mailto:jos.snelli...@upperware.biz]
 Gesendet: Samstag, 5. April 2014 15:23
 An: users@cocoon.apache.org
 Betreff: Re: Cocoon 2 - Webservice

 Hi Klaus,

 As REST is a principle, it is possible to implement a service in a
 REST-ful
 manner.
 However, is it correct to state, as your message suggests, that the service
 would perform a sort of document conversion of an
 XML document in a specified format, to a PDF file?

 If this is the case, my idea would be:
 - cocoon 2 is a good choice, no need to upgrade
 - do not care about the REST religion, and just generate a pdf document

 Jos





 On Sat, Apr 5, 2014 at 3:06 PM, Klaus Nuhr spintus-mail...@web.de wrote:
 Hello to everyone in the mailing list :),

 I would like to implement a WebService via Cocoon. In this case, the client
 should send a XML file to my service, it will be processed accordingly and
 delivered as a pdf back to the client.

 The processing of a local XML works great. Now must be implemented as a
 webservice. I would have preferred RESTful, but seems all so only with
 cocoon 3 to come.

 Is there in this respect a tutorial or sample code?


 Greetings

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




 --
 La majestueuse égalité des lois, qui interdit au riche comme au pauvre de
 coucher sous les ponts, de mendier dans les rues et de voler du pain.
 -- Anatole France


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





-- 
Andreas Kühne 
phone: +49 177 293 24 97 
mailto: kue...@trustable.de

Trustable Ltd. Niederlassung Deutschland Ströverstr. 18 - 59427 Unna 
Amtsgericht Hamm HRB 5868

Directors Andreas Kühne, Heiko Veit

Company UK Company No: 5218868 Registered in England and Wales 


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



Re: Cocoon 2 - Webservice

2014-04-05 Thread Jos Snellings
Hi Klaus,

As REST is a principle, it is possible to implement a service in a
REST-ful manner.
However, is it correct to state, as your message suggests, that the service
would perform a sort of document conversion of an
XML document in a specified format, to a PDF file?

If this is the case, my idea would be:
- cocoon 2 is a good choice, no need to upgrade
- do not care about the REST religion, and just generate a pdf document

Jos






On Sat, Apr 5, 2014 at 3:06 PM, Klaus Nuhr spintus-mail...@web.de wrote:

 Hello to everyone in the mailing list :),

 I would like to implement a WebService via Cocoon. In this case, the
 client should send a XML file to my service, it will be processed
 accordingly and delivered as a pdf back to the client.

 The processing of a local XML works great. Now must be implemented as a
 webservice. I would have preferred RESTful, but seems all so only with
 cocoon 3 to come.

 Is there in this respect a tutorial or sample code?


 Greetings

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




-- 
La majestueuse égalité des lois, qui interdit au riche comme au pauvre de
coucher sous les ponts, de mendier dans les rues et de voler du pain.

*-- Anatole France*


Re: Cocoon 2 - Webservice

2014-04-05 Thread Andreas Kuehne
Hi Klaus,
 I would like to implement a WebService via Cocoon. In this case, the client 
 should send a XML file to my service, it will be processed accordingly and 
 delivered as a pdf back to the client. 

 The processing of a local XML works great. Now must be implemented as a 
 webservice. I would have preferred RESTful, but seems all so only with cocoon 
 3 to come.
every thing's possible with cocoon 2! It's processing XML, so nothing is
holding you back from implementing a web service! This is just an XML
request and an XML response. Cocoon is great in handling this! We build
our project's (http://sourceforge.net/projects/sirius-sign/) web service
handling entirely with Cocoon. Even WebServiceSecurity is just another
transformer ...

RESTful services don't bring new complexity to the picture, you just
have to deal with the HTTP methods instead of having just 'POST'. You
can easily handle the http method within the sitemap.  When you assume
RESTful services work with JSON, things get a bit more tricky, as it's
not XML. In this case just XMLify the request and serialize to JSON.

  

 Is there in this respect a tutorial or sample code?
See the mentioned project. If your lost (it's a bit bigger), just drop
me a line.

Greetings,

Andreas K.

-- 
Andreas Kühne 
phone: +49 177 293 24 97 
mailto: kue...@trustable.de

Trustable Ltd. Niederlassung Deutschland Ströverstr. 18 - 59427 Unna 
Amtsgericht Hamm HRB 5868

Directors Andreas Kühne, Heiko Veit

Company UK Company No: 5218868 Registered in England and Wales 


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