SOAP 1.1, SOAP 1.2, HTTP GET & 有什么区别?Android 的 HTTP POST 方法? [英] What is the difference between SOAP 1.1, SOAP 1.2, HTTP GET & HTTP POST methods for Android?

查看:19
本文介绍了SOAP 1.1, SOAP 1.2, HTTP GET & 有什么区别?Android 的 HTTP POST 方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写用于 SOAP Web 服务的代码,我想知道 SOAP 1.1、SOAP 1.2、HTTP GET & 的变化.Android 的 HTTP POST 方法,这是其中的首选方法.请将其使用网址或其代码的示例站点化.

I am working on a code for SOAP Web services, I would like to know the variations in SOAP 1.1, SOAP 1.2, HTTP GET & HTTP POST methods for Android, and which is the preferred one among them. Please site out a sample of its usage URL or its code.

谢谢

推荐答案

SOAP 版本的差异

SOAP 1.1 版和 SOAP 1.2 版都是万维网联盟 (W3C) 标准.可以部署不仅支持 SOAP 1.1 还支持 SOAP 1.2 的 Web 服务.SOAP 1.1 对 SOAP 1.2 规范所做的一些更改很重要,而其他更改则很小.

Both SOAP Version 1.1 and SOAP Version 1.2 are World Wide Web Consortium (W3C) standards. Web services can be deployed that support not only SOAP 1.1 but also support SOAP 1.2. Some changes from SOAP 1.1 that were made to the SOAP 1.2 specification are significant, while other changes are minor.

SOAP 1.2 规范对 SOAP 1.1 进行了多项更改.此信息并非旨在深入描述 SOAP 1.1 和 SOAP 1.2 的所有新增或更改功能.相反,这些信息强调了当前 SOAP 版本之间的一些更重要的差异.

The SOAP 1.2 specification introduces several changes to SOAP 1.1. This information is not intended to be an in-depth description of all the new or changed features for SOAP 1.1 and SOAP 1.2. Instead, this information highlights some of the more important differences between the current versions of SOAP.

对 SOAP 1.2 规范的重大更改包括以下更新:SOAP 1.1 基于 XML 1.0.SOAP 1.2 基于 XML 信息集(XML Infoset).XML 信息集 (infoset) 提供了一种使用 XSD 模式描述 XML 文档的方法.但是,信息集不一定使用 SOAP 1.1 所基于的 XML 1.0 序列化来序列化文档.这种描述 XML 文档的新方法有助于揭示其他序列化格式,例如二进制协议格式.您可以使用二进制协议格式将消息压缩为紧凑格式,其中一些详细的标记信息可能不需要.

The changes to the SOAP 1.2 specification that are significant include the following updates: SOAP 1.1 is based on XML 1.0. SOAP 1.2 is based on XML Information Set (XML Infoset). The XML information set (infoset) provides a way to describe the XML document with XSD schema. However, the infoset does not necessarily serialize the document with XML 1.0 serialization on which SOAP 1.1 is based.. This new way to describe the XML document helps reveal other serialization formats, such as a binary protocol format. You can use the binary protocol format to compact the message into a compact format, where some of the verbose tagging information might not be required.

在 SOAP 1.2 中,您可以使用绑定到底层协议的规范来确定在底层协议数据单元中使用哪种 XML 序列化.SOAP 1.2 - 第 2 部分中指定的 HTTP 绑定使用 XML 1.0 作为 SOAP 消息信息集的序列化.

In SOAP 1.2 , you can use the specification of a binding to an underlying protocol to determine which XML serialization is used in the underlying protocol data units. The HTTP binding that is specified in SOAP 1.2 - Part 2 uses XML 1.0 as the serialization of the SOAP message infoset.

SOAP 1.2 提供了正式定义传输协议的能力,而不是使用 HTTP,只要供应商符合 SOAP 1.2 中定义的绑定框架.尽管 HTTP 无处不在,但它不如其他传输(包括 TCP/IP 和 MQ)可靠.SOAP 1.2 提供了更具体的 SOAP 处理模型定义,消除了在没有 Web 服务互操作性 (WS-I) 概要文件的情况下可能导致互操作性错误的许多歧义.目标是显着降低使用 SOAP 1.2 实现的不同供应商之间出现互操作性问题的可能性.SOAP with Attachments API for Java (SAAJ) 也可以独立作为一个简单的机制来发出 SOAP 请求.SAAJ 规范的一个主要变化是能够表示 SOAP 1.1 消息和附加的 SOAP 1.2 格式的消息.例如,SAAJ 1.3 版在 SOAP 头元素上引入了一组新的常量和方法,这些常量和方法更有利于 SOAP 1.2(例如 getRole()、getRelay()).SAAJ 的工厂中还有其他方法可以创建适当的 SOAP 1.1 或 SOAP 1.2 消息.SOAP 1.2 的信封和编码模式的 XML 名称空间已更改.这些更改将 SOAP 处理器与 SOAP 1.1 和 SOAP 1.2 消息区分开来,并支持 SOAP 模式中的更改,而不影响现有实现.Java Architecture for XML Web Services (JAX-WS) 引入了支持 SOAP 1.1 和 SOAP 1.2 的能力.由于 JAX-RPC 引入了在 SOAP 消息在运行时遍历时对其进行操作的要求,因此需要在其适当的 SOAP 上下文中表示此消息.在 JAX-WS 中,对 SAAJ 1.3 的支持导致了许多额外的增强.

SOAP 1.2 provides the ability to officially define transport protocols, other than using HTTP, as long as the vendor conforms to the binding framework that is defined in SOAP 1.2. While HTTP is ubiquitous, it is not as reliable as other transports including TCP/IP and MQ. SOAP 1.2 provides a more specific definition of the SOAP processing model that removes many of the ambiguities that might lead to interoperability errors in the absence of the Web Services-Interoperability (WS-I) profiles. The goal is to significantly reduce the chances of interoperability issues between different vendors that use SOAP 1.2 implementations. SOAP with Attachments API for Java (SAAJ) can also stand alone as a simple mechanism to issue SOAP requests. A major change to the SAAJ specification is the ability to represent SOAP 1.1 messages and the additional SOAP 1.2 formatted messages. For example, SAAJ Version 1.3 introduces a new set of constants and methods that are more conducive to SOAP 1.2 (such as getRole(), getRelay()) on SOAP header elements. There are also additional methods on the factories for SAAJ to create appropriate SOAP 1.1 or SOAP 1.2 messages. The XML namespaces for the envelope and encoding schemas have changed for SOAP 1.2. These changes distinguish SOAP processors from SOAP 1.1 and SOAP 1.2 messages and supports changes in the SOAP schema, without affecting existing implementations. Java Architecture for XML Web Services (JAX-WS) introduces the ability to support both SOAP 1.1 and SOAP 1.2. Because JAX-RPC introduced a requirement to manipulate a SOAP message as it traversed through the run time, there became a need to represent this message in its appropriate SOAP context. In JAX-WS, a number of additional enhancements result from the support for SAAJ 1.3.

对于特定的 android 没有不同的 POST 和 GET 方法......但这里有区别

There is not difine POST AND GET method for particular android....but all here is differance

获取GET 方法将名称/值对附加到 URL,允许您检索资源表示.这样做的一个大问题是 URL 的长度是有限的(大约 3000 个字符),如果页面上的表单中有太多内容,则会导致数据丢失,因此此方法仅在参数数量较少时才有效.

GET The GET method appends name/value pairs to the URL, allowing you to retrieve a resource representation. The big issue with this is that the length of a URL is limited (roughly 3000 char) resulting in data loss should you have to much stuff in the form on your page, so this method only works if there is a small number parameters.

这对我意味着什么?基本上,这使得 GET 方法在大多数情况下对大多数开发人员毫无价值.这是查看它的另一种方式:如果表单使用大量参数,或者参数包含大量数据,则 URL 可能会被截断(并且很可能会被截断为当今以数据为中心的站点).此外,在 URL 上传递的参数在浏览器的地址字段中可见 (YIKES!!!) 不是显示任何类型的敏感(甚至非敏感)数据的最佳位置,因为您只是在乞求好奇的用户惹它.

What does this mean for me? Basically this renders the GET method worthless to most developers in most situations. Here is another way of looking at it: the URL could be truncated (and most likely will be give today's data-centric sites) if the form uses a large number of parameters, or if the parameters contain large amounts of data. Also, parameters passed on the URL are visible in the address field of the browser (YIKES!!!) not the best place for any kind of sensitive (or even non-sensitive) data to be shown because you are just begging the curious user to mess with it.

发布GET 方法的替代方法是 POST 方法.此方法将名称/值对打包在 HTTP 请求的正文中,这使得 URL 更清晰,并且对表单输出没有大小限制,基本上可以毫不费力地使用哪个.POST 也更安全,但肯定不安全.尽管 HTTP 完全支持 CRUD,但 HTML 4 仅支持通过其各种元素发出 GET 和 POST 请求.这种限制阻碍了 Web 应用程序充分利用 HTTP,为了解决这个问题,大多数应用程序都会重载 POST 以处理除资源检索之外的所有事情.

POST The alternative to the GET method is the POST method. This method packages the name/value pairs inside the body of the HTTP request, which makes for a cleaner URL and imposes no size limitations on the forms output, basically its a no-brainer on which one to use. POST is also more secure but certainly not safe. Although HTTP fully supports CRUD, HTML 4 only supports issuing GET and POST requests through its various elements. This limitation has held Web applications back from making full use of HTTP, and to work around it, most applications overload POST to take care of everything but resource retrieval.

链接到原始 IBM 源

这篇关于SOAP 1.1, SOAP 1.2, HTTP GET & 有什么区别?Android 的 HTTP POST 方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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