You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Leszek Gawron <ou...@kompuart.pl> on 2002/07/12 15:13:45 UTC

Stream generator

There is a nice example how cocoon can handle posted xml data under
samples/request1 uri. Still I got no idea how to process this data. Let's
suppose I really want to make an order so it has to end up in some database
tables. What do I do ? Do I need to write my own action? Is it posssible to
use only XSP ? If an action is needed can anyone provide me with simplest
action code snippet. My knowledge of cocoon classes is still very limited.
Thanks
	ouzo
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Stream generator & XMLForms

Posted by Leszek Gawron <ou...@kompuart.pl>.
On Sat, Jul 13, 2002 at 09:02:40AM -0500, Jorge Bello wrote:
> From: "Leszek Gawron" <ou...@kompuart.pl>
> 
> > What I would like to do is to send xml data to server
> > (prepared by client), do some businness processing and send response to
> > client.
> 
> Perhaps with SOAP ?
AS I said before I do not have reliable SOAP client implementation on Pocket
PC 2002
	ouzo
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Stream generator & XMLForms

Posted by Jorge Bello <jn...@ptq.pemex.com>.
From: "Leszek Gawron" <ou...@kompuart.pl>

> What I would like to do is to send xml data to server
> (prepared by client), do some businness processing and send response to
> client.

Perhaps with SOAP ?

Cheers



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Stream generator & XMLForms

Posted by Leszek Gawron <ou...@kompuart.pl>.
On Sat, Jul 13, 2002 at 07:35:32PM +0200, Koen Pellegrims wrote:
> Maybe off-topic, but are you sure you are taking the right approach with
> this?
> If the communication is wireless, how will you add transaction support?
> You have to make sure that each invoice is sent and that it is sent only
> once!
> 
> I have a lot of expierence in this area and I can tell you that plain
> web-technologies are not very well suited for this kind of communications (I
> learned this the hard way :-p ).
> Maybe you should look at a more suitable approaches such as Sybase's
> iAnywhere suite, which is very good; or (if you happen to have an SAP
> backend) the SAP mobile engine. Both of these technologies allow you to run
> an offline application on a mobile device and then synchronize (be it
> wireless or not) with a backend. Both of them can be implemented with full
> transaction support...
It is not plain web-technology project. The client is written in eVC 3.0. I'm
using cocoon as an application server. And for maintaining database coherence
I'm sending whole transaction data as one part (client prepares the invoice
and sends it in one piece). And the client will handle the proper
order/invoice placing so the user won't be able to resend it (just like in a
web browser)

	ouzo

PS. SAP engine is far too expensive, got no idea about Sybase solution
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: Stream generator & XMLForms

Posted by Koen Pellegrims <ko...@pandora.be>.
Maybe off-topic, but are you sure you are taking the right approach with
this?
If the communication is wireless, how will you add transaction support?
You have to make sure that each invoice is sent and that it is sent only
once!

I have a lot of expierence in this area and I can tell you that plain
web-technologies are not very well suited for this kind of communications (I
learned this the hard way :-p ).
Maybe you should look at a more suitable approaches such as Sybase's
iAnywhere suite, which is very good; or (if you happen to have an SAP
backend) the SAP mobile engine. Both of these technologies allow you to run
an offline application on a mobile device and then synchronize (be it
wireless or not) with a backend. Both of them can be implemented with full
transaction support...

K.

> -----Oorspronkelijk bericht-----
> Van: Leszek Gawron [mailto:ouzo@kompuart.pl]
> Verzonden: zaterdag 13 juli 2002 19:08
> Aan: cocoon-users@xml.apache.org
> Onderwerp: Re: Stream generator & XMLForms
>
>
> On Sat, Jul 13, 2002 at 11:23:56AM -0500, Ivelin Ivanov wrote:
> >
> > Tell us more about the problem you're trying to solve.
> > What type of content you want to send in and return back.
> >
> > Can you you consider using HTTP GET parameters to submit to
> Cocoon, instead
> > of XML?
> > This will allow you to use XMLForm, etc.
> I am writing an application for Pocket PC for company's mobile
> representatives
> I don't think I can use GET parameter because of the size of data (whole
> invoice for example - I do not want to collect is sequentially in session
> object because it's more complicated)
>
> > Otherwise you can use StreamGenerator. It will read your XML
> Post and make
> > the XML available in the pipeline.
> Still I do not know how to validate the data ( product units
> number available
> in store vs units ordered for example ) and place an order using plain XSL
> because that's all left when you receive the document as SAX events
>
> The best way i figured now is:
> make an xsp that parses appropriate request parameter manually, esqls to
> database, outputs result
>
> 	ouzo
>
> --
>             __
>          | /  \ |        Leszek Gawron            //  \\
>         \_\\  //_/      ouzo@vip.net.pl          _\\()//_
>          .'/()\'.     Phone: +48(600)341118     / //  \\ \
>           \\  //  recursive: adj; see recursive  | \__/ |
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Stream generator & XMLForms

Posted by Leszek Gawron <ou...@kompuart.pl>.
On Sat, Jul 13, 2002 at 11:23:56AM -0500, Ivelin Ivanov wrote:
> 
> Tell us more about the problem you're trying to solve.
> What type of content you want to send in and return back.
> 
> Can you you consider using HTTP GET parameters to submit to Cocoon, instead
> of XML?
> This will allow you to use XMLForm, etc.
I am writing an application for Pocket PC for company's mobile representatives
I don't think I can use GET parameter because of the size of data (whole
invoice for example - I do not want to collect is sequentially in session
object because it's more complicated)

> Otherwise you can use StreamGenerator. It will read your XML Post and make
> the XML available in the pipeline.
Still I do not know how to validate the data ( product units number available
in store vs units ordered for example ) and place an order using plain XSL
because that's all left when you receive the document as SAX events

The best way i figured now is:
make an xsp that parses appropriate request parameter manually, esqls to
database, outputs result

	ouzo
	
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Stream generator & XMLForms

Posted by Ivelin Ivanov <iv...@apache.org>.
Tell us more about the problem you're trying to solve.
What type of content you want to send in and return back.

Can you you consider using HTTP GET parameters to submit to Cocoon, instead
of XML?
This will allow you to use XMLForm, etc.

Otherwise you can use StreamGenerator. It will read your XML Post and make
the XML available in the pipeline.


-=Ivelin=-
----- Original Message -----
From: "Leszek Gawron" <ou...@kompuart.pl>
To: <co...@xml.apache.org>
Sent: Saturday, July 13, 2002 3:08 AM
Subject: Re: Stream generator & XMLForms


> On Fri, Jul 12, 2002 at 08:55:23PM -0500, Ivelin Ivanov wrote:
> >
> > Maybe you should be looking at Axis instead of Cocoon for this kind of
task.
> >
> > http://xml.apache.org/axis/
> the problem is my client is Pocket PC 2002 and I do not have any SOAP
client
> libraries for it.
> if I had SOAP I would use Microsoft .NET Web Services
>
> Any other ideas how to do it ? using cocoon actions maybe ?
> ouzo
> --
>             __
>          | /  \ |        Leszek Gawron            //  \\
>         \_\\  //_/      ouzo@vip.net.pl          _\\()//_
>          .'/()\'.     Phone: +48(600)341118     / //  \\ \
>           \\  //  recursive: adj; see recursive  | \__/ |
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: Stream generator & XMLForms

Posted by William Brogden <wb...@bga.com>.

> -----Original Message-----
> From: Leszek Gawron [mailto:ouzo@kompuart.pl] 
> Sent: Saturday, July 13, 2002 3:08 AM
> To: cocoon-users@xml.apache.org
> Subject: Re: Stream generator & XMLForms
> 
> 
> On Fri, Jul 12, 2002 at 08:55:23PM -0500, Ivelin Ivanov wrote:
> > 
> > Maybe you should be looking at Axis instead of Cocoon for 
> this kind of task.
> > 
> > http://xml.apache.org/axis/
> the problem is my client is Pocket PC 2002 and I do not have 
> any SOAP client
> libraries for it. 
> if I had SOAP I would use Microsoft .NET Web Services
> 

If it is a compact SOAP implementation you are looking for,
suitable for small systems, try the Enhydra site:
http://kxml.enhydra.org/  and related.

wbrogden@bga.com
Author of Soap Programming with Java - Sybex; ISBN: 0782129285




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Stream generator & XMLForms

Posted by Leszek Gawron <ou...@kompuart.pl>.
On Fri, Jul 12, 2002 at 08:55:23PM -0500, Ivelin Ivanov wrote:
> 
> Maybe you should be looking at Axis instead of Cocoon for this kind of task.
> 
> http://xml.apache.org/axis/
the problem is my client is Pocket PC 2002 and I do not have any SOAP client
libraries for it. 
if I had SOAP I would use Microsoft .NET Web Services

Any other ideas how to do it ? using cocoon actions maybe ?
	ouzo
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Stream generator & XMLForms

Posted by Ivelin Ivanov <iv...@apache.org>.
Maybe you should be looking at Axis instead of Cocoon for this kind of task.

http://xml.apache.org/axis/



-=Ivelin=-
----- Original Message -----
From: "Leszek Gawron" <ou...@kompuart.pl>
To: <co...@xml.apache.org>
Sent: Friday, July 12, 2002 2:42 PM
Subject: Re: Stream generator & XMLForms


> On Fri, Jul 12, 2002 at 09:32:12AM -0400, Andrew C. Oliver wrote:
> > enlightenment on this question is found here:
> >
http://xml.apache.org/cocoon/howto/xmlform-wizard/howto-xmlform-wizard.html
> I do not think that is the solution for my problem. From what I have read(
> maybe I'm wrong ) XMLForms are good for collecting data on server side for
> example in DOM Node. What I would like to do is to send xml data to server
> (prepared by client), do some businness processing and send response to
> client.
> In my case the client is a simple C++ application using MSXML
> ouzo
>
> PS. I would be grateful for any quick tutorial
> --
>             __
>          | /  \ |        Leszek Gawron            //  \\
>         \_\\  //_/      ouzo@vip.net.pl          _\\()//_
>          .'/()\'.     Phone: +48(600)341118     / //  \\ \
>           \\  //  recursive: adj; see recursive  | \__/ |
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Stream generator & XMLForms

Posted by "Andrew C. Oliver" <ac...@apache.org>.
my appolgoies, I misunderstood the question.

Leszek Gawron wrote:

>On Fri, Jul 12, 2002 at 09:32:12AM -0400, Andrew C. Oliver wrote:
>  
>
>>enlightenment on this question is found here: 
>>http://xml.apache.org/cocoon/howto/xmlform-wizard/howto-xmlform-wizard.html
>>    
>>
>I do not think that is the solution for my problem. From what I have read(
>maybe I'm wrong ) XMLForms are good for collecting data on server side for
>example in DOM Node. What I would like to do is to send xml data to server
>(prepared by client), do some businness processing and send response to
>client.
>In my case the client is a simple C++ application using MSXML
>	ouzo
>
>PS. I would be grateful for any quick tutorial
>  
>




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: Stream generator & XMLForms

Posted by William Brogden <wb...@bga.com>.
> -----Original Message-----
> From: Leszek Gawron [mailto:ouzo@kompuart.pl] 
> Sent: Friday, July 12, 2002 2:42 PM
> To: cocoon-users@xml.apache.org
> Subject: Re: Stream generator & XMLForms
> 
> 
> On Fri, Jul 12, 2002 at 09:32:12AM -0400, Andrew C. Oliver wrote:
> > enlightenment on this question is found here: 
> > 
> http://xml.apache.org/cocoon/howto/xmlform-wizard/howto-xmlfor
> m-wizard.html
> I do not think that is the solution for my problem. From what 
> I have read(
> maybe I'm wrong ) XMLForms are good for collecting data on 
> server side for
> example in DOM Node. What I would like to do is to send xml 
> data to server
> (prepared by client), do some businness processing and send 
> response to
> client.
> In my case the client is a simple C++ application using MSXML
> 	ouzo
> 

That sure sounds like a description of a SOAP RPC to me.

wbrogden@bga.com
Author of Soap Programming with Java - Sybex; ISBN: 0782129285





---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Stream generator & XMLForms

Posted by Leszek Gawron <ou...@kompuart.pl>.
On Fri, Jul 12, 2002 at 09:32:12AM -0400, Andrew C. Oliver wrote:
> enlightenment on this question is found here: 
> http://xml.apache.org/cocoon/howto/xmlform-wizard/howto-xmlform-wizard.html
I do not think that is the solution for my problem. From what I have read(
maybe I'm wrong ) XMLForms are good for collecting data on server side for
example in DOM Node. What I would like to do is to send xml data to server
(prepared by client), do some businness processing and send response to
client.
In my case the client is a simple C++ application using MSXML
	ouzo

PS. I would be grateful for any quick tutorial
-- 
            __
         | /  \ |        Leszek Gawron            //  \\
        \_\\  //_/      ouzo@vip.net.pl          _\\()//_
         .'/()\'.     Phone: +48(600)341118     / //  \\ \
          \\  //  recursive: adj; see recursive  | \__/ |


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Stream generator

Posted by "Andrew C. Oliver" <ac...@apache.org>.
enlightenment on this question is found here: 
http://xml.apache.org/cocoon/howto/xmlform-wizard/howto-xmlform-wizard.html

Leszek Gawron wrote:

>There is a nice example how cocoon can handle posted xml data under
>samples/request1 uri. Still I got no idea how to process this data. Let's
>suppose I really want to make an order so it has to end up in some database
>tables. What do I do ? Do I need to write my own action? Is it posssible to
>use only XSP ? If an action is needed can anyone provide me with simplest
>action code snippet. My knowledge of cocoon classes is still very limited.
>Thanks
>	ouzo
>  
>




---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>