IWeb GetResponse | developer.brewmp.com IWeb GetResponse | developer.brewmp.com

Developer

IWeb GetResponse

Forums:

Hi All,

I m developing web based application.

For Certain URL sometime callback function is not invoking.

I checked with webstatus also, it shows only Connection starting and then sits ideal.

But sometimes executes perfectly.

Thanks in advance:confused:

Yeh. It some times do happen. Some times it stops on ReadResponse after connecting. I too face the same problem, but dont know the exact reason for this. But one thing what I have noticed is, if the net is slow it do behaves same way as u mentioned
Regds
pramod

Yeh. It some times do happen. Some times it stops on ReadResponse after connecting. I too face the same problem, but dont know the exact reason for this. But one thing what I have noticed is, if the net is slow it do behaves same way as u mentioned
Regds
pramod

hi,
Check all others callbacks. if theirs time is too low, the sistem won't trigger your webresponse callback.
I did so and i solved my problem.
Hope this helps,
razvanica

hi,
Check all others callbacks. if theirs time is too low, the sistem won't trigger your webresponse callback.
I did so and i solved my problem.
Hope this helps,
razvanica

razvanica wrote:hi,
Check all others callbacks. if theirs time is too low, the sistem won't trigger your webresponse callback.
I did so and i solved my problem.
Hope this helps,
razvanica
Thanks for the reply. I had fone through ur reply earlier. But I do not understand what u mean by all other callback. when ever I used to call a url I have a callback function called WebReadData. But the function stops at WebStatusNotification. I think I dont have any other callback function in between. If it si there how can I check it is slow and how to rectify that. If u would like u can paste a little bit example for my understanding
Regards
Pramod

razvanica wrote:hi,
Check all others callbacks. if theirs time is too low, the sistem won't trigger your webresponse callback.
I did so and i solved my problem.
Hope this helps,
razvanica
Thanks for the reply. I had fone through ur reply earlier. But I do not understand what u mean by all other callback. when ever I used to call a url I have a callback function called WebReadData. But the function stops at WebStatusNotification. I think I dont have any other callback function in between. If it si there how can I check it is slow and how to rectify that. If u would like u can paste a little bit example for my understanding
Regards
Pramod

me->uFrameDuration=150;
CALLBACK_Init(&me->cb,StatusBox_AnimateTimer,me);
CALLBACK_Init(&me->cbGotResp, Brewser_GotResp, me);
ISHELL_SetTimerEx(me->piShell,me->uFrameDuration,&me->cb);
IWEB_GetResponseV(me->piWeb, &me->piWResp, &me->cbGotResp,
pbhCur->pszUrl,awo);
because StatusBox_AnimateTimer triggered too ofen (150ms) the Brewser_GotResp sometimes didn't trigger.
i solved this problem by setting me->uFrameDuration=1500.
Maybe u have something like this in your code.
Hope this helps,
razvanica

me->uFrameDuration=150;
CALLBACK_Init(&me->cb,StatusBox_AnimateTimer,me);
CALLBACK_Init(&me->cbGotResp, Brewser_GotResp, me);
ISHELL_SetTimerEx(me->piShell,me->uFrameDuration,&me->cb);
IWEB_GetResponseV(me->piWeb, &me->piWResp, &me->cbGotResp,
pbhCur->pszUrl,awo);
because StatusBox_AnimateTimer triggered too ofen (150ms) the Brewser_GotResp sometimes didn't trigger.
i solved this problem by setting me->uFrameDuration=1500.
Maybe u have something like this in your code.
Hope this helps,
razvanica

Hi,
Thanks for the reply. I dont have any other call bac k in my function. So that does not seems to be the problem. It may something else. My code is very simple. I am pasting the code for ur reference. I dont think there is any bug.
if (ISHELL_CreateInstance(Brg->a.m_pIShell,AEECLSID_WEB,(void**)&Brg->pIWeb)!=SUCCESS)
{
WebCleanUp(Brg);
return;
}
if (Url)
{
Brg->m_BodyBuffer=NULL;
Brg->m_BodyAllocSize=0;
Brg->m_BodySize=0;
CALLBACK_Init(&Brg->m_CallBack ,WebReadDataR,Brg);
IWEB_GetResponse(Brg->pIWeb,(Brg->pIWeb,&Brg->pIWebResp,&Brg->m_CallBack,
Url,WEBOPT_HANDLERDATA,Brg,WEBOPT_STATUSHANDLER,WebStatusNotificationR,WEBOPT_END));
}
Regards
Pramod

Hi,
Thanks for the reply. I dont have any other call bac k in my function. So that does not seems to be the problem. It may something else. My code is very simple. I am pasting the code for ur reference. I dont think there is any bug.
if (ISHELL_CreateInstance(Brg->a.m_pIShell,AEECLSID_WEB,(void**)&Brg->pIWeb)!=SUCCESS)
{
WebCleanUp(Brg);
return;
}
if (Url)
{
Brg->m_BodyBuffer=NULL;
Brg->m_BodyAllocSize=0;
Brg->m_BodySize=0;
CALLBACK_Init(&Brg->m_CallBack ,WebReadDataR,Brg);
IWEB_GetResponse(Brg->pIWeb,(Brg->pIWeb,&Brg->pIWebResp,&Brg->m_CallBack,
Url,WEBOPT_HANDLERDATA,Brg,WEBOPT_STATUSHANDLER,WebStatusNotificationR,WEBOPT_END));
}
Regards
Pramod

What is the scope of the Url variable? It needs to remain valid until the callback fires, so it likely needs to be Brg->m_Url.

What is the scope of the Url variable? It needs to remain valid until the callback fires, so it likely needs to be Brg->m_Url.

In SDK docs there is a seperate note about the lifetime of WEBOPT. It is very important for correct working of IWEB API. If you adhere with the guidelines there shouldn't any problem in using BREW web API.

In SDK docs there is a seperate note about the lifetime of WEBOPT. It is very important for correct working of IWEB API. If you adhere with the guidelines there shouldn't any problem in using BREW web API.

Thanks Ruben amd Kurquhar
Ok The URL I am Passing Brg->Url to the connectserver function like the one mentioned bellow
ConnectServer(Brg,Brg->Url);
when ever I want get some information from the web, I used call this function and pass the url to the function. On first instance I get the desired result. but later I came across the problem mentioned. I am releasing the Brg->url in the FREEAppData functio of the applet. So there is no chance that it can be released in between. as they say -1289 is error more related to the application rather than server. If possible give some more information about this
Regards
Pramod

Thanks Ruben amd Kurquhar
Ok The URL I am Passing Brg->Url to the connectserver function like the one mentioned bellow
ConnectServer(Brg,Brg->Url);
when ever I want get some information from the web, I used call this function and pass the url to the function. On first instance I get the desired result. but later I came across the problem mentioned. I am releasing the Brg->url in the FREEAppData functio of the applet. So there is no chance that it can be released in between. as they say -1289 is error more related to the application rather than server. If possible give some more information about this
Regards
Pramod

Please clarify: after the first time, 1) your callback is never firing (as you indicated in your first post), or 2) you are always getting -1289 (as you indicated in your last post)?

Please clarify: after the first time, 1) your callback is never firing (as you indicated in your first post), or 2) you are always getting -1289 (as you indicated in your last post)?

Thanks Kurquahar
On the first instance I Used to get response from the IWEB_GetResponse as well the desired result. But I use the ConnectServerR to get result form diffrent url. At some point it stop, after first time. WebStatusNotificationR function,which get status of the web, WebReadDataR returns -1289 error code. Once the error happens I have to close the emulator to get the desired result from the web. otherwise it returns the error code -1289. This error never happen on the first instance. my application is web based application in which I have to use the IWEb frequently to access diffrent url. Hope this will make u little bit clear
Regards
Pramod

Thanks Kurquahar
On the first instance I Used to get response from the IWEB_GetResponse as well the desired result. But I use the ConnectServerR to get result form diffrent url. At some point it stop, after first time. WebStatusNotificationR function,which get status of the web, WebReadDataR returns -1289 error code. Once the error happens I have to close the emulator to get the desired result from the web. otherwise it returns the error code -1289. This error never happen on the first instance. my application is web based application in which I have to use the IWEb frequently to access diffrent url. Hope this will make u little bit clear
Regards
Pramod

Hi all..
I m also getting same problem..i m download image of 49K bytes from server..but my web response callback function is invoked onle once with around 1300 bytes..whether it is required to free instance of IWebResp* at the end of my web callback function?
what are other points needs to be considered while dowloding large no. of data (i.e usually not shipped with one call to callback function)?
regds,
Nilesh

Hi all..
I m also getting same problem..i m download image of 49K bytes from server..but my web response callback function is invoked onle once with around 1300 bytes..whether it is required to free instance of IWebResp* at the end of my web callback function?
what are other points needs to be considered while dowloding large no. of data (i.e usually not shipped with one call to callback function)?
regds,
Nilesh