You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Michael Gerzabek <mi...@aon.at> on 2002/09/23 23:44:39 UTC

cocoon:// protocol in actions not working

Hi,

i ran into troubles using cocoon.environment.SourceResolver in an action
to resolve some internal sitemap excalibur.source.Source in 2.1Dev. When
I do the same resolveURI in a generator or transformer everything works
fine, but in the action i get 'premature end of file' and a cocoon servlet
error is thrown.

anyone any ideas?

- michael

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


RE: cocoon:// protocol in actions not working

Posted by Michael Gerzabek <mi...@gmx.net>.
ok, right now i've done it. there is a difference now when moving from 2.0.X
to 2.1 in
resolving sources.

in 2.0.X you just needed to get the source say 

Source source = resolver.resolve("http://yourdestination.com");
and then get the InputStream -> source.getInputStream();

in 2.1 you have to provide an extra XMLConsumer - or the sitemap component
that
handles the SAX stream. I found the solution in CIncludeTransformer. For
that reason
my resolver worked in the pipeline, because there has been a XMLConsumer -
the pipeline itself.

thanks Casten

- Michael
> 
> 
> > -----Original Message-----
> > From: Michael Gerzabek [mailto:michael.gerzabek@gmx.net]
> > Sent: Tuesday, September 24, 2002 11:11 AM
> > To: cocoon-dev@xml.apache.org
> > Subject: RE: cocoon:// protocol in actions not working
> > 
> > 
> > Yes, i'm using the resolver brought to me by the act method. is this the
> > right way or shall i lookup the SourceResolver.ROLE from the 
> > ComponentManager?
> 
> This is the right way.
> 
> Carsten
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

-- 
Werden Sie mit uns zum "OnlineStar 2002"! Jetzt GMX wählen -
und tolle Preise absahnen! http://www.onlinestar.de


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


RE: cocoon:// protocol in actions not working

Posted by Carsten Ziegeler <cz...@s-und-n.de>.

> -----Original Message-----
> From: Michael Gerzabek [mailto:michael.gerzabek@gmx.net]
> Sent: Tuesday, September 24, 2002 11:11 AM
> To: cocoon-dev@xml.apache.org
> Subject: RE: cocoon:// protocol in actions not working
> 
> 
> Yes, i'm using the resolver brought to me by the act method. is this the
> right way or shall i lookup the SourceResolver.ROLE from the 
> ComponentManager?

This is the right way.

Carsten


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


RE: cocoon:// protocol in actions not working

Posted by Michael Gerzabek <mi...@gmx.net>.
Yes, i'm using the resolver brought to me by the act method. is this the
right way or shall i lookup the SourceResolver.ROLE from the ComponentManager?

- Michael

> Hmm, this works for me, can you give some more information? Do
> you use the resolver in the act method?
> 
> Carsten
> 
> > -----Original Message-----
> > From: Michael Gerzabek [mailto:michael.gerzabek@aon.at]
> > Sent: Monday, September 23, 2002 11:45 PM
> > To: cocoon-dev@xml.apache.org
> > Subject: cocoon:// protocol in actions not working
> >
> >
> > Hi,
> >
> > i ran into troubles using cocoon.environment.SourceResolver in an action
> > to resolve some internal sitemap excalibur.source.Source in 2.1Dev. When
> > I do the same resolveURI in a generator or transformer everything works
> > fine, but in the action i get 'premature end of file' and a cocoon
> servlet
> > error is thrown.
> >
> > anyone any ideas?
> >
> > - michael
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

-- 
Werden Sie mit uns zum "OnlineStar 2002"! Jetzt GMX wählen -
und tolle Preise absahnen! http://www.onlinestar.de


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


RE: cocoon:// protocol in actions not working

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Hmm, this works for me, can you give some more information? Do
you use the resolver in the act method?

Carsten

> -----Original Message-----
> From: Michael Gerzabek [mailto:michael.gerzabek@aon.at]
> Sent: Monday, September 23, 2002 11:45 PM
> To: cocoon-dev@xml.apache.org
> Subject: cocoon:// protocol in actions not working
>
>
> Hi,
>
> i ran into troubles using cocoon.environment.SourceResolver in an action
> to resolve some internal sitemap excalibur.source.Source in 2.1Dev. When
> I do the same resolveURI in a generator or transformer everything works
> fine, but in the action i get 'premature end of file' and a cocoon servlet
> error is thrown.
>
> anyone any ideas?
>
> - michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


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