Greetings,
                 In case this article looks long I have given a
                 brief summary at the end. The lengthy paragraphs
                 that are seen below could not be helped. I am
                 trying to be as brief as possible without
                 cutting the details.

                 I downloaded the hello.wml file from the wapit.com
                 site which is used as a test file for the fakewap
                 application. I renamed hello.wml to hello.xml and
                 invoked the same via a Ericsson R380 emulator (the
                 IP address of the machine where Kannel is installed
                 was set as the gateway address in the Ericsson emulator)

                 I got Error message "Browser cant read text/html content"

                 Next I copied a wap.xml file which was stored in the
                 $LIBXML_HOME/test folder(I assume this XML file outputs
                 WAP content) to the location where my Apache http
                 server looks for requested files. I tried to invoke
                 wap.xml in the Ericsson emulator, but again the same
                 result- "Browser cant read text/html content"

                 I checked the Kannel logs both times, after a
                 series of Octet strings the ending line was:

                 "Fetched URL/<xml-file-name> (text/html,charset="")

                 Refusing to give up I was bent upon making Kannel
                 extract the WAP content out of any well-formed XML
                 file.

                 So I configured the XML engine Cocoon to process
                 all XML requests sent to Apache. In a sample XML
                 file lying in the Cocoon folder I replaced all HTML
                 tags to WML tags and placed it in the DocumentRoot
                 of Apache. A third invocation of the XML file (.i.e
                 the sample Cocoon XML file outputting WAP content)
                 should have made Kannel recognize the output and
                 succesfully pass it on to Ericsson R380 emulator.
                 BUT again "Browser cant read text/html content"

                 Thoroughly frustrated now I wrote a servlet program
                 which outputs WAP content and invoked the servlet
                 via Kannel, this time I hit the jackpot Ericsson
                 R380 displayed the servlet's output. I called
                 hello.wml (mentioned above) and again Ericsson
                 is displaying the output.

                 All these experiments lead me to believe that
                 whenever Kannel sees a .xml extension in the URL
                 it fetches the output of the XML file and(even if
                 it is proper WAP content) passes this output to
                 the GNOME XML library. This in turn fails the
                 OUTPUT of the XML files I have been trying to invoke.

                 Any diagnostic help- as to why Kannel fails to
                 recognize the content-type of the XML files
                 and labels the content-type as text/html even
                 though these XML files output proper WAP
                 content- would be appreciated.

                 To help the people here I have drawn a small
                 diagram which explains the short setup that I
                 have on my system:


       ___________                                                 ________________
       | ERICSSON|  REQUEST FOR WAP CONTENT GENERATING XML FILE    | KANNEL       | 
       | R380    |_____________________\\__________________________| ____________ |
       | EMULATOR|                     //                          | | BEARERBOX| | 
       |_________|                                                 | |__________| | 
                                                                   |              | 
                                                                   |     +        |
                                                                   | _________    |
                                                                   | | WAPBOX|    |
                                                                   | |_______|    |
                                                                   |______________|
                                                                         |
                                                                         | R
                                                                         | E
                                                                         | Q
                                                                        \|/U
                                                                        \|/E
                                                                         | S
                                                                         | T
                                                                         |
                                                                         | P
                                                                         | A
                                                                         | S
                                                                         | S
                            __________                                   | E
                            | APACHE |        TO APACHE                  | D
                 _____\\____| HTTP   |________________//_________________|
                 |    //    | WEB    |                \\
                 |          | SERVER |
           XML   |          |________|
        OUTPUT   |              |
         SENT    |              |  XML
         BACK   /|\            \|/ PROCESSING
           TO   /|\            \|/ REQUEST REDIRECTED
         APACHE  |              |  TO COCOON
                 |          ____|____
                 |          | COCOON|
                 |____//____| XML   |
                      \\    | ENGINE|
                            |_______|

       I am summarizing the actions once more here:

       1) RENAMED hello.wml TO hello.xml FILE. BUT text/html

       2) COPIED SAMPLE libxml2 (WAP-GENERATING) XML FILE
          TO APACHE DOCUMENTROOT STILL text/html

       3) CONFIGURED XML ENGINE COCOON WITH APACHE. IN
          SAMPLE COCOON XML FILE REPLACED HTML TAGS
          WITH WML TAGS. BUT STILL text/html

       4) WROTE A SERVLET PROGRAM, SET CONTENT-TYPE
          AS text/vnd.wap.wml AND HURRAH OUTPUT OF
          SERVLET SEEN IN ERICSSON R380

       5) CONCLUSION: WHENEVER KANNEL SEES .xml
          EXTENSION, FETCHES OUTPUT AND PASSES
          IT ON TO libxml2. GNOME XML LIBRARY
          FAILS TO PROCESS OUTPUT AND LABELS
          IT AS text/html

        Thanks in advance.
                                             SNODX

Reply via email to