You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Marcus Crafter <cr...@fztig938.bank.dresdner.net> on 2002/08/21 14:05:58 UTC

o.a.c.environment.http.* compatibility ?

Hi All,

	Hope all is well.
	
	I've been doing some work recently with the Apache SOAP library
	building a RPC reader for Cocoon, and have come across something
	I need some advice on.
	
	Apache SOAP uses the ServletContext, ServletRequest, etc, objects
	internally from the javax.servlet package to do various	things.
	
	Within Cocoon though, these objects are wrapped inside Cocoon's
	o.a.c.environment.http Context, Request, etc, classes, making this
	part of	the integration a little complex, as there's no way to get to
	the wrapped object, nor do the package names match (javax.servlet &
	o.a.c.environment) which causes ClassCastExceptions within the SOAP
	code.
	
	This seems to be a general issue if you want to integrate a 3rd
	party servlet oriented library into Cocoon (unless I've missed
	something?), so I thought about modifying the http implementations of
	the Cocoon environment classes so they actually implement the
	interface of the object they wrap.
	
	ie:
	
	public class HttpRequest implements Request {
	
	becomes
	
	public class HttpRequest implements Request, HttpServletRequest {
	
	and the same with o.a.c.e.http.HttpContext, etc, etc.

	That would allow the Cocoon http request, context, etc,
	implementations to be used implicitly as their javax.servlet.http.*
	counterparts in 3rd party libraries that rely on them.
	
	Would this change cause any problems ?

	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


RE: o.a.c.environment.http.* compatibility ?

Posted by Per Kreipke <pe...@onclave.com>.
>>From Axis FAQ:

"What is Axis? What is its relationship to Apache SOAP?
Axis is essentially Apache SOAP 3.0. It is a from-scratch rewrite, designed
around a streaming model (using SAX internally rather than DOM). The
intention is to create a more modular, more flexible, and higher-performing
SOAP implementation (relative to Apache SOAP 2.0)."

Also, the reverse Apache SOAP FAQ

http://xml.apache.org/soap/faq/faq_chawke.html

Per

> > > Hi All,
> > >
> > > 	Hope all is well.
> > >
> > > 	I've been doing some work recently with the Apache SOAP library
> > > 	building a RPC reader for Cocoon, and have come across something
> > > 	I need some advice on.
> >
> > BTW: Why did you choose to use Apache-SOAP instead of Apache-Axis? I've
> > heard there are interoperability issues with Apache-SOAP which
> Apache-Axis
> > tries to solve (and are very picky about it, which is good anyway).
>
> 	No particular reason, I looked at xml.apache.org and saw SOAP,
> 	and it also matched the code that was in a book I bought.
>
> 	Is Axis as functional as Apache-SOAP ?
>
> 	Cheers,
>
> 	Marcus


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


Re: o.a.c.environment.http.* compatibility ?

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Giacomo Pati wrote:
> On Wed, 21 Aug 2002, Marcus Crafter wrote:
> 
> 
>>On Wed, Aug 21, 2002 at 02:30:48PM +0200, Giacomo Pati wrote:
>>
>>>On Wed, 21 Aug 2002, Marcus Crafter wrote:
>>>
>>>
>>>>Hi All,
>>>>
>>>>	Hope all is well.
>>>>
>>>>	I've been doing some work recently with the Apache SOAP library
>>>>	building a RPC reader for Cocoon, and have come across something
>>>>	I need some advice on.
>>>
>>>BTW: Why did you choose to use Apache-SOAP instead of Apache-Axis? I've
>>>heard there are interoperability issues with Apache-SOAP which Apache-Axis
>>>tries to solve (and are very picky about it, which is good anyway).
>>
>>	No particular reason, I looked at xml.apache.org and saw SOAP,
>>	and it also matched the code that was in a book I bought.
>>
>>	Is Axis as functional as Apache-SOAP ?
> 
> 
> I'm not 100% sure but I think it has way more funtionallity that
> Apache-SOAP (xml-axis, xml-axis-wsif, xml-axis-wsil)

IIUC

Axis : Apache-SOAP = Xerces : Crimson

Bottom line: use Axis ASAP.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


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


Re: o.a.c.environment.http.* compatibility ?

Posted by Giacomo Pati <gi...@apache.org>.
On Wed, 21 Aug 2002, Marcus Crafter wrote:

> On Wed, Aug 21, 2002 at 02:30:48PM +0200, Giacomo Pati wrote:
> >
> > On Wed, 21 Aug 2002, Marcus Crafter wrote:
> >
> > > Hi All,
> > >
> > > 	Hope all is well.
> > >
> > > 	I've been doing some work recently with the Apache SOAP library
> > > 	building a RPC reader for Cocoon, and have come across something
> > > 	I need some advice on.
> >
> > BTW: Why did you choose to use Apache-SOAP instead of Apache-Axis? I've
> > heard there are interoperability issues with Apache-SOAP which Apache-Axis
> > tries to solve (and are very picky about it, which is good anyway).
>
> 	No particular reason, I looked at xml.apache.org and saw SOAP,
> 	and it also matched the code that was in a book I bought.
>
> 	Is Axis as functional as Apache-SOAP ?

I'm not 100% sure but I think it has way more funtionallity that
Apache-SOAP (xml-axis, xml-axis-wsif, xml-axis-wsil)

Giacomo


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


Re: o.a.c.environment.http.* compatibility ?

Posted by Marcus Crafter <cr...@fztig938.bank.dresdner.net>.
On Wed, Aug 21, 2002 at 02:30:48PM +0200, Giacomo Pati wrote:
> 
> On Wed, 21 Aug 2002, Marcus Crafter wrote:
> 
> > Hi All,
> >
> > 	Hope all is well.
> >
> > 	I've been doing some work recently with the Apache SOAP library
> > 	building a RPC reader for Cocoon, and have come across something
> > 	I need some advice on.
> 
> BTW: Why did you choose to use Apache-SOAP instead of Apache-Axis? I've
> heard there are interoperability issues with Apache-SOAP which Apache-Axis
> tries to solve (and are very picky about it, which is good anyway).

	No particular reason, I looked at xml.apache.org and saw SOAP,
	and it also matched the code that was in a book I bought.
	
	Is Axis as functional as Apache-SOAP ?
	
	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


Re: o.a.c.environment.http.* compatibility ?

Posted by Marcus Crafter <cr...@fztig938.bank.dresdner.net>.
On Wed, Aug 21, 2002 at 02:41:20PM +0200, Carsten Ziegeler wrote:
> 
> >From the HttpEnvironment class:
>     public static final String HTTP_REQUEST_OBJECT = "httprequest";
>     public static final String HTTP_RESPONSE_OBJECT= "httpresponse";
>     public static final String HTTP_SERVLET_CONTEXT= "httpservletcontext";
> 
> So, if you are in a servlet environment, you can get these via the
> objectModel.
	
	Ah, thanks Carsten - didn't see that - I was always going
	through the ObjectModelHelper class to get things out of the
	objectModel.
	
	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


RE: o.a.c.environment.http.* compatibility ?

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Giacomo Pati wrote:
> Marcus Crafter wrote:
> >
> > 	ie:
> >
> > 	public class HttpRequest implements Request {
> >
> > 	becomes
> >
> > 	public class HttpRequest implements Request, HttpServletRequest {
> >
> > 	and the same with o.a.c.e.http.HttpContext, etc, etc.
> >
> > 	That would allow the Cocoon http request, context, etc,
> > 	implementations to be used implicitly as their javax.servlet.http.*
> > 	counterparts in 3rd party libraries that rely on them.
> >
> > 	Would this change cause any problems ?
> 
> The CLI version of Cocoon would be dependant on the servlet API, right?
> 
And it is not possible, for example the Request has a getSession() method
returning a o.a.c.e.Session object. But the HttpServletRequest has also
a getSession() method returning an object of a different class.

> IIRC the original servlet objects are in the objectModel reference.
Yes, they are.

>From the HttpEnvironment class:
    public static final String HTTP_REQUEST_OBJECT = "httprequest";
    public static final String HTTP_RESPONSE_OBJECT= "httpresponse";
    public static final String HTTP_SERVLET_CONTEXT= "httpservletcontext";

So, if you are in a servlet environment, you can get these via the
objectModel.

Carsten

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


Re: o.a.c.environment.http.* compatibility ?

Posted by Giacomo Pati <gi...@apache.org>.

On Wed, 21 Aug 2002, Marcus Crafter wrote:

> Hi All,
>
> 	Hope all is well.
>
> 	I've been doing some work recently with the Apache SOAP library
> 	building a RPC reader for Cocoon, and have come across something
> 	I need some advice on.

BTW: Why did you choose to use Apache-SOAP instead of Apache-Axis? I've
heard there are interoperability issues with Apache-SOAP which Apache-Axis
tries to solve (and are very picky about it, which is good anyway).

>
> 	Apache SOAP uses the ServletContext, ServletRequest, etc, objects
> 	internally from the javax.servlet package to do various	things.
>
> 	Within Cocoon though, these objects are wrapped inside Cocoon's
> 	o.a.c.environment.http Context, Request, etc, classes, making this
> 	part of	the integration a little complex, as there's no way to get to
> 	the wrapped object, nor do the package names match (javax.servlet &
> 	o.a.c.environment) which causes ClassCastExceptions within the SOAP
> 	code.
>
> 	This seems to be a general issue if you want to integrate a 3rd
> 	party servlet oriented library into Cocoon (unless I've missed
> 	something?), so I thought about modifying the http implementations of
> 	the Cocoon environment classes so they actually implement the
> 	interface of the object they wrap.
>
> 	ie:
>
> 	public class HttpRequest implements Request {
>
> 	becomes
>
> 	public class HttpRequest implements Request, HttpServletRequest {
>
> 	and the same with o.a.c.e.http.HttpContext, etc, etc.
>
> 	That would allow the Cocoon http request, context, etc,
> 	implementations to be used implicitly as their javax.servlet.http.*
> 	counterparts in 3rd party libraries that rely on them.
>
> 	Would this change cause any problems ?

The CLI version of Cocoon would be dependant on the servlet API, right?

IIRC the original servlet objects are in the objectModel reference.

Giacomo


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