Cocoon 2.1 Build Problem

2002-09-21 Thread Ivelin Ivanov


For the last few nights I have been trying to build the latest code from CVS
HEAD.
build clean webapp-local
always succeeds, but the generated class files are corrupted.
Also the libraries files copied under WEB-INF/lib are corrupted.
I've tried with both JDK 1.3 and JDK 1.4. Same outcome.
I've tried building from scratch in multiple directories on my disk.
Always the same.

Has any experienced this before? How did you fix it?

Any help appreciated,

-=Ivelin=-



-
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]




Re: About Auth Framework - Caching

2002-09-21 Thread Alan Hodgkinson


Antonio Gallardo Rivera wrote:

 I have a little web application with aprox. 123 pages. I need to setup the
 users and groups permisions to this pages. I am using the Authentication
 Framework. All this permisions are stored in a database in the server. The
 question is:
 
 Where are all the session data stored or mantained?

On the server in the JSP container.

 I ask this because I need to know what is the cost of read once and store all
 this data inside the user session vrs. Retrieve a value from the database on
 every access (using the user ID).
 
 I know this is a trade off between database transacctions vrs. network
 bandwidth.

No, it not a transaction vs. network bandwidth, since the session 
data is available locally on the server to your Cocoon Java classes. 
In fact, if your database server is on a separate machine you'll 
need some more bandwidth to talk to it. :)

Caching user specific information in the session is a normal trick for 
boosting performance. You just need to be aware that database updates 
from other users or administrators may make it out of date. Typically 
you need to restart the application or implement some sort of 'reset' 
mechanism that gets triggered when a database update occurs that 
affects the cached data.

Another trick is to have a global cache accessable to all users. You 
then provide accessor methods that could go to the database in the 
data hasn't been read yet. If I was doing this now I would use Avalon
components as the basis of a caching system.

Yet another trick is to cache your data globally and provide a link 
from the session. When the session expires you can retain (some of) 
the cached data. A typical use is to keep the entire user profile 
information in-memory. This makes logins fast, and is also nice if
the same users log in and out a lot.

I worked on JSP based systems where we cached _lots_ of global data. 
In our case it was reference data from a database, which almost never 
got changed. We just restarted the application after a reference 
data update. The caches allowed us to simplify our SQL joins 
considerably, making the DB requests much faster. 

We loaded the caches at system start. This made the delivery of the
very first page extremely slow (requesting one page was part of the 
start up procedure), but after that it was fast.

A nice hack to stop your global data from being garbage collected is 
to register (e.g. put() ) your global context (which would contain 
references to all your caches) into the system properties. Yeah, it's
ugly.. but it works. [If anyone knows a cleaner trick, let me know.]

A note about performance issues: Often we make the wrong assumptions.

If you write maintainable code, which is what the Avalon framework 
encourages, it's often better to carefully define the interfaces, and 
just throw up some basic code get the system running. Then find the
bottlenecks (which are often in surprising places) and refactor as
necessary.

Hope this helped.

Best wishes,

Alan.

-
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]




Re: About Auth Framework - Caching

2002-09-21 Thread Antonio Gallardo Rivera

Many thanks Alan. Of course it helped.

Antonio Gallardo

El Sábado, 21 de Septiembre de 2002 04:58, Alan Hodgkinson escribió:
 Antonio Gallardo Rivera wrote:
  I have a little web application with aprox. 123 pages. I need to setup
  the users and groups permisions to this pages. I am using the
  Authentication Framework. All this permisions are stored in a database in
  the server. The question is:
 
  Where are all the session data stored or mantained?

 On the server in the JSP container.

  I ask this because I need to know what is the cost of read once and store
  all this data inside the user session vrs. Retrieve a value from the
  database on every access (using the user ID).
 
  I know this is a trade off between database transacctions vrs. network
  bandwidth.

 No, it not a transaction vs. network bandwidth, since the session
 data is available locally on the server to your Cocoon Java classes.
 In fact, if your database server is on a separate machine you'll
 need some more bandwidth to talk to it. :)

 Caching user specific information in the session is a normal trick for
 boosting performance. You just need to be aware that database updates
 from other users or administrators may make it out of date. Typically
 you need to restart the application or implement some sort of 'reset'
 mechanism that gets triggered when a database update occurs that
 affects the cached data.

 Another trick is to have a global cache accessable to all users. You
 then provide accessor methods that could go to the database in the
 data hasn't been read yet. If I was doing this now I would use Avalon
 components as the basis of a caching system.

 Yet another trick is to cache your data globally and provide a link
 from the session. When the session expires you can retain (some of)
 the cached data. A typical use is to keep the entire user profile
 information in-memory. This makes logins fast, and is also nice if
 the same users log in and out a lot.

 I worked on JSP based systems where we cached _lots_ of global data.
 In our case it was reference data from a database, which almost never
 got changed. We just restarted the application after a reference
 data update. The caches allowed us to simplify our SQL joins
 considerably, making the DB requests much faster.

 We loaded the caches at system start. This made the delivery of the
 very first page extremely slow (requesting one page was part of the
 start up procedure), but after that it was fast.

 A nice hack to stop your global data from being garbage collected is
 to register (e.g. put() ) your global context (which would contain
 references to all your caches) into the system properties. Yeah, it's
 ugly.. but it works. [If anyone knows a cleaner trick, let me know.]

 A note about performance issues: Often we make the wrong assumptions.

 If you write maintainable code, which is what the Avalon framework
 encourages, it's often better to carefully define the interfaces, and
 just throw up some basic code get the system running. Then find the
 bottlenecks (which are often in surprising places) and refactor as
 necessary.

 Hope this helped.

 Best wishes,

 Alan.

 -
 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]

-
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]




Re: Cocoon 2.1 Build Problem

2002-09-21 Thread Jeff Turner

On Sat, Sep 21, 2002 at 02:18:54AM -0500, Ivelin Ivanov wrote:
 
 For the last few nights I have been trying to build the latest code from CVS
 HEAD.
 build clean webapp-local
 always succeeds, but the generated class files are corrupted.
 Also the libraries files copied under WEB-INF/lib are corrupted.
 I've tried with both JDK 1.3 and JDK 1.4. Same outcome.
 I've tried building from scratch in multiple directories on my disk.
 Always the same.

Perhaps you have *.class files in src/java/*, and they are being
filter-copied to build/cocoon/webapp/WEB-INF/classes.

I've just tried:

./build.sh -Dinclude.webapp.libs=yes clean webapp-local

and the generated webapp works fine.

--Jeff

 Has any experienced this before? How did you fix it?
 
 Any help appreciated,
 
 -=Ivelin=-

-
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]




Re: SimpleFormTransformer

2002-09-21 Thread Barbara Post

Hello, I guess only the javadoc you find in SimpleFormTransformer.java,
download it from CVS. Yeah, it seems not to be in the apache's website
javadoc...

Once you've gotten it, it's a fun component ;-)
--
website : www.babsfrance.fr.st
ICQ : 135868405
- Original Message -
From: Marcin Stefaniuk [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 20, 2002 7:38 PM
Subject: SimpleFormTransformer


Hello!
Where I can read about SimpleFormTransformer?

Marcin

-

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]



Etudiant: Wanadoo t'offre le Pack eXtense Haut Débit soit 150,92 euros d'économies !
Et pour 1 euro de plus, reçois le CD-ROM du jeu Dark Age of Camelot
+ 1 mois de jeu en réseau offert ! 
Clique ici : http://www.ifrance.com/_reloc/mail.etudiant 


-
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]




RE: Authentication framework (sunshine in 2.0.3) and modular database actions

2002-09-21 Thread Hugo Burm

Hi,

Meanwhile I have built an inputmodule that gets the login ID (and other user
info) from the authentication manager and feeds it as an attribute to the
modular database actions. You can find the source at
http://www.datagram.nl/AuthAttributeModule.java

Configure:
1) put the compiled class in
cocoon/WEB-INF/classes/nl/datagram/cocoon/components/modules/input
2) add a line to the cocoon.xconf:
component-instance
class=nl.datagram.cocoon.components.modules.input.AuthAttributeModule
logger=core.modules.input name=j-auth/
3) Your db descriptor file must look like:
root
  connectionsurvey/connection
  table name=t_consult alias=t_consult
keys
  key name=userid type=string autoincrement=false
mode name=j-auth parameter=ID type=others/
  /key
/keys
etc...

This will e.g. do a select query on the database select * from t_consult
where userid=ID, where ID is your login ID.
This will only work with the modular database actions of 2.1. See the latest
docs on modules and database actions.

Hugo
[EMAIL PROTECTED]

-Original Message-
From: Ralph Rauscher [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 19, 2002 1:45 AM
To: [EMAIL PROTECTED]
Subject: Re: Authentication framework (sunshine in 2.0.3) and modular
database actions


hi,

...sorry, no answer to your question! i'm having a similar problem, but i'm
still stuck at a lower level. i want to use the result ID of an
authentication by the sunrise framework for a database query, using xsp. you
said you've found a way to access the ID using
org.apache.cocoon.webapps.session.components.SessionManager. is there a
simple way to get the ID, say, in a string using java?

i would very appreciate your help, since i can't get the cocoon source to go
through it myself right now - good old modems... ;)

ralph


- Original Message -
From: Hugo Burm [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, September 17, 2002 8:36 PM
Subject: Authentication framework (sunshine in 2.0.3) and modular database
actions


 Hi,

 I am running 2.1 dev. I want to feed the result ID of an authentication by
 the authentication framework, into a database query.

 I made my own subclass of the non-modular DataseSelectAction and by using
 org.apache.cocoon.webapps.session.components.SessionManager, I could find
 the authentication ID in a sessioncontext and feed it to the select query.
 This is working ok, but it is not an elegant solution because I have to
 modify all database actions and keep them up to date with the current cvs
 version. And these guys are writing code faster than I can compile.

 A better solution would be to use the modular database actions. And feed
the
 authentication ID into the database action by an input module. In this way
I
 could use the unmodified database actions.

 I succeeded configuring the input module for request.  But I need one of
 two other modes:

 1) Sitemap parameter. Can I use a sitemap parameter as the input for an
 input module? How? This sounds trivial, but I could not find out how.

 2) Ideally, I would feed the session context, set up by the authentication
 framework, directly into the database query via the session input
module.
 I could not find an easy way. It looks like I have to map the xml
structure
 of the authentication context, which is stored into the session somehow,
 into a simple session attribute. So this looks like I have to write my own
 input module. I can do that, but any feedback that could point me to the
 right direction would be welcome.


 Thanks

 Hugo
 [EMAIL PROTECTED]






-
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]




Re: web app design

2002-09-21 Thread Raúl Wild-Spain


I'm sorry, Peter, but although I know it's important I've not quantified yet
questions as users max or transactions per second. I'm not accustomed nor
have experience in performance metrics. I've docs about engineering studies
for these practices and the only one I've deduced is that I will need a
special tool to simulate scenarios and detect my critical parameters that
will govern the application's overall performance and then to simulate
alternatives architectures ... is it completely correct?

for the time being I only understand that I should orient designs (in this
case) to minimize metrics as transaction delay, data delivery time for  good
user experiences. I know it's little or undefined but it's my starting
point.   :-(

 Thus, I only can respond the following questions:

 how dynamic the data is and where it is sourced:  is every page built
 dynamically, or are pages mostly static?  Is the data all XML, is some of
it relational DB, or does some come from
 other systems via EJBs?

Pages are mostly dinamic, from xml files and also stored in relational-DB.

As a comment to this question: For some weeks I'm looking for some people
with experience in NXDB ( Native XML DataBases), but it seems there aren't
much people working with NXDB because I have not still found anybody  ... I
thought that if normally we access a relational-DB to create xml files from
our querys then to base us in a NXDB could eliminate this intermediate
process ... Is it possible NXDB aren't still mature so I haven't found
anyone or is it not so easy?.

This framework will be for small business or medium business and to
construct and publish their corporative webs.

As you're suggested to me, I'll looking for in the mail archive.

thanks a lot for your help and guidelines, Peter
;-)






-
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]




XMLForm Example is not working

2002-09-21 Thread Antonio Gallardo Rivera

I downloaded the lastest CVS 2.1 and trying to see the XMLForm example.

It returns:

The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode notifies 
that org.apache.cocoon.ProcessingException says:
 
Failed to execute pipeline. 

More precisely:
 
org.apache.cocoon.ProcessingException: Failed to execute pipeline.: 
java.lang.ArrayIndexOutOfBoundsException: -1 

What I am doing wrong?

Thanks in advance,

Antonio Gallardo

-
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]




Re: web app design

2002-09-21 Thread Barbara Post


- Original Message -  As a comment to this question: For some weeks
I'm looking for some people
 with experience in NXDB ( Native XML DataBases), but it seems there aren't
 much people working with NXDB because I have not still found anybody  ...
I
 thought that if normally we access a relational-DB to create xml files
from
 our querys then to base us in a NXDB could eliminate this intermediate
 process ... Is it possible NXDB aren't still mature so I haven't found
 anyone or is it not so easy?.

Well Raul, when you use XML native databases (since 1999 I guess, at least)
you have to learn the proprietary query system they have, since they existed
before the xquery standard was officialized. I think of Tamino, the
x-query it uses is close to xquery, and it will be closer to xquery with
next release next year. As for Xindice, I only had a quick look at it, it
seems to be close to the query standard too.

Managing an NXDB is not so different from a relational database. Indeed, in
this world of growing xml use the data format you get when querying helps.
But when you think your system off, you have to think in terms of xml
structure, unlike relational tables.

I personally barely used relational DB, and a little NXDB, since I'm still
young (graduating within a few months).

Just my 2 cents, don't despair finding people you need, google will help you
;-)

Babs
--
website : www.babsfrance.fr.st
ICQ : 135868405



Etudiant: Wanadoo t'offre le Pack eXtense Haut Débit soit 150,92 euros d'économies !
Et pour 1 euro de plus, reçois le CD-ROM du jeu Dark Age of Camelot
+ 1 mois de jeu en réseau offert ! 
Clique ici : http://www.ifrance.com/_reloc/mail.etudiant 


-
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]




RE: Cocoon 2.0.3 and CastorTransformer

2002-09-21 Thread Michael Homeijer

Hi,

I have successfully used the CastorTransformer. I am working on a new
version that can be used to marshal and unmarshal, and doesn't use
deprecated classes/code anymore. It's not finished, but I allready use it in
a project.

I have it working in the latest CVS version of Cocoon, but it will probably
also work with 2.03. If you'r interessted, I can mail a copy of the latest
source.

You'r problem sounds like a classpath/version issue, otherwise I can also
find no explanation for the NoSuchMethodError

HTH,

Michael

-Original Message-
From: Werner Guttmann
To: [EMAIL PROTECTED]
Sent: 20-9-2002 5:07 
Subject: Re: Cocoon 2.0.3 and CastorTransformer

Thanks, Vadim. Now, please find below the stack trace (just the root
cause) from
Catalina's app specific log file. Looking at line 94  of
CastorTransformer.java
(from the scratchpad of the Cocoon 2.0.3 source dist) I can see that it
fails on
the line marked with -- ---, but simply woul dnot know enough to tell
why ?

Is anybody actually using the CastorTransformer sucessfully ?

Werner

   /**
 * Inner class eventhandler, forward the Castor SAX events
 * to Cocoon 2 Events
 */
CastorEventAdapter = new HandlerBase(){
public void startElement(String name, AttributeList attributes)
throws
SAXException
{
  AttributesImpl a= new AttributesImpl();
  for(int i=0;i attributes.getLength(); i++){

a.addAttribute(,attributes.getName(i),attributes.getName(i),
  ,attributes.getValue(i));
  }

---
CastorTransformer.super.contentHandler.startElement(,name,name,a);

}

public void characters(char[] chars, int offset, int length)
throws
SAXException
{
  CastorTransformer.super.contentHandler.characters(chars,
offset,
length);
}

public void endElement(String name) throws SAXException
{

  CastorTransformer.super.contentHandler.endElement(,
name,name);
}
};
  }




java.lang.NoSuchMethodError
at
org.apache.cocoon.transformation.CastorTransformer$1.startElement(Castor
Transformer.java:94)

at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:876)
at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:540)
at
org.apache.cocoon.transformation.CastorTransformer.insertBean(CastorTran
sformer.java:225)

at
org.apache.cocoon.transformation.CastorTransformer.process(CastorTransfo
rmer.java:173)

at
org.apache.cocoon.transformation.CastorTransformer.startElement(CastorTr
ansformer.java:132)

at
org.apache.cocoon.components.sax.XMLTeePipe.startElement(XMLTeePipe.java
:118)
at
org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1376)
at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLVal
idator.java:1284)

at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentSc
anner.java:1806)

at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatc
h(XMLDocumentScanner.java:1182)

at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScan
ner.java:381)

at
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
at
org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:269)
at
org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:222)
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractS
treamSource.java:206)

at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:1
43)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Cachi
ngEventPipeline.java:250)

at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(Cach
ingStreamPipeline.java:399)

at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(
SerializeNode.java:153)

at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:85)

at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.i
nvoke(PreparableMatchNode.java:156)

at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:109)

at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(P
ipelineNode.java:140)

at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:109)

at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(
PipelinesNode.java:144)

at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro
cessor.java:328)

at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro
cessor.java:293)

at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
at

PERFUME PROPOSAL: SOAP FOR COCOON

2002-09-21 Thread Steven Punte

PERFUME PROPOSAL:  SOAP FOR COCOON

For the web application project I'm orchestrating, we
wish to add commercial quality support for SOAP 
messaging: both act as a client and as a server.

I have examined the existing soap client package,
and new soap package, but I'm uncomfortable with
them because the former is xsp based, and the later
is implemented only as a reader.

It is my opinion that Cocoon needs components that can

play well together, and can be mixed and matched.
Therefore, I'd like to propose a package I call
PERFUME.

PERFUME:

1)  The implementation of Perfume shall result
in three distinct Cocoon components:

a)  A generator that can receive a soap
message and turn it into an xml sax
stream.

b)  A serializer that can convert an xml
stream into a return soap message.

c)  A transformer that can act as a soap
client.  Incoming xml is transmitted
as a soap message, the pipe is blocked
until return or time out, and then the 
received message is returned into the xml 
sax stream.
 
2)  The intended usage is:

a)  If one wishes to implement a soap service,
a pipeline beginning with the generator
and ending with the serializer is 
constructed.

b)  If one wishes to implement a soap client,
a pipeline with the transformer is constructed.

3)  Construction:

It seems to me there are really two fundamental
modules to this effort: a module that converts 
a sax stream to HTTP-SOAP, and a module that 
convert HTTP-SOAP to an xml sax stream.  Both
modules are used twice in the overall project,
both being used in the transformer component.

4)  Issues:

a)  First, how does this proposal sound to you?
Is this the type of soap implementation you
would like to see?

b)  Are any of the existing cocoon soap related
software suitably reusable and appropriate 
here.

c)  Is apache soap/axis suitable for use here?
My preliminary examination of these packages
are they overlap too much with existing 
cocoon to be easily integrated.

d)  It seems like the generator and serializer need
potentially an out-of-pipeline connection with
each other.  Or that some method of the generator 
conveying forward a soap related error to the
serializer is needed.

e)  Should WSDL be incorporate into this proposal?
Please someone correct me if I'm wrong, but 
don't WSDL and XmlSchema do almost the same
thing?  It seems like most of WSDL was a early
solution before XmlSchema became ready. I think
ebXml also makes no reference to WSDL.

f)  Should the soap-client transformer be able to 
execute multiple soap request to different 
services and not just one action?  Probably so.


SHORT-CIRCUIT:  NED INPUT!



Steven P. Punte
Candlelight Software
[EMAIL PROTECTED]
http://www.candlelightsoftware.com

__
Do you Yahoo!?
New DSL Internet Access from SBC  Yahoo!
http://sbc.yahoo.com

-
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]




Re: PERFUME PROPOSAL: SOAP FOR COCOON

2002-09-21 Thread Justin Fagnani-Bell


On Saturday, September 21, 2002, at 05:37  PM, Steven Punte wrote:

 PERFUME:

   1)  The implementation of Perfume shall result
   in three distinct Cocoon components:

   a)  A generator that can receive a soap
   message and turn it into an xml sax
   stream.

Why not use an Action? Then you could set sitemap variables, call other 
actions, use an existing generator...

   b)  A serializer that can convert an xml
   stream into a return soap message.

Would the current XMLSerializer work for this? I'm not that familiar 
with SOAP, but I was under the impression that it was xml documents 
sent via HTTP.


   c)  A transformer that can act as a soap
   client.  Incoming xml is transmitted
   as a soap message, the pipe is blocked
   until return or time out, and then the
   received message is returned into the xml
   sax stream.

Sounds nice. You could keep the piece that transforms the sax stream 
into soap separate from the soap client. That way you could just use an 
xsl stylesheet, or any other transformer, to create the soap and it 
would be more controllable by the end user.

Another thought is to have a SOAPAction that does a similar thing, this 
way you could receive a request, access a soap server, then setup the 
pipeline based on the results of the soap request. And maybe there's 
even a way to integrate this with flowscript so that flowscript can 
perform actions based on incoming soap, or you could access a soap 
service from within flowscript.

   2)  The intended usage is:

   a)  If one wishes to implement a soap service,
   a pipeline beginning with the generator
   and ending with the serializer is
   constructed.

   b)  If one wishes to implement a soap client,
   a pipeline with the transformer is constructed.

   3)  Construction:

   It seems to me there are really two fundamental
   modules to this effort: a module that converts
   a sax stream to HTTP-SOAP, and a module that
   convert HTTP-SOAP to an xml sax stream.  Both
   modules are used twice in the overall project,
   both being used in the transformer component.

   4)  Issues:

   a)  First, how does this proposal sound to you?
   Is this the type of soap implementation you
   would like to see?

   b)  Are any of the existing cocoon soap related
   software suitably reusable and appropriate
   here.

   c)  Is apache soap/axis suitable for use here?
   My preliminary examination of these packages
   are they overlap too much with existing
   cocoon to be easily integrated.

   d)  It seems like the generator and serializer need
   potentially an out-of-pipeline connection with
   each other.  Or that some method of the generator
   conveying forward a soap related error to the
   serializer is needed.

If it was a soap action rather than generator it could set sitemap 
parameters, or fail.

   e)  Should WSDL be incorporate into this proposal?
   Please someone correct me if I'm wrong, but
   don't WSDL and XmlSchema do almost the same
   thing?  It seems like most of WSDL was a early
   solution before XmlSchema became ready. I think
   ebXml also makes no reference to WSDL.

   f)  Should the soap-client transformer be able to
   execute multiple soap request to different
   services and not just one action?  Probably so.

You could chain the transformers, or use an aggregator for this.


--Justin


-
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]