You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Brent Johnson <bl...@gmail.com> on 2004/07/15 21:16:47 UTC

Flow Tutorial and JX Naming Conventions

After finally giving up on XSP since its pretty much deprecated in
Cocoon anyways.. I decided to try control flow.  I dont like server
side Javascript.. but hey.. continuation ROCKS I must say.

The flow tutorial (both on cocoon.apache.org and distributed with
cocoon 2.1.5) apparently has a typo in it (I noticed one other mention
on the mailing list about this).

The user is told to create a file documents/guess.jx and later in the
flow script it calls sendPageAndWait("guess.jxt",...).  This doesnt
work since the file is actually called guess.jx and not jxt.

What is the current naming convention for JXTemplates?  Should they be
JXT or JX?  Is there an accepted standard or is it just mixed.. some
people use one some the other?

Also - anyone have any idea if Flowscript would be useful at all for
SOAP requests?  Since an actual browser isnt being used to access the
pipeline I wonder if its even worth it.  Anyone implemented(ing)
Cocoon to process SOAP requests using control flow?

Thanks,

- Brent

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


Re: Flow Tutorial and JX Naming Conventions

Posted by Scott Schwab <ss...@tripos.com>.

Tony Collen wrote:

> Brent Johnson wrote:
>
>>> I don't think it matters as long as you're consistent.  Remember, the
>>> sendPageAndWait() call triggers a *pipeline* request, not a file
>>> request.  I could be wrong, but the sitemap in the tutorial might be
>>> setup to generate on *.jx:
>>>
>>> <map:match pattern="*.jx">
>>>  <map:generate type="jxtemplate" src="docs/{1}.jxt"/>
>>>  ...
>>>  <map:serialize/>
>>> </map:match>
>>
>>
>>
>> Sorry - I meant to say pipeline request... I should know better (being
>> doing Cocoon development on and off for a couple production and dev
>> sites since the 1.x days).
>>
>> Anyways.. yes there is a pattern match on *.jx but it refers to
>> documents/*.jx.  Here it is from the document:
>>
>>     <map:match pattern="*.jx">
>>       <map:generate type="jx" src="documents/{1}.jx"/>
>>       <map:serialize type="xhtml"/>
>>     </map:match>
>
>
> Ahh, ok. gotcha.
>
>>
>>> The URLs are decoupled, albeit in a sort of goofy way.  If that's not
>>> how it's setup, then it is a typo... feel free to submit a patch :)
>>
>>
>>
>> Sure - I'll look around on the website and see what I need to do to
>> submit a patch.
>
>
> Actually, don't worry about it, it's a minor thing and I can fix it 
> shortly.
>
>>>> Also - anyone have any idea if Flowscript would be useful at all for
>>>> SOAP requests?  Since an actual browser isnt being used to access the
>>>> pipeline I wonder if its even worth it.  Anyone implemented(ing)
>>>> Cocoon to process SOAP requests using control flow?
>>>
>>>
>>> Not that I know of.
>>
>>
>>
>> Well.. guess I'll just be the first to try (as far as I know) !  If I
>> could use flow to process these incoming SOAP requests that would be
>> very helpful (I wont have to implement it myself).  The continuations
>> between requests is a pretty amazing feature.
>
>
> Hmm, I bet you could come up with some sort of Avalon component 
> wrapper for Axis (there could already be one and I just don't know 
> about it), and then you could pass the request body to the component 
> for processing.  I haven't used Axis at all though, so this is just me 
> spouting out ideas ;)
>
There is a SoapServer in org.apache.cocoon.components.axis.SoapServer, 
with one implementation, AxisRPCReader in the 2.1.5 release.  I am 
trying to build a generator which will take a SOAP request, document 
model, run it through AXIS to handle an binary attachment (zip file) I 
am sending, and the sending the AXIS output document down into the pipeline.

I am pretty new to Cocoon, and a bit rusty on Axis, so I have not had 
much luck yet, but if anyone thinks this will not work, I'd like to know.

Scott



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


Re: Flow Tutorial and JX Naming Conventions

Posted by Brent Johnson <bl...@gmail.com>.
> Hmm, I bet you could come up with some sort of Avalon component
> wrapper for Axis (there could already be one and I just don't know
> about it), and then you could pass the request body to the component
> for processing.  I haven't used Axis at all though, so this is just me
> spouting out ideas ;)

Idea spouting is exactly what I need :)  I've been brainstorming for
the last couple days trying to figure out how I could process the SOAP
request with XSP - and finally gave up (mostly after reading the
thread on the devel list about XSP just basically being there for
backward compatibility now).  Since this is a brand new project (a
spinoff of WebGate.. stripped down version that acts as a distributed
generic game rules server) I want to start out with something NOT
deprecated.

Thanks for the spouting... I'll definitely check into Avalon and Axis.

- Brent

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


Re: Flow Tutorial and JX Naming Conventions

Posted by Tony Collen <co...@umn.edu>.
Brent Johnson wrote:

>>I don't think it matters as long as you're consistent.  Remember, the
>>sendPageAndWait() call triggers a *pipeline* request, not a file
>>request.  I could be wrong, but the sitemap in the tutorial might be
>>setup to generate on *.jx:
>>
>><map:match pattern="*.jx">
>>  <map:generate type="jxtemplate" src="docs/{1}.jxt"/>
>>  ...
>>  <map:serialize/>
>></map:match>
> 
> 
> Sorry - I meant to say pipeline request... I should know better (being
> doing Cocoon development on and off for a couple production and dev
> sites since the 1.x days).
> 
> Anyways.. yes there is a pattern match on *.jx but it refers to
> documents/*.jx.  Here it is from the document:
> 
>     <map:match pattern="*.jx">
>       <map:generate type="jx" src="documents/{1}.jx"/>
>       <map:serialize type="xhtml"/>
>     </map:match>

Ahh, ok. gotcha.

> 
>>The URLs are decoupled, albeit in a sort of goofy way.  If that's not
>>how it's setup, then it is a typo... feel free to submit a patch :)
> 
> 
> Sure - I'll look around on the website and see what I need to do to
> submit a patch.

Actually, don't worry about it, it's a minor thing and I can fix it 
shortly.

>>>Also - anyone have any idea if Flowscript would be useful at all for
>>>SOAP requests?  Since an actual browser isnt being used to access the
>>>pipeline I wonder if its even worth it.  Anyone implemented(ing)
>>>Cocoon to process SOAP requests using control flow?
>>
>>Not that I know of.
> 
> 
> Well.. guess I'll just be the first to try (as far as I know) !  If I
> could use flow to process these incoming SOAP requests that would be
> very helpful (I wont have to implement it myself).  The continuations
> between requests is a pretty amazing feature.

Hmm, I bet you could come up with some sort of Avalon component 
wrapper for Axis (there could already be one and I just don't know 
about it), and then you could pass the request body to the component 
for processing.  I haven't used Axis at all though, so this is just me 
spouting out ideas ;)

Tony

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


Re: Flow Tutorial and JX Naming Conventions

Posted by Brent Johnson <bl...@gmail.com>.
> I don't think it matters as long as you're consistent.  Remember, the
> sendPageAndWait() call triggers a *pipeline* request, not a file
> request.  I could be wrong, but the sitemap in the tutorial might be
> setup to generate on *.jx:
> 
> <map:match pattern="*.jx">
>   <map:generate type="jxtemplate" src="docs/{1}.jxt"/>
>   ...
>   <map:serialize/>
> </map:match>

Sorry - I meant to say pipeline request... I should know better (being
doing Cocoon development on and off for a couple production and dev
sites since the 1.x days).

Anyways.. yes there is a pattern match on *.jx but it refers to
documents/*.jx.  Here it is from the document:

    <map:match pattern="*.jx">
      <map:generate type="jx" src="documents/{1}.jx"/>
      <map:serialize type="xhtml"/>
    </map:match>

> The URLs are decoupled, albeit in a sort of goofy way.  If that's not
> how it's setup, then it is a typo... feel free to submit a patch :)

Sure - I'll look around on the website and see what I need to do to
submit a patch.

> >
> > Also - anyone have any idea if Flowscript would be useful at all for
> > SOAP requests?  Since an actual browser isnt being used to access the
> > pipeline I wonder if its even worth it.  Anyone implemented(ing)
> > Cocoon to process SOAP requests using control flow?
> 
> Not that I know of.

Well.. guess I'll just be the first to try (as far as I know) !  If I
could use flow to process these incoming SOAP requests that would be
very helpful (I wont have to implement it myself).  The continuations
between requests is a pretty amazing feature.

Thanks,

- Brent

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


Re: Flow Tutorial and JX Naming Conventions

Posted by Tony Collen <co...@umn.edu>.
Brent Johnson wrote:

> After finally giving up on XSP since its pretty much deprecated in
> Cocoon anyways.. I decided to try control flow.  I dont like server
> side Javascript.. but hey.. continuation ROCKS I must say.
> 
> The flow tutorial (both on cocoon.apache.org and distributed with
> cocoon 2.1.5) apparently has a typo in it (I noticed one other mention
> on the mailing list about this).
> 
> The user is told to create a file documents/guess.jx and later in the
> flow script it calls sendPageAndWait("guess.jxt",...).  This doesnt
> work since the file is actually called guess.jx and not jxt.
> 
> What is the current naming convention for JXTemplates?  Should they be
> JXT or JX?  Is there an accepted standard or is it just mixed.. some
> people use one some the other?

I don't think it matters as long as you're consistent.  Remember, the 
sendPageAndWait() call triggers a *pipeline* request, not a file 
request.  I could be wrong, but the sitemap in the tutorial might be 
setup to generate on *.jx:

<map:match pattern="*.jx">
  <map:generate type="jxtemplate" src="docs/{1}.jxt"/>
  ...
  <map:serialize/>
</map:match>

The URLs are decoupled, albeit in a sort of goofy way.  If that's not 
how it's setup, then it is a typo... feel free to submit a patch :)

> 
> Also - anyone have any idea if Flowscript would be useful at all for
> SOAP requests?  Since an actual browser isnt being used to access the
> pipeline I wonder if its even worth it.  Anyone implemented(ing)
> Cocoon to process SOAP requests using control flow?

Not that I know of.

Tony

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