> From: Koen Pellegrims [mailto:[EMAIL PROTECTED]]
> 
> Yes, Cocoon can do all this (and a lot more)!
> 
> If I were you I would take a closer look at XForms, the will provide
you
> with extensive form-handling capabilities, including complex
validation
> support.
> For the database part, you can use either XSPs or the DatabaseActions.
> 
> I would suggest you take the time to read the Cocoon-documentation and
> browse through the samples, because everything you need is in there.
> 
> Don't cling too much to the fact that you are using a PocketPC. If
your
> application sends data as an HTTP request, your server can handle it
easily;
> you could develop the entire server-side application using a normal
browser
> as a client and then switch over to the PocketPC...
> 
> To answer you last question: the StreamGenerator generates XML data
from an
> incoming stream, who's length is not fixed. You won't be needing this,
as
> you are processing normal HTTP GET or POST requests.

I think he may need either XForms (to get XML posted by client into DOM
variable) or StreamGenerator (to do the same into SAX stream).

When request is in DOM variable, you can do all kind of processing in
XSP and output detailed error, or (detailed) success.


To answer question what to do with SAX generated from StreamGenerator:
you can process it. Either by XSLT, or by custom transformer, or by
combination of several transformers (XSLT, SQL, LDAP, custom).
 

Vadim


> K.
> 
> > -----Oorspronkelijk bericht-----
> > Van: Leszek Gawron [mailto:[EMAIL PROTECTED]]
> > Verzonden: zaterdag 13 juli 2002 12:29
> > Aan: [EMAIL PROTECTED]
> > Onderwerp: Cocoon as an application server
> >
> >
> > Still being lame to cocoon that is why next questions come (among
> > of which the
> > main is: how to do it ?)
> >
> > 0. I'd like to use cocoon as application server
> >
> > 1. The Pocket PC application needs to send some data to cocoon
> > sever. This is
> > quite structured and complex data.
> >
> > 2. Using XHTTPRequest component from MSXML library I'm sending
> > this data to
> > cocoon server.
> >
> > 3. Cocoon server processes the data and sends a XML response.
> >
> > and now the details:
> > ad 1). Let's assume the request data is an order so if it was xml it

> > might look somewhat like (taken from cocoon://samples/Order)
> > <?xml version="1.0"?>
> >     <Orders>
> >     <OrderID>20259</OrderID>
> >     <CustomerID>WWWWWWW</CustomerID>
> >     <EmployeeID>6</EmployeeID>
> >     <OrderDate>2001-05-05 00:00:00</OrderDate>
> >     <ShipVia>1</ShipVia>
> >     <Freight>11.6100</Freight>
> >     <ShipName>Thoms White</ShipName>
> >     <ShipAddress>Somestr. 48</ShipAddress>
> >     <ShipCity>Munster</ShipCity>
> >     <ShipRegion>West</ShipRegion>
> >     <ShipPostalCode>00000</ShipPostalCode>
> >     <ShipCountry>Germany</ShipCountry>
> >     <OrderDetails>
> >             <OrderID>20259</OrderID>
> >             <ProductID>51</ProductID>
> >             <UnitPrice>42.4000</UnitPrice>
> >             <Quantity>40</Quantity>
> >             <Discount>0.0</Discount>
> >     </OrderDetails>
> >     <OrderDetails>
> >                     <OrderID>20259</OrderID>
> >                     <ProductID>14</ProductID>
> >                     <UnitPrice>18.6000</UnitPrice>
> >                     <Quantity>9</Quantity>
> >                     <Discount>0.0</Discount>
> >     </OrderDetails>
> >     <OrderDetails>
> >                     <OrderID>20259</OrderID>
> >                     <ProductID>7</ProductID>
> >                     <UnitPrice>12.4000</UnitPrice>
> >                     <Quantity>30</Quantity>
> >                     <Discount>0.0</Discount>
> >     </OrderDetails>
> >     <Customers>
> >             <CustomerID>WWWWWWW</CustomerID>
> >             <CompanyName>Thomas White</CompanyName>
> >             <ContactName>Karin Black</ContactName>
> >             <ContactTitle>Marketing Manager</ContactTitle>
> >             <Address>Somestr. 48</Address>
> >             <City>Munster</City>
> >     </Customers>
> > </Orders>
> >
> > I am not able to use SOAP because Pocket PC platform does not
> > have a good one
> > ( .NET Compact Framework is still beta and PocketSOAP won't even 
> > run on Emulator - I think they cannot be considered as a good basis 
> > for reliable software).
> >
> > The data does not have to be in that format. If not the question 
> > is : WHAT FORMAT ?
> >
> > ad 3)
> > Using cocoon functionality (actions I think) I have to be 
> > able to parse client
> > data, connect to database, validate data against database, 
> > do some database
> > insertions and finally send some response to client
> > now the questions:
> > 1. IS IT POSSIBLE TO PARSE A REQUEST PARAMETER WITH XML PARSER?
> > 2. HOW CAN I OBTAIN A CONNECTION FROM COCOON POOL ?
> > 3. HOW CAN I SEND STRUCTURED XML RESPONSE USING COCOON ACTION?
> >
> > In third question I mean I have to provide a client with a 
> > complex error response if error occurs (for example there are 
> > only 5 units of product of id
> > 14, so this cannot be only: order not taken  ). I'd like to 
> > do it simple and
> > scalable way ( it means no SAX handling if it's possible)
> >
> > My time is running and I still have no idea how to manage it 
> > all. I've nearly
> > "mastered" providing pocket pc client with xml data provided by 
> > cocoon querying databases and it works like a charm. The only 
> > thing i need now is to
> > provide cocoon with data it will be able to understand and process.
> >
> > the last question is : WHAT IS STREAM GENERATOR FOR ? IT CAN
> > XML'IZE A REQUEST
> > PARAMETER BUT HOW CAN I PROCESS THIS XML TREE?
> >
> > I would do anything with the simplest example that solves my problem
> >     ouzo
> > --
> >             __
> >          | /  \ |        Leszek Gawron            //  \\
> >         \_\\  //_/      [EMAIL PROTECTED]          _\\()//_
> >          .'/()\'.     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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to