You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Skip Carter <sk...@taygeta.com> on 2002/12/10 01:13:25 UTC

Re: Cannot access Cocoon WAP page

> I am having a problem while trying to access the sample hello.wml sample =
> page of Cocoon (I am running Apache Tomcat with Cocoon 2.0.3 on a =
> Windows 2000 system) with a mobile phone.
> The WAP browser waits a few seconds and then answers:
> 500: Web service problem:
> Please contact service provider.
> If I then select "Details", I read:
> 1500: Could not connect to site.
> 
> I have tried with a number of WAP emulators and it works perfectly; it =
> also works if I save the WML page and let the webserver serve it =
> directly
> (I also tried using different telecom providers with no success).

> Anyone has any ideas of the reason why this behaviour can happen?

> PARAM: 'user-agent' VALUES: '[SIE-ME45/23 UP.Browser/5.0.2.2 (GUI) UP.Link/5.1.1.4]'

The problem that you are having is because the UP.Browser does not like the 
DOCTYPE prologue
in the page that is being generated/sent.

You can make a quick fix by making your pipeline use <map:serialize 
type="html"/>
instead of <map:serialize type="wml"/>  for wap user agents.

In production, we use a more general solution of introducing a new browser 
agent in the sitemap
selectors section:

   <browser name="wapx" useragent="UP"/>    <!-- broken WML browser, does not 
like the DOCTYPE prologue -->


and then testing for a wapx browser in the pipeline:

            <map:select type="browser">
                 <map:when test="wap">
                     <map:transform src="stylesheets/{level}_wml.xsl" />
                     <map:serialize type="wml"/>
                 </map:when>
                 <map:when test="wapx">
                     <map:transform src="stylesheets/{level}_wml.xsl" />
                     <map:serialize type="html"/>
                 </map:when>
                 <map:otherwise>
                     <map:transform src="stylesheets/{level}_html.xsl" />
                     <map:serialize type="html"/>
                 </map:otherwise>
            </map:select>


this gives us the ability to handle proper WML browsers as well as the broken 
one.



Skip



-- 
 Dr. Everett (Skip) Carter      Phone: 831-641-0645 FAX:  831-641-0647
 Taygeta Scientific Inc.        INTERNET: skip@taygeta.com
 1340 Munras Ave., Suite 314    WWW: http://www.taygeta.com
 Monterey, CA. 93940            












---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Cannot access Cocoon WAP page

Posted by Costantino Sertorio <co...@swissonline.ch>.
Hi Skip and thank you,
but unfortunately that did not fix the problem. In fact, I have the same
problem if I try to access "hello.html", for example, with the mobile device
(which should be no problem).
Do you have any idea?

Costantino



----- Original Message -----
From: "Skip Carter" <sk...@taygeta.com>
To: <co...@xml.apache.org>
Sent: Tuesday, December 10, 2002 1:13 AM
Subject: Re: Cannot access Cocoon WAP page


>
> > I am having a problem while trying to access the sample hello.wml sample
=
> > page of Cocoon (I am running Apache Tomcat with Cocoon 2.0.3 on a =
> > Windows 2000 system) with a mobile phone.
> > The WAP browser waits a few seconds and then answers:
> > 500: Web service problem:
> > Please contact service provider.
> > If I then select "Details", I read:
> > 1500: Could not connect to site.
> >
> > I have tried with a number of WAP emulators and it works perfectly; it =
> > also works if I save the WML page and let the webserver serve it =
> > directly
> > (I also tried using different telecom providers with no success).
>
> > Anyone has any ideas of the reason why this behaviour can happen?
>
> > PARAM: 'user-agent' VALUES: '[SIE-ME45/23 UP.Browser/5.0.2.2 (GUI)
UP.Link/5.1.1.4]'
>
> The problem that you are having is because the UP.Browser does not like
the
> DOCTYPE prologue
> in the page that is being generated/sent.
>
> You can make a quick fix by making your pipeline use <map:serialize
> type="html"/>
> instead of <map:serialize type="wml"/>  for wap user agents.
>
> In production, we use a more general solution of introducing a new browser
> agent in the sitemap
> selectors section:
>
>    <browser name="wapx" useragent="UP"/>    <!-- broken WML browser, does
not
> like the DOCTYPE prologue -->
>
>
> and then testing for a wapx browser in the pipeline:
>
>             <map:select type="browser">
>                  <map:when test="wap">
>                      <map:transform src="stylesheets/{level}_wml.xsl" />
>                      <map:serialize type="wml"/>
>                  </map:when>
>                  <map:when test="wapx">
>                      <map:transform src="stylesheets/{level}_wml.xsl" />
>                      <map:serialize type="html"/>
>                  </map:when>
>                  <map:otherwise>
>                      <map:transform src="stylesheets/{level}_html.xsl" />
>                      <map:serialize type="html"/>
>                  </map:otherwise>
>             </map:select>
>
>
> this gives us the ability to handle proper WML browsers as well as the
broken
> one.
>
>
>
> Skip
>
>
>
> --
>  Dr. Everett (Skip) Carter      Phone: 831-641-0645 FAX:  831-641-0647
>  Taygeta Scientific Inc.        INTERNET: skip@taygeta.com
>  1340 Munras Ave., Suite 314    WWW: http://www.taygeta.com
>  Monterey, CA. 93940
>
>
>
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>