You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by scott <sc...@evolove.net> on 2003/07/31 11:04:21 UTC

Make SOAP call from Java action?

Hey all,

I'm trying to streamline a login process that's entirely too complicated and
uses a SOAP call to authenticate the user with the backend. It also makes use of
javascript to direct, which I want to elimiate through the use of actions.

The current matchers look like this:

<map:match pattern="">
    <map:redirect-to uri="login.html"/>
   </map:match>

	<!-- the login screen -->
   <map:match pattern="login.html">
     <map:read mime-type="text/html" src="login/login.html"/>
   </map:match>

	<!-- after the user has submitted the login details, process the login -->
   <map:match pattern="login">
     <map:generate type="serverpages" src="login/login.xsp"/>
     <map:transform type="xslt" src="login/login.xsl"/>
     <map:serialize type="html"/>
   </map:match>


   <map:match pattern="createsession">
     <map:generate type="serverpages" src="login/createsession.xsp"/>
     <map:transform type="xslt" src="login/createsession.xsl"/>
     <map:serialize type="html"/>
   </map:match>

What I want to know is: how would you guys handle authentication in a cocoon
webabb that needs to use soap? And if I wanted to use SOAP from within a java
class, are there any java examples of making soap requests?

thanks,
scott

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


Re: Make SOAP call from Java action?

Posted by Marcus Crafter <cr...@managesoft.com>.
Hi Scott,

On Thu, Jul 31, 2003 at 02:04:21AM -0700, scott wrote:
> What I want to know is: how would you guys handle authentication in a cocoon
> webabb that needs to use soap? And if I wanted to use SOAP from within a java
> class, are there any java examples of making soap requests?

There's lots of options open to you for authentication these days, if the
portal framework is too huge, consider using flowscript to handle the
flow through the login pages perhaps. 

If flowscript is too heavy or you're using an older version of cocoon, then 
at one stage I had a LoginSelector based on the switch style selector.

For making SOAP calls in Cocoon from Java code, you can use any SOAP library
like Axis for example. Axis gives you a programmatical API to the request
and response. Alternatively, you could also have a look at the use of the 
XScriptObject (I think it's called this) inside of the generated XSP
page in your current code and use that.

Hope that helps.

Cheers,

Marcus

-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   ManageSoft GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'
          &&&&.
    &&&&&&&:

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