Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 2571 invoked by uid 500); 27 Aug 2002 09:28:47 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 2557 invoked from network); 27 Aug 2002 09:28:46 -0000 Date: Tue, 27 Aug 2002 11:28:57 +0200 From: Marcus Crafter To: deepak Cc: cocoon-dev@xml.apache.org Subject: Re: Serving SOAP from Cocoon Message-ID: <20020827092857.GC26685@fztig938.bank.dresdner.net> References: <005101c24def$5c93ae60$0c01a8c0@saga> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <005101c24def$5c93ae60$0c01a8c0@saga> User-Agent: Mutt/1.4i X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Deepak, Thanks for your enquiry! :) The sources for the SOAP server currently aren't in Cocoon CVS, but are in bugzilla (http://nagoya.apache.org/), under bug #11728. There you'll be able to download the relevant Cocoon sources. You'll also need the Apache SOAP jar (http://xml.apache.org/soap), javamail.jar and activation.jar (java.sun.com) for it all to compile. Since posting the code to bugzilla I've done several improvements and will soon be updating the code that's currently available (probably later on today). The improvements include porting the Reader to use Axis instead of Apache SOAP, and several integration issues like logging, etc. Hope that helps. Cheers, Marcus On Tue, Aug 27, 2002 at 10:59:55PM +0530, deepak wrote: > Dear Sir, > I have read yr mail send to the cocoon-dev's regarding the above subject and > would like to test out the services provided. > > I am unable to find the code (classes) in the CVS or on the site as > mentioned in the mail. > > Kindly reply , if all the source files are present in the latest copy of > Apace-Cocoon ( as per the directory structure mentioned in the mail). > > regards > Deepak. > > ----- Original Message ----- > From: "Marcus Crafter" > To: "Cocoon Developers Mailing List" > Sent: Thursday, August 15, 2002 8:00 PM > Subject: Proposal: Serving SOAP from Cocoon > > > > Hi All, > > > > Hope all is well. > > > > Over the past couple of days I've been working on adding the > > ability for a Cocoon application to serve SOAP requests. > > > > The motivation for this work came from: > > > > o The need to share business logic data with other projects, ie. > > B2B communcation. > > > > o The desire to build an administration application and remotely query > > a live system about its status. > > > > Instead of building a second server into our application (ie. RMI, > > CORBA, etc), I thought it might be better to use SOAP for this for > > several reasons, mainly since servlet based Cocoon applications are > > really HTTP oriented servers anyway. > > > > The code adding this functionality is in bugzilla, #11728. > > > > My hope is that this feature is of use for others too. > > > > Essentially, I took the RPCRouterServlet from the Apache SOAP > > project and ported it to Cocoon as a Reader, which in effect > > allows you to register SOAP services within your Cocoon app, and > > serve data to other clients. > > > > The reader can be configured in the sitemap as follows: > > > > > > > src="org.apache.cocoon.reading.SoapRPCReader"> > > > > src="resource://org/apache/cocoon/components/soap/services/memory/Deployment > Descriptor.xml"/> > > > > > > > > Consult the javadocs for the full option set which includes the > > ability to set an EnvelopeEditorFactory, and custom SOAP server xml > > config file. > > > > The pipeline match is quite simple like most readers: > > > > > > > > > > > > > > With these 2 sections added to your sitemap, you can then make > > HTTP-POST queries to the above pipeline to deploy, list, invoke or > > undeploy particular SOAP services from your Cocoon app. The > > ServiceManagerClient class that comes with Apache SOAP is quite > > useful for this. > > > > I've included an example service with my patch which allows a > > remote client to query the amount of free & total memory the remote > > Cocoon app currently has, and also allows a client to invoke the > > garbage collector on the remote application. > > > > For those interested have a look at the class and deployment > > descriptor in the o/a/c/components/soap/services/memory directory, > > and the webapps/samples/soap directory. > > > > The SoapRPCReader also adds the Cocoon request, response, context > > and ComponentManager to the SOAP request context, which means it's > > possible for your SOAP services to access any avalon components you may > > have written, and also session data that may be relevant for the > > particular request. Have a look at the > > o/a/c/components/soap/services/template directory for an example of > > this. > > > > Normal SOAP services (ie. cocoon independant) can also be deployed, > > including those implemented in other languages via BSF support. The > > Apache SOAP documentation describes how this can be done. > > > > The reader itself requires the presence of the Apache SOAP jar > > (2.3.1 used during development), and the SUN activation and > > javamail jar. I've modified the build.xml so that the reader and > > associated services are only built if these libraries are present. > > > > I'm now looking at the various statistical & administration > > information we might like to provide from Cocoon, hopefully in > > combination with the instrumentation interfaces from Excalibur. > > > > Ok, so I hope its of use for more people that just me, if there's any > > questions, comments, feel free to ask. > > > > Cheers, > > > > Marcus > > > > -- > > ..... > > ,,$$$$$$$$$, Marcus Crafter > > ;$' '$$$$: Computer Systems Engineer > > $: $$$$: ManageSoft GmbH > > $ o_)$$$: 82-84 Mainzer Landstrasse > > ;$, _/\ &&:' 60327 Frankfurt Germany > > ' /( &&& > > \_&&&&' > > &&&&. > > &&&&&&&: > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org > > For additional commands, email: cocoon-dev-help@xml.apache.org > > > > > > > > > > > > -- ..... ,,$$$$$$$$$, Marcus Crafter ;$' '$$$$: Computer Systems Engineer $: $$$$: ManageSoft GmbH $ o_)$$$: 82-84 Mainzer Landstrasse ;$, _/\ &&:' 60327 Frankfurt Germany ' /( &&& \_&&&&' &&&&. &&&&&&&: --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org