开发者

Pattern design for a WebService Client

开发者 https://www.devze.com 2023-04-09 02:15 出处:网络
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 web

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

精彩评论

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

关注公众号