cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From giacomo <giac...@apache.org>
Subject Re: SOAP client and server
Date Fri, 25 May 2001 18:26:10 GMT


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 an
> 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?

> Both the request and the response work on the basis of soap envelopes.
> The sample uses the "Weather - Temperature" service (id=8) from xmethods.
>
> I'd appreciate comment/feedback or some help on the todo topics.
>
> To install the sample:
> - put the apache soap jar from http://xml.apache.org/soap/index.html in your
> classpath
> - upgrade xerces to version 1.4.0 (1.3.1 does not work with soap while 1.2.1
> 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?

> - 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 soaplib.zip in htdocs/soaplib in the c2 root directory
> - 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.

> - Create a selector that is able to select a server page based on the method
> 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 :) ?

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

Many thanks

Giacomo


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


Mime
View raw message