You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Erwan de FERRIERES <er...@nereide.biz> on 2009/12/10 17:43:04 UTC
Response message after invoking a jsonservice
Hi all,
How is handled the error messages after a jsonservice event type ? Here
is a concrete example :
Go to Ajax examples, and create an example. No problem, it's working.
But if in the example/../controller.xml, line 78, you replace the name
of the service invoked for the example creation, then, when creating an
example, nothing is done. That's normal, but there is no error message
on the screen.
The only indicator we have is in the log :
2009-12-10 17:34:03,343 (http-0.0.0.0-8443-1) [
RequestHandler.java:412:ERROR] Request createExampleAjax caused an error
with the following message: Erreur lors de l'appel de l'événement:
org.ofbiz.webapp.event.EventHandlerException: Problems getting the
service model (Cannot locate service by name (eventWhichDoesntExist))
But there is nothing displayed for the user. Does anyone knows how to
display an error ?
Thanks,
--
Erwan de FERRIERES
www.nereide.biz
Re: Response message after invoking a jsonservice
Posted by Erwan de FERRIERES <er...@nereide.biz>.
Hi Scott,
the test case I described is now resolved : I have the error message in
the browser and not only in the logs.
Regards,
Le 21/12/2009 21:03, Scott Gray a écrit :
> Hi Erwan,
>
> I'm not sure I've done anything to resolve this issue? My changes
> shouldn't have had any effect on the client consuming the json response.
>
> Regards
> Scott
>
> HotWax Media
> http://www.hotwaxmedia.com
>
> On 19/12/2009, at 3:33 AM, Erwan de FERRIERES wrote:
>
>> Thanks Scott for resolving this issue !
>>
>> Le 10/12/2009 19:15, Anil Patel a écrit :
>>> As of now, Its true, you need to write a method to analyze server
>>> response. This should be improved.
>>
>> ../..
>> --
>> Erwan de FERRIERES
>> www.nereide.biz
>
--
Erwan de FERRIERES
www.nereide.biz
Re: Response message after invoking a jsonservice
Posted by Scott Gray <sc...@hotwaxmedia.com>.
Hi Erwan,
I'm not sure I've done anything to resolve this issue? My changes
shouldn't have had any effect on the client consuming the json response.
Regards
Scott
HotWax Media
http://www.hotwaxmedia.com
On 19/12/2009, at 3:33 AM, Erwan de FERRIERES wrote:
> Thanks Scott for resolving this issue !
>
> Le 10/12/2009 19:15, Anil Patel a écrit :
>> As of now, Its true, you need to write a method to analyze server
>> response. This should be improved.
>
> ../..
> --
> Erwan de FERRIERES
> www.nereide.biz
Re: Response message after invoking a jsonservice
Posted by Erwan de FERRIERES <er...@nereide.biz>.
Thanks Scott for resolving this issue !
Le 10/12/2009 19:15, Anil Patel a écrit :
> As of now, Its true, you need to write a method to analyze server response. This should be improved.
../..
--
Erwan de FERRIERES
www.nereide.biz
Re: Response message after invoking a jsonservice
Posted by Anil Patel <an...@hotwaxmedia.com>.
As of now, Its true, you need to write a method to analyze server response. This should be improved.
Thanks and Regards
Anil Patel
HotWax Media Inc
Find us on the web at www.hotwaxmedia.com or Google Keyword "ofbiz"
On Dec 10, 2009, at 12:38 PM, Erwan de FERRIERES wrote:
> Hi Anil,
>
> thanks for the quick response. Are you saying that for each page in which we are calling a jsonservice, we should also have a js file which analyse the server response ?
>
> Cheers,
>
> --
> Erwan de FERRIERES
> www.nereide.biz
Re: Response message after invoking a jsonservice
Posted by Erwan de FERRIERES <er...@nereide.biz>.
Hi Anil,
thanks for the quick response. Are you saying that for each page in
which we are calling a jsonservice, we should also have a js file which
analyse the server response ?
Cheers,
--
Erwan de FERRIERES
www.nereide.biz
Re: Response message after invoking a jsonservice
Posted by Anil Patel <an...@hotwaxmedia.com>.
Erwan,
Here is code snipped from checkoutProcess.js file in ecommerce component.
// Check server side error
function getServerError(data) {
var serverErrorHash = [];
var serverError = "";
if (data._ERROR_MESSAGE_LIST_ != undefined) {
serverErrorHash = data._ERROR_MESSAGE_LIST_;
serverErrorHash.each(function(error) {
serverError += error.message;
});
}
if (data._ERROR_MESSAGE_ != undefined) {
serverError = data._ERROR_MESSAGE_;
}
return serverError;
}
Thanks and Regards
Anil Patel
HotWax Media Inc
Find us on the web at www.hotwaxmedia.com or Google Keyword "ofbiz"
On Dec 10, 2009, at 11:43 AM, Erwan de FERRIERES wrote:
> Hi all,
>
> How is handled the error messages after a jsonservice event type ? Here is a concrete example :
>
> Go to Ajax examples, and create an example. No problem, it's working. But if in the example/../controller.xml, line 78, you replace the name of the service invoked for the example creation, then, when creating an example, nothing is done. That's normal, but there is no error message on the screen.
>
> The only indicator we have is in the log :
> 2009-12-10 17:34:03,343 (http-0.0.0.0-8443-1) [ RequestHandler.java:412:ERROR] Request createExampleAjax caused an error with the following message: Erreur lors de l'appel de l'événement: org.ofbiz.webapp.event.EventHandlerException: Problems getting the service model (Cannot locate service by name (eventWhichDoesntExist))
>
> But there is nothing displayed for the user. Does anyone knows how to display an error ?
>
> Thanks,
>
> --
> Erwan de FERRIERES
> www.nereide.biz