cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CARLTON,NADINE (HP-Cupertino,ex1)" <>
Subject RE: SOAP client and server
Date Sat, 02 Jun 2001 00:49:31 GMT

Hi Michael,

  I've been looking at C2 for a few weeks and thought
I'd see if I'm understanding the basics by asking 
some questions about C2 support for SOAP.  If a question
doesn't make sense from a C2 standpoint, let me know.
I'm still coming up to speed on it.

I'm glad that you feel that C2 support for SOAP
is important.  I do too, but I have a couple of
questions about your tag library.

What is the reason that you want the SOAP-ENV:Envelope
syntax directly in the xsp pages?  I've looked at Uli's C1
SOAP implementation, and the syntax seems more intuitive 
for Cocoon users and I like backwards compatibility
when possible. I think it will also be easier to 
write a SAX state machine for a C2 SOAP
transformer for Uli's syntax.  You extract information
from the envelope and build calls that are very similar
to the C1 implementation.  If SOAP is requiring
or recommending the SOAP-ENV:Envelope for accessing service
information in client code though, then I may have 
to change my mind.  

I am interested in helping on SOAP support in C2 either
way. I just need to understand some of the design choices first.

Nadine Carlton
-----Original Message-----
From: giacomo []
Sent: Wednesday, May 30, 2001 8:35 AM
Subject: Re: SOAP client and server - Scanned for virus (fwd)

This mail was originally from Michael Homeijer

---------- Forwarded message ----------
Date: Wed, 30 May 2001 14:33:29 +0000 (GMT)
From: Alex Dijk <>
To: giacomo <>
Subject: Re: SOAP client and server  - Scanned for virus

Giacomo wrote:
> On Fri, 25 May 2001, Michael Homeijer wrote:
> > Hi,
> >
> > I am developing a SOAP prototype for Cocoon and need some feedback on my
> > first results.
> > The setup consists of a logic sheet, an xsp page with a SOAP request and
> > xsp page with a SOAP response.
> If I understand that correctly you are mentioning "a xsp page with SOAP
> request" for C2 act as a SOAP client and with "a xsp page with SOAP
> response" act as SOAP server, right? Is the logicsheet covering both
> aspects?

That's right, but until now I only worked out the request part. The
xsp page shows what has to be done to create a SOAP service.
> > Both the request and the response work on the basis of soap envelopes.
> > The sample uses the "Weather - Temperature" service (id=8) from
> >
> > I'd appreciate comment/feedback or some help on the todo topics.
> >
> > To install the sample:
> > - put the apache soap jar from in
> > classpath
> > - upgrade xerces to version 1.4.0 (1.3.1 does not work with soap while
> > does and 1.2.1 does not work with cocoon 2)
> > - put the soaplib.jar with the logicsheet in your classpath
> > - put the following reference to the logicsheet in cocoon.xconf
> >         <builtin-logicsheet>
> >           <parameter name="prefix" value="soap"/>
> >           <parameter name="uri" value="http://soaplib"/>
> >           <parameter name="href" value="resource://soap-lib.xsl"/>
> >         </builtin-logicsheet>
> Do you intend to "donate" your code to the C2 base and can we change the
> package and URI space names to Apache Cocoon 2 standards?

For me, the code will be used to design a service layer in our company
framework based on cocoon. If you "adopt" the code, I'll be happy to use it
and maybe develop some new ideas...
So go ahead and use it. BTW: This first version was to get some feedback on
how SOAP should really be integrated with Cocoon so I don't mind anyone
offending my solution as long as we get something working ;-)

> > - put the following lines in sitemap.xmap
> >    <map:match pattern="soaplib/*.xsp">
> >       <map:generate type="serverpages" src="htdocs/soaplib/{1}.xml"/>
> >       <map:transform src="htdocs/soaplib/{1}.xsl"/>
> >       <map:serialize/>
> >    </map:match>
> >
> >    <map:match pattern="soaplib/service/*.xsp">
> >       <map:generate type="serverpages"
> > src="htdocs/soaplib/service/{1}.xml"/>
> >       <map:serialize type="xml"/>
> >    </map:match>
> > - put the sample from in htdocs/soaplib in the c2 root
> > - retrieve http://localhost/c2/soaplib/temp.xsp in your browser
> >
> > The following stuff is on my todo list for the SOAP client request:
> > - Add the normal xsp parameter handling templates to the logic sheet
> > - Convert java variables from xsp into soap parameters
> > - Output the SOAP response envelope in xml to the server page
> >
> > As far as I understand Cocoon 2 components, I plan to implement the
> > following for the SOAP service:
> > - Create an action that extracts and validates the soap request envelope
> > from the httpservletrequest (code to use from apache soap is
> > service\dynamic1.xml)
> Sort of.

I'd love some documentation and clear examples on these Cocoon techniques.
Until now I've learnt the most from building with Cocoon and I don't quite
know where to start with this new stuff.

> > - Create a selector that is able to select a server page based on the
> > in the soap request envelope
> What do you think of implementing the services as Avalon Components and
> have a more generic xsp page/generator to map those Avalon Component
> into a SOAP response (not that I'm offending your solution :) ?

I'm listening.... if you could be more specific, I'll try to setup
something. ;-)

> > - Create a soap:response tag in the logic sheet
> > - Create tags to map java variables to soap tags
> Can we postpone the integration of this code into the repository after
> we've made the beta 1 (I propose it will go into the 2.1 release)

Yes ok.

> Many thanks
> Giacomo

Can't wait for the beta


To unsubscribe, e-mail:
For additional commands, email:

View raw message