You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Brent Johnson <bl...@gmail.com> on 2004/07/13 22:24:37 UTC

SOAP Server?

Has anyone implemented a SOAP server with (or alongside) Cocoon?  I
was looking into Apache's SOAP implementation and it requires an app
server.  Since my WebGate app already uses an internal Jetty server..
it looks like I have 2 options:

1)  Figure out how to get Servlets working alongside Cocoon and use
Apache's SOAP implementation.

2)  I could just use Cocoon right?  Create my own template match that
accepts POSTs and responds with valid SOAP responses.

Just looking for a little insight here..

Thanks,

- Brent

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


Re: SOAP Server?

Posted by Joose Vettenranta <jo...@iki.fi>.
Hi,

just wondering, could it possible to create new matcher for 
soap-requests? like this:

<map:matcher name="soap">
  <map:parameter name="namespace" value="http://example.com/" />
</map:matcher>

...

<map:match type="soap" match="foo">
  <map:generate src="foo" />
  <map:transform src="toSoap" />
  <map:serialize />
</map:match>

(would match for <foo xmlns="http://example.com"> ... in soap-message..
....

and then in serverpages able to use little like in flows.. like:

String value = <soap:value-of select="/foo/bar@value" />;

or perhaps doing some soap.xml file which would have some properties in 
it.. then same xml-file could be used to serve wsdl requests...

Just thinking how to create this...

- Joose

--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *


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


Re: SOAP Server?

Posted by Brent Johnson <bl...@gmail.com>.
This has helped greatly!  I hadn't really had a need to use the stream
generator.. just before reading your email I was thinking to myself
"now how am I going to inject this soap request into the pipeline?"

I've already got it reading the request and running an XSL
transformation as a test and it works great!  The next step though..
which I'm sure will be a pain.. is trying to figure out how I can run
some arbitrary Java code to attempt to process this request.

For example.. I want a single SOAP URL to process all incoming
requests.. the results of that request will depend on what sort of
"action type" the request has (i.e. an action type of "login" with
credentials).

I mean.. I could probably do this action test in the sitemap and use
different XSL transformers depending on the action.. but I think it
may get a little more complicated than that so I'll need to be able to
run some Java code to handle the processing.

Anyways.. at least Im on the right track now.

Thanks!

- Brent

On Tue, 13 Jul 2004 15:41:36 -0500, Scott Schwab <ss...@tripos.com> wrote:
> Hi Brent,
> I am in a similar situation, I have some simple SOAP methods, which are
> currently handled in a separate AXIS webapp, that I am moving into Cocoon.
> 
> So far I have been successful at reading a soap request using the
> flowing flow
> 
> Get the SOAP request into the stream, using the stream generator,
> I pass the SOAP request into transformer which converts it into a SQL
> transformer query,
> Run it through the SQL transformer,
> Get the results and build a SOAP response (an array of strings) and
> return it to the client.
> 
>    <map:match pattern="getModel">
>       <map:generate type="stream"/>
>       <map:transform type="xslt" src="toQueryModel.xsl"/>
>       <map:transform type="sql">
>         <map:parameter name="use-connection" value="PrimaryReadDatabase"/>
>         <map:parameter name="show-nr-of-rows" value="true"/>
>         <map:parameter name="clob-encoding" value="UTF-8"/>
>       </map:transform>
>       <map:transform type="xslt" src="fromQueryModel.xsl"/>
>       <map:serialize type="xml"/>
>    </map:match>
> 
> The next thing I am working on is how to handle a SOAP message with
> attachments.  It looks doable, but I have just started working with
> Cocoon upload file stuff.
> 
> Hope this helps,
> Scott
> 
> 
> 
> 
> Brent Johnson wrote:
> 
> >Has anyone implemented a SOAP server with (or alongside) Cocoon?  I
> >was looking into Apache's SOAP implementation and it requires an app
> >server.  Since my WebGate app already uses an internal Jetty server..
> >it looks like I have 2 options:
> >
> >1)  Figure out how to get Servlets working alongside Cocoon and use
> >Apache's SOAP implementation.
> >
> >2)  I could just use Cocoon right?  Create my own template match that
> >accepts POSTs and responds with valid SOAP responses.
> >
> >Just looking for a little insight here..
> >
> >Thanks,
> >
> >- Brent
> >
> >---------------------------------------------------------------------
> >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
> 
>

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


Re: SOAP Server?

Posted by Scott Schwab <ss...@tripos.com>.
Hi Brent,
I am in a similar situation, I have some simple SOAP methods, which are 
currently handled in a separate AXIS webapp, that I am moving into Cocoon.


So far I have been successful at reading a soap request using the 
flowing flow

Get the SOAP request into the stream, using the stream generator,
I pass the SOAP request into transformer which converts it into a SQL 
transformer query,
Run it through the SQL transformer,
Get the results and build a SOAP response (an array of strings) and 
return it to the client.


   <map:match pattern="getModel">
      <map:generate type="stream"/>
      <map:transform type="xslt" src="toQueryModel.xsl"/>
      <map:transform type="sql">
        <map:parameter name="use-connection" value="PrimaryReadDatabase"/>
        <map:parameter name="show-nr-of-rows" value="true"/>
        <map:parameter name="clob-encoding" value="UTF-8"/>
      </map:transform>
      <map:transform type="xslt" src="fromQueryModel.xsl"/>
      <map:serialize type="xml"/>
   </map:match>


The next thing I am working on is how to handle a SOAP message with 
attachments.  It looks doable, but I have just started working with 
Cocoon upload file stuff.

Hope this helps,
Scott





Brent Johnson wrote:

>Has anyone implemented a SOAP server with (or alongside) Cocoon?  I
>was looking into Apache's SOAP implementation and it requires an app
>server.  Since my WebGate app already uses an internal Jetty server..
>it looks like I have 2 options:
>
>1)  Figure out how to get Servlets working alongside Cocoon and use
>Apache's SOAP implementation.
>
>2)  I could just use Cocoon right?  Create my own template match that
>accepts POSTs and responds with valid SOAP responses.
>
>Just looking for a little insight here..
>
>Thanks,
>
>- Brent
>
>---------------------------------------------------------------------
>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


Re: SOAP Server?

Posted by Brent Johnson <bl...@gmail.com>.
Aha!  I think I ran across this link a while back.  I'll definitely
bookmark it and give it a good read.  It just seems to make more sense
to use Cocoon to handle the SOAP requests since my application already
uses Cocoon for its web interface.. rather than taking up more
resources by create an Apache SOAP module that fires up another Jetty
instance.

Thanks for the info!

- Brent

On Tue, 13 Jul 2004 15:40:08 -0500, Tony Collen <co...@umn.edu> wrote:
> 
> 
> Brent Johnson wrote:
> 
> > Has anyone implemented a SOAP server with (or alongside) Cocoon?  I
> > was looking into Apache's SOAP implementation and it requires an app
> > server.  Since my WebGate app already uses an internal Jetty server..
> > it looks like I have 2 options:
> >
> > 1)  Figure out how to get Servlets working alongside Cocoon and use
> > Apache's SOAP implementation.
> >
> > 2)  I could just use Cocoon right?  Create my own template match that
> > accepts POSTs and responds with valid SOAP responses.
> >
> > Just looking for a little insight here..
> >
> > Thanks,
> >
> 
> Brent,
> 
> Check out:
> 
> http://webservices.xml.com/pub/a/ws/2003/03/18/cocoon.html
> 
> It's a little dated but still perfectly relevant, I think.
> 
> Tony
> 
> ---------------------------------------------------------------------
> 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


Re: SOAP Server?

Posted by Tony Collen <co...@umn.edu>.
Brent Johnson wrote:

> Has anyone implemented a SOAP server with (or alongside) Cocoon?  I
> was looking into Apache's SOAP implementation and it requires an app
> server.  Since my WebGate app already uses an internal Jetty server..
> it looks like I have 2 options:
> 
> 1)  Figure out how to get Servlets working alongside Cocoon and use
> Apache's SOAP implementation.
> 
> 2)  I could just use Cocoon right?  Create my own template match that
> accepts POSTs and responds with valid SOAP responses.
> 
> Just looking for a little insight here..
> 
> Thanks,
> 

Brent,

Check out:

http://webservices.xml.com/pub/a/ws/2003/03/18/cocoon.html

It's a little dated but still perfectly relevant, I think.

Tony

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