You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by taabpr <ta...@aster.pl> on 2004/07/28 12:54:52 UTC

Any convenient way to embed external pages?

Hi all,
It is a little bit connected with my previous mail (html generator with 
'post'), but much general question.
I have to embed some external content into existing page (a portlet) - 
to be more complex: they are forms with images.
So what I imaging is:
in sitemap:
        <map:match pattern="integratedata/*">
            <map:call resource="http://external_location/{1}" />
            <map:serialize/>
        </map:match>

So it takes care of all requests, + GET + POST.
Unfortunately it doesn't work with map:call.

My current solution is:

        <map:match pattern="integratedata/data*">
            <map:generate type="html" 
src="http://localhost:8080/xxx/data{1}?{request:queryString}"/>
            <map:serialize type="html"/>
        </map:match>

     <map:match pattern="integratedata/*.gif">
                <map:read mime-type="images/gif" 
src="http://localhost:8080/xxx/{1}.gif"/>
        </map:match>

Drawbacks:
1. I've to use GET method. How to move to POST?
2. Diferent matchers for different content.
3. When source changes I have to adjust to it (new reader, etc)

The first drawback could be really problem when form sends too much data 
- GET has limited uri.

Is there any way to simply achieve this? Any block?
Thanks,
    Tom



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


Re: Any convenient way to embed external pages?

Posted by Jan Hoskens <jh...@schaubroeck.be>.
You're right, you can use it on any url but it does need valid xml as 
response.

Kind Regards,
Jan

taabpr wrote:

> Jan Hoskens wrote:
>
>> To solve the first problem use the Web Service proxy generator in the 
>> Proxy block:
>>
>> <map:generate type="wsproxy" src="....">
>>    <map:parameter name="wsproxy-method" value="POST"/>
>> </map:generate>
>
>
> Isn't it only for xml content?
>    Tom
>
> ---------------------------------------------------------------------
> 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: Any convenient way to embed external pages?

Posted by taabpr <ta...@aster.pl>.
Jan Hoskens wrote:

> To solve the first problem use the Web Service proxy generator in the 
> Proxy block:
>
> <map:generate type="wsproxy" src="....">
>    <map:parameter name="wsproxy-method" value="POST"/>
> </map:generate>

Isn't it only for xml content?
    Tom

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


Re: Any convenient way to embed external pages?

Posted by Jan Hoskens <jh...@schaubroeck.be>.
To solve the first problem use the Web Service proxy generator in the 
Proxy block:

<map:generate type="wsproxy" src="....">
    <map:parameter name="wsproxy-method" value="POST"/>
</map:generate>


taabpr wrote:

> Hi all,
> It is a little bit connected with my previous mail (html generator 
> with 'post'), but much general question.
> I have to embed some external content into existing page (a portlet) - 
> to be more complex: they are forms with images.
> So what I imaging is:
> in sitemap:
>        <map:match pattern="integratedata/*">
>            <map:call resource="http://external_location/{1}" />
>            <map:serialize/>
>        </map:match>
>
> So it takes care of all requests, + GET + POST.
> Unfortunately it doesn't work with map:call.
>
> My current solution is:
>
>        <map:match pattern="integratedata/data*">
>            <map:generate type="html" 
> src="http://localhost:8080/xxx/data{1}?{request:queryString}"/>
>            <map:serialize type="html"/>
>        </map:match>
>
>     <map:match pattern="integratedata/*.gif">
>                <map:read mime-type="images/gif" 
> src="http://localhost:8080/xxx/{1}.gif"/>
>        </map:match>
>
> Drawbacks:
> 1. I've to use GET method. How to move to POST?
> 2. Diferent matchers for different content.
> 3. When source changes I have to adjust to it (new reader, etc)
>
> The first drawback could be really problem when form sends too much 
> data - GET has limited uri.
>
> Is there any way to simply achieve this? Any block?
> Thanks,
>    Tom
>
>
>
> ---------------------------------------------------------------------
> 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