首页 / JAVA / java – SOAP和Spring
java – SOAP和Spring
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了java – SOAP和Spring,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1848字,纯文字阅读大概需要3分钟。
内容图文
![java – SOAP和Spring](/upload/InfoBanner/zyjiaocheng/751/323e24fc96f14e32a4a31be223932c4b.jpg)
我刚刚在Manning Publications Co.的Craig Walls的第二版“Spring in Action”中阅读了关于SOAP的文章.他们写了一篇关于契约优先的文章,就像Spring文档一样,编写了一个消息和方法XML和然后将其转换为XSD,然后再转换为WSDL,同时在Spring中连接编组和服务路径.
我必须承认,我不相信.为什么这比制作服务接口并基于该接口生成服务更好?这与在Spring3中定义我的REST @Controllers非常接近.通过使用Spring制作SOAP Web服务,我是否可以选择这样的路径?
另外:我想复制已经存在的Web服务.我有它的WSDL,我可以放置我的服务而不是它.这是推荐的吗?如果是这样,推荐的方法是什么?
干杯
Nik
解决方法:
我想你必须穿过你的电线.
合同首先意味着定义WSDL,然后创建Java代码以支持此WSDL.
契约最后意味着创建Java代码,并在以后生成WSDL.
最后合同的危险在于,如果您的WSDL是从Java代码自动生成的,并且您重构了Java代码,这会导致您的WSDL发生更改.
Spring-WS only supports contract first
2.3.1. Fragility
As mentioned earlier, the
contract-last development style
results in your web service contract
(WSDL and your XSD) being generated
from your Java contract (usually an
interface). If you are using this
approach, you will have no guarantee
that the contract stays constant over
time. Each time you change your Java
contract and redeploy it, there might
be subsequent changes to the web
service contract.Aditionally, not all SOAP stacks
generate the same web service contract
from a Java contract. This means
changing your current SOAP stack for a
different one (for whatever reason),
might also change your web service
contract.When a web service contract changes,
users of the contract will have to be
instructed to obtain the new contract
and potentially change their code to
accommodate for any changes in the
contract.In order for a contract to be useful,
it must remain constant for as long as
possible. If a contract changes, you
will have to contact all of the users
of your service, and instruct them to
get the new version of the contract.
内容总结
以上是互联网集市为您收集整理的java – SOAP和Spring全部内容,希望文章能够帮你解决java – SOAP和Spring所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。