开发者

Pattern design for a WebService Client

I'm making an android application that will contact with a WebServices that exists already.

I'm looking for a pattern to create the client part (Andro开发者_运维知识库id application). Since the webservices are in .net (WSDL), I have to create the WSClient manually. So, I'm thinking How I can do it.

I thought that may be nice a WS Client class and for that, a singleton pattern. With that class, I could contact with all the services from any part for the application, but I don't know if this is the best choise.

Any suggerence please?

Thanks!


You can use the service locator, dependency Injection and inversion of Control, patterns. A good paper is to Inversion of Control Containers and the Dependency Injection pattern by M. Fowler.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜