为什么不使用JSON SOAP? [英] Why not SOAP with JSON?

查看:1133
本文介绍了为什么不使用JSON SOAP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

JSON与REST相关。随着REST你也可以使用XML。那么,为什么不倒过来? SOAP使用JSON只是为数据格式,同时保持WSDL为合同方面这在某些企业场景有用?

JSON is associated with REST. With REST you can also use XML. So why not the other way round ? SOAP with JSON just for the data format while keeping wsdl for the contract aspects which is usefull in some enterprise scenarios ?

更新:所以在评论垫点 http://en.wikipedia.org/wiki/SOAPjr
但是,这并不回答我的问题:

Update: so in comment mat points to http://en.wikipedia.org/wiki/SOAPjr But that doesn't answer my question:

如果这是最好的品种2几乎为什么没有人包括我从来没有听说过呢?是不是因为像SOAP,人们只是遵循传统,直到一些大师醒来,喊道:哎呀,我们又来了错误的方式,至少对某些类型的企业应用程序的

if it is the best of the 2 breeds why nearly nobody including me never heard of it ? Is it because like SOAP, people just followed a tradition until some guru wakes up and cries: gee we're doing the wrong way again at least for some kind of enterprise apps ?

推荐答案

完全可以用JSON作为与SOAP有效载荷。

Entirely possible to use JSON as the payload with SOAP.

的主要原因人不这样做,我猜想是,如果你已经从XML的限制移动了,那么为什么不抛弃SOAP为好。在JavaScript中JSON的起源和简单的Ajax调用可能意味着SOAP是在太多的人

The main reason people don't do it I would guess is if you already have moved on from the restrictions of XML then why not ditch SOAP as well. JSON origins within JavaScript and simple ajax calls probably means SOAP is too much in the way for people

严格的合同,以及XML数据与XSD验证也经常交织在一起。 SOAP标准并指定XML作为有效载荷,但你可以做任何你想做的CDATA标签内。但框架可能是你的假设负载是XML之下。正因为如此使用的无障碍大概擦出两种不同的理论。

Strict contracts with SOAP, and XML data validation with XSD is also often entwined. SOAP standards do specify XML as payload, but you can do whatever you want within the CDATA tag. But frameworks may be under the assumption your payload is XML. And as such using two different theories of accessibility probably clashes.

但通过各种手段使用JSON与SOAP,如果你想。

But by all means use JSON with SOAP if you want to.

这篇关于为什么不使用JSON SOAP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆