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 approach?
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).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.