Making a WAP engine is bit difficult to accomplish as there are no organized document for this. Nokia's http client example is quite good to start up the process. That example is not working because of proxy installation part is missing there. Anyways I put the solution below, hope it may help you guys.
It is best to use RHTTPSession over RConnection. It means it wouldn't be compatible with the previous SDK i.e. 1.2. RConnection is supported 2.0 onward. But using RConnection is the best to do, you will have more controll over the connection management. So I explain how to use RHTTPSession using RConnection. The following code may have typos.
//The rest of the code is in Http example client to make a simple wap client
#include <httpfilterproxyinterface.h> //CHttpFilterProxyInterface
User::LeaveIfError(iConnection.Open( iSocketServ ));
iConnection.Start(); //Synchronous, so blocking here
//There is a known bug for Nokia6630 for which automatic proxy configuration does not work
//Manual proxy configuration is needed
//Installing the automatic proxy configuration
RHTTPConnectionInfo connInfo = iHttpSession.ConnectionInfo();
// Attach to connection
TInt connPtr = REINTERPRET_CAST(TInt, &iConnection);
connInfo.SetPropertyL(iHttpSession.StringPool().StringF(HTTP::EHttpSocketConnection, RHTTPSession::GetTable()), THTTPHdrVal(connPtr));
//Use the Nokia's Http client example to make get or post request it will work
void IssueHTTPGetL(const TDesC8& aUri)
//Opening the transaction
iTransaction = iHttpSession.OpenTransactionL(uri, *this, RStringF());
RHTTPHeaders hdr = iTransaction.Request().GetHeaderCollection();
//Depending on your needs, set http request header
//SetHeaderL(hdr, HTTP::EAccept, KAccept);
iTransaction.SubmitL(); //Asynchronous call for which MHFRunL(...) will be invoked
Kalderas used hard coded proxy ip and port which in fact would not be the case for real implementation. The proxy info has to queried from CommDB which is another long story. Symbian OS developer seem to be changing their CommDB in every new release. So it is pretty hard to comply with that stuff. I had several posts on getting WAP proxy addr. and port. I have almost got it done except for Nokia6630. I have given also the solution for getting proxy which is working with all the devices except Nokia6630. Hope Nokia experts would put their thoughts someday.