Notes/Domino and WAP/WML

It is extremely easy to combine great Notes/Domino groupware possibilities with new emerging WAP technology. There are a lot of different possibilities to combine those two technologies, but one interesting issue is how to create new Notes document from wireless devices.

Here is one simple way how to do it. Only thing you need is one Notes form, two Notes agents and minimum WML knowledge together with environment where you will be able to test everything (Domino server and WML simulator or existing WAP/WML connection).

Example can be used in Help Desk applications directly.

Mario Rotim
rotim@sys.hr
SYS d.o.o Kuhaceva 13 10000 Zagreb Croatia tel. +385 1 233 9999, (GSM)+385 91 2387 162, fax: +385 1 233 8800
http://www.sys.hr

PS The example has been designed and tested carefully. Feel free to use this code in your publication or in any way you find it is useful and do not hesitate to contact me in case you need any additional comments or whatever and of course do not forget to send me a t-shirt.

1. Prepare Domino web server as WML server
The example is written for Phone.com Software Development Kit (UP.Link) Release R4.B2 that support WAP 1.1 (http://updev.phone.com ).
Configure your Web server to serve WML and other WAP file types in the way to support the following MIME types and extensions:
WML text/vnd.wap.wml wml
WMLScript text/vnd.wap.wmlscript wmls

2. Create new Notes database (in our example WMLDemo.nsf)

3. Create new Notes form with two fields in the database (in our example Demo)
Form name: Demo
Field: Location
Field: Description
Specify WebQuerySave event as: NewWMLDocument (name of the second agent)


4. Create basic Notes agent and call them wml
Sub Initialize
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim query As String

Set db = session.CurrentDatabase
' You can use the standard mechanism to access CGI variables
Set doc = session.DocumentContext
query = doc.Query_String(0)

' Print the wml context type first as http header
' prior to use this database mime types on the Domino server
' must be updated for the wml context types
Print "Content-type: text/vnd.wap.wml"
Print "<?xml version=""1.0""?>"
Print "<!DOCTYPE wml PUBLIC ""-//WAPFORUM//DTD WML 1.1//EN"""
Print """http://www.wapforum.org/DTD/wml_1.1.xml"">"
' Start with wml code
Print "<wml>"
Print "<card ordered=""true"">"
Print "<do type=""accept"" label=""Send"">"
' database name = /WMLDemo.nsf/
' form name = Demo
Print "<go href=""/WMLDemo.nsf/Demo?CreateDocument"" method=""post"">"
' two fields in the WML form
Print "<postfield name=""location"" value=""$location""/>"
Print "<postfield name=""description"" value=""$description""/>"
Print "</go>"
Print "</do>"
Print "<p>"
Print "Location:"
Print "<select name=""location""^gt"
Print "<option value=""Amsterdam"">Amsterdam</option>"
Print "<option value=""New York"">New York</option>"
Print "<option value=""London"">London</option>"
Print "<option value=""Tokyo"">Tokyo</option>"
Print "<option value=""Sydney"">Sydney</option>>
Print "</select>"
Print "Problem description:"
Print "<input name=""description""/>"
Print "</p>"
Print "</card*gt"
Print "</wml>"
' End of the wml code
End Sub

5. Create Notes agent that will be triggered by WebQuerySave event and call them NewWMLDocument
Sub Initialize
' Response when new document has been created the same response as default response in standard Domino (Web) environment even this agent can contain more sophisticated mechanism (CGI variables, current document variables, etc.)
Print "Content-type: text/vnd.wap.wml"
Print "<?xml version=""1.0""?>"
Print "*<DOCTYPE wml PUBLIC ""-//WAPFORUM//DTD WML 1.1//EN"""
Print """http://www.wapforum.org/DTD/wml_1.1.xml"">"
Print "<wml>"
Print "<card>"
Print "<p>"
Print "Form processed"
Print "</p>"
Print "</card>"
Print "</wml>"
End Sub

6. Call your WML location from your WML device as: www.dominoserver.com/WMLDemo.nsf/wml?OpenAgent
In the UP.SDK you can use UP.Simulator to test WML applications. Anyway you should get the specified WML form. When you select location and enter problem description the data will be transferred to the Domino environment as standard Notes document. You can see the new created document in the Notes environment. Next improvements can be translating Notes Views into WML code and accessing to the Notes documents through the wireless devices.

This was first published in November 2000

Dig deeper on Domino Resources - Part 5

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchWinIT

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchEnterpriseLinux

SearchVirtualDataCentre.co.UK

Close