开发者

error reporting web service call deployment in code

I've got couple of web service calls., I am calling this directly without any wrapper classes. Now i am implementing a third web service which reports the error happend during a main web service call to the server.This third webservice call may get extended to be called everytime a error happens in the future.

I am trying to deal with this scenario in the followng ways

1) create a wrapper class for main web service calls and calls the third/error handling webservice from that web service calls.

2) create a wrapper for error handling routines and move all the routines to that class., whcih includes call to error/third reporting webservice.

which one is better ap开发者_开发知识库proach?


1) create a wrapper class for main web service calls and calls the third/error handling webservice from that web service calls.

That sounds much better.

2) create a wrapper for error handling routines and move all the routines to that class., whcih includes call to error/third reporting webservice.

Consolidating logging into a reusable object is the right way to go, but I wouldn't hard-code it to something like a web service.

What happens if the web services fail due to network issues - your logging call will fail also (if I understand your design).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜