×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    8

    WAP API on Nokia 7650

    Dear group

    I could not make 7650's WAP stack work, although I've read a corresponding section in Symbian OS Communication Programming, some other docs and posts on Symbia and Nokia news groups. Does it actually work for normal GPRS-avare SIMs you can buy from operators (Vodafone for example)? I can use WAP browser, but wnen I actually try to establish connection programmatically, I just have an event type 7 returned, which apparantly means "abort". Here is code I use:

    RWAPServ* iWapServ = new(ELeave) RWAPServ();
    CleanupStack::PushL(iWapServ);//2

    RWSPCOConn* iWspConn = new(ELeave) RWSPCOConn();
    CleanupStack::PushL(iWspConn);//3

    RWSPCOTrans* iWspTrans = new(ELeave) RWSPCOTrans();
    CleanupStack::PushL(iWspTrans);//4

    CCapCodec* iCap = CCapCodec::NewL();
    CleanupStack::PushL(iCap);//5

    iCap->SetServerSDUSize(150000);
    iCap->SetClientSDUSize(150000);

    err = iWapServ->Connect();
    if (err != KErrNone)
    console->Printf(KFormatFailed, err);

    RWAPConn::TPort RemotePort = 8201;
    RWAPConn::TPort LocalPort = 0;
    TBearer Bearer = EIP;
    TBool SecureConn = EFalse;

    err = iWspConn->Open(*iWapServ, KRemoteHost, RemotePort,
    LocalPort, Bearer, SecureConn);

    err = iWspConn->Connect(KClientHeaders, /* iCap*/ NULL);

    RWAPConn::TMethod Method = RWAPConn::EGet;

    err = iWspConn->CreateTransaction(Method, KURI, KHeaders, KBody, *iWspTrans);

    RWSPCOConn::TSessionState iState;
    err = iWspConn->GetSessionState(iState);

    //////////// here event type "7" is returned"
    RWSPCOConn::TEvent aEvent;
    err = iWspConn->GetEvent(aEvent, *iWspTrans);
    TInt aEventType = aEvent();
    console->Printf(_L("Event type is %d\r\n&quot, aEventType);

    HBufC8* iBuffer;
    iBuffer = HBufC8::NewLC(200);//6

    TPtr8 p = iBuffer->Des();
    p.Zero();
    err = iWspTrans->GetData(p, RWSPCOTrans::EResultBody);
    console->Printf(_L("Data is transfered.\r\n Code=%d\r\n&quot, err);

    HBufC* iBuf16 = HBufC::NewLC(200);//7
    TPtr16 p16 = iBuf16->Des();
    p16.Copy(*iBuffer);
    console->Printf(*iBuf16);
    console->Printf(_L("\r\nFinished printing buffer.&quot);

    err = iWspConn->Disconnect();
    err = iWspConn->Close();
    iWapServ->Close();

    CleanupStack::PopAndDestroy(6);


    Thanks in advance

    Andrey

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    196

    RE: WAP API on Nokia 7650

    Hi,

    question is copied to Symbian discussion board. Networking / Connectivity partition.


    Forum Nokia Developer Support

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×