I'm writing a program that will request information from web servers via a WAP gateway. However, I have not got the Series 60 WAP API working.

What I'm doing is:

1) Request outbound communications from generic agent
RGenericAgent agent;

2) Connect to the Symbian OS wap server
RWAPServ server;

3) Initialize a connection to the wap gateway
RWSPCOConn connection;
// host contains the IP address of the wap gw
User::LeaveIfError(connection.Open(server, host, 9201, 0, EIP, EFalse));

4) Connect the connection
User::LeaveIfError(connection.Connect(clientHeaders, 0));

5) Create a transaction (the actual HTTP request equivalent?)
RWSPCOTrans transaction;
RWAPConn::EGet, uri, clientHeaders,
KNullDesC8, transaction));

Am I doing things right and in right order? When running on real hw, I get the connection point selection dialog, after which the GPRS connection gets opened and WAP GW reports a connection. But! The connection gets disconnected right away.

What should the client headers in step 4 include?

Any help is _very_ warmly appreciated!