> 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: [EMAIL PROTECTED]
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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>