views:

105

answers:

2

Hi All,

I'm trying to POST some multipart form data to my server using a Browser Control.

The PostUrlL(); Method Panics with KERN-EXEC 3 as soon as it is invoked.

Here's a snippet similar to the one I'm using in my code.

// These LITerals are copied to pointer vars below
_LIT8(K_txt_Boundary, "0xABeR1122EEFFx0");
_LIT8(K_CT_MultipartFormData,"multipart/form-data");

HBufC *url = HBufC::NewL(URL_SIZE);
HBufC8 *contentType = HBufC::NewL(CONTENT_TYPE_SIZE);
HBufC8 *bufPostData = HBufC::NewL(POST_DATA_SIZE);
HBufC8 *boundary = HBufC::NewL(BOUNDARY_SIZE);

// Check allocation was successful 
// and copy required data to allocated space.

TAny *any = NULL;

TRAPD(error, iBrowser->PostUrlL(
                       *url, 
                       *contentType, 
                       *bufPostData, 
                       boundary, 
                       any)
             );

iBrowser, the browser control handle is created as follows: I'm ommiting error checking, but I do TRAP the function call within which the following snippet is placed.

iBrowserCapabilties = TBrCtlDefs::ECapabilityDisplayScrollBar 
                                | TBrCtlDefs::ECapabilityLoadHttpFw 
                                | TBrCtlDefs::ECapabilityGraphicalHistory 
                                | TBrCtlDefs::ECapabilityGraphicalPage 
                                | TBrCtlDefs::ECapabilityClientResolveEmbeddedURL 
                                | TBrCtlDefs::ECapabilityCursorNavigation
                                | TBrCtlDefs::ECapabilityClientNotifyURL;

iBrowserObserver = CBrowserObserver::NewL(this);

iBrowser = CreateBrowserControlL(   
                iAppView, 
                aRect,
                iBrowserCapabilties,
                TBrCtlDefs::ECommandIdBase, 
                NULL, // Soft keys
                iBrowserObserver, // Link Resolver
                NULL,
                NULL // Layout change 
        );

iBrowser->SetBrowserSettingL(TBrCtlDefs::ESettingsCookiesEnabled, ETrue);

I've cross checked to see if any of the pointer vars are NULL by logging their contents, they all seem to be fine, except for the any pointer which is intentional. (The document says it's reserved for future use, so I believe NULL should be an appropriate value).

I've also verified that iBrowser is a valid instance of a browser control. As mentiond above, I'm TRAPing the function which contains the code to create the browser control

The call PostUrlL(); fails with panic KERN-EXEC 3.

Any pointers, suggestions or alternatives are welcomed.

Thanks,
xk0der

A: 

could u verfiied the input parameter for PostUrl method here Platform Browser Control API documentation ??? and verify that u browser control is member on the class and initialized.

Ahmed Samir
+1  A: 

From the question comments:

I'm testing on Nokia E63. Also I'm using the Symbian^3 SDK.

E63 is a S60 3rd Edition Feature Pack 1 (S60 3.1) device. Though much attention has been given to binary compability between platform version, you should really be using a S60 3rd Edition SDK such as 3.0 or 3.1.

laalto
@laalto: Thanks for the pointer, I would soon be downloading the S60 3rd Edition SDK and testing my code.
xk0der
@laalto: In S60 3rd Edition SDK, Browser Control does not contain the PostUrlL() method :( . I've cross checked with S60 3.x source code. Thanks for your time. I'm awarding the answer to you, and yeah +1 :)
xk0der