cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Goetzmann Bertrand" <bgoetzm...@sophia.symag.com>
Subject Hosting a web service in Cocoon with Axis block (RE: Simple question on Cocoon and Web Service)
Date Wed, 08 Feb 2006 12:05:27 GMT
Hello,

Finally it's not difficult and you must look at axis block.

I post an article here on my web site on this subject, in french (http://www.object-everywhere.com/OBJECT-EVERYWHERE/articles/CocoonSW.xml).


With the use of the axis block, here the following steps if you want expose a Java class names
"Test" :


- Verify that the axis block is included


- Modify cocoon.xconf 

Find the following XML element

<component class="org.apache.cocoon.components.axis.SoapServerImpl" logger="core.source.soapserver"
role="org.apache.cocoon.components.axis.SoapServer"/>

You have the sub-element "managed-services" that lists all the services deployed ; add a new
descriptor element pointing to your own DeploymentDescriptor.wsdd file.

An example of a such file :

<deployment xmlns="http://xml.apache.org/axis/wsdd/" 
        xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"> 

    <service name="Test" provider="java:RPC"> 
        <parameter name="className" value="Test"/> 
        <parameter name="allowedMethods" value="echo"/> 
    </service> 

</deployment>

Here we have a class named Test with the method "echo" exposed. The class file is in WEB-INF\classes.


- You must restart the cocoon instance


- You can list all the web services with the URL :

http://localhost:8080/samples/blocks/axis/status.xsp

if your Cocoon installation has the xsp block

(change localhost et port number according to your configuration)


- If you want the WSDL document of your service, you can use the tool Java2WSDL (from Apache
Axis)


- If you want to invoke the "Test" service, use the URL 

http://localhost:8080/samples/blocks/axis/rpcrouter


It works because the example sitemap has the entry

<map:match pattern="rpcrouter"> 
    <map:read type="soap-rpc" mime-type="text/xml"> 
        <in-development-stage>false</in-development-stage> 
    </map:read> 
</map:match>

Have a look at the soap-rpc reader.


Hope this helps you.


Bertrand Goetzmann.

-----Message d'origine-----
De : Peter Neu [mailto:peter.neu@gmx.net] 
Envoyé : mercredi 8 février 2006 12:42
À : Goetzmann Bertrand
Objet : AW: Simple question on Cocoon and Web Service

Hello Bertrand,

I want to do the same thing with Cocoon but I have the same problem with
finding documentation. How did you solve the problem with the web service
integration?

Cheers,
Pete

-----Ursprüngliche Nachricht-----
Von: Goetzmann Bertrand [mailto:bgoetzmann@sophia.symag.com] 
Gesendet: Freitag, 20. Januar 2006 16:36
An: users@cocoon.apache.org
Betreff: RE: Simple question on Cocoon and Web Service

Thank you for this information !

Do you know where documentation can be found for the use of the axis block ?


Best regards. 

-----Message d'origine-----
De : giacomo@lapgp.otego.com [mailto:giacomo@lapgp.otego.com] De la part de
Giacomo Pati
Envoyé : vendredi 20 janvier 2006 10:13
À : users@cocoon.apache.org
Objet : Re: Simple question on Cocoon and Web Service

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


And there are the Apache Axis integration samples in
COCOON_HOME/src/blocks/axis

On Fri, 20 Jan 2006, JanGeek wrote:

> Date: Fri, 20 Jan 2006 09:55:46 +0100
> From: JanGeek <jan@geeksonly.de>
> Reply-To: users@cocoon.apache.org
> To: users@cocoon.apache.org
> Subject: Re: Simple question on Cocoon and Web Service
> 
> Hi Bertrand,
>
> you may have a look at the wiki-page:
>
> http://wiki.apache.org/cocoon/WebServiceServer
>
>
> On Friday 20 January 2006 09:20, Goetzmann Bertrand wrote:
>> Hi again,
>>
>> I know there is a way to use Cocoon as a SOAP client to invoke a web
> service, but what about implementing a web service with Cocoon ? Is it 
> out of the scope of Cocoon ?
>>
>> Thank you.
>>
>> "As Java implies platform independence, and XML implies language 
>> independence, JXTA implies network independence."
>>
>> B e r t r a n d   G o e t z m a n n
>> - - - - - - - - - - - - - - - - - - - - - Sun Certified Developer for 
>> the Java 2 Platform Sun Certified Enterprise Architect for J2EE 
>> Technology
>>
>> <!-- O B J E C T  - E V E R Y W H E R E, sur Apache Cocoon --> 
>> <site_web href=" www.object-everywhere.com "/>
>>
>> LaSer-Symag
>> Tél. 04 92 91 34 00
>> www.symag.com
>>
>>
>
>

- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com Orixo, the XML business
alliance - http://www.orixo.com -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFD0KmCLNdJvZjjVZARAn6JAKCgwro0JIvqgYhD+Sp/Aylgc0pHqQCfe7yl
O4j4mUgB17qYMzo2eYrc6Dg=
=9tUt
-----END PGP SIGNATURE-----

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




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


Mime
View raw message