[英]Best practices for an internal webservice
Experience says that using WSDL-SOAP based webservice for internal consumption is an overkill. 经验表明,将基于WSDL-SOAP的Web服务用于内部消耗是过大的。 There are too many service-based POJO classes that when let into the system complicates it way too much.
基于服务的POJO类太多了,当进入系统时会使它过于复杂。 One option would be use adapter pattern, map the request/response objects to internal domain classes.
一种选择是使用适配器模式,将请求/响应对象映射到内部域类。 But is it even required?
但这是否是必需的? Is there a better approach?
有更好的方法吗? What are your suggestions?
你有什么建议?
Yes, WSDL/SOAP (or WS-* in general) is an overkill because it simply adds another layer to solve problems that have already been solved by Web architecture. 是的,WSDL / SOAP(或者通常为WS- *)是一个过大的杀伤力,因为它只是添加了另一层来解决Web架构已经解决的问题。 In fact, they have been solved much better.
实际上,它们已经得到了更好的解决。
In the Java world, you are likely to find the simplicity you are looking in JAX-RS (RESTful Java Web service). 在Java世界中,您很可能会在JAX-RS(RESTful Java Web服务)中找到所需的简单性。 The Jersey project is the reference implementation of JAX-RS and among other neat features comes with a very easy to use serialization/deserialization approach.
泽西项目是JAX-RS的参考实现,除其他功能外,它还具有非常易于使用的序列化/反序列化方法。
Jersey: http://jersey.java.net/ Example Applications: http://wikis.sun.com/display/Jersey/Main (scroll down) 泽西岛: http : //jersey.java.net/示例应用程序: http : //wikis.sun.com/display/Jersey/Main (向下滚动)
HTH, Jan 1月HTH
Have a look at the CAJO project: 看一下CAJO项目:
http://en.wikipedia.org/wiki/Cajo_project http://en.wikipedia.org/wiki/Cajo_project
Should allow JVM's to talk together if that is what you need. 如果需要的话,应该允许JVM一起交谈。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.