简体   繁体   English

Android 1.1的SOAP 1.1,SOAP 1.2,HTTP GET和HTTP POST方法有什么区别?

[英]What is the difference between SOAP 1.1, SOAP 1.2, HTTP GET & HTTP POST methods for Android?

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. 我正在研究SOAP Web服务的代码,我想知道Android的SOAP 1.1,SOAP 1.2,HTTP GET和HTTP POST方法的变化,以及其中的首选。 Please site out a sample of its usage URL or its code. 请提供其使用URL或其代码的示例。

Thanks 谢谢

Differences in SOAP versions SOAP版本的差异

Both SOAP Version 1.1 and SOAP Version 1.2 are World Wide Web Consortium (W3C) standards. SOAP Version 1.1和SOAP Version 1.2都是万维网联盟(W3C)标准。 Web services can be deployed that support not only SOAP 1.1 but also support SOAP 1.2. 可以部署Web服务,不仅支持SOAP 1.1,还支持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.1中对SOAP 1.2规范所做的一些更改很重要,而其他更改则很小。

The SOAP 1.2 specification introduces several changes to SOAP 1.1. SOAP 1.2规范引入了对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. 此信息不是对SOAP 1.1和SOAP 1.2的所有新功能或更改功能的深入描述。 Instead, this information highlights some of the more important differences between the current versions of SOAP. 相反,此信息突出显示了当前版本的SOAP之间的一些更重要的差异。

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规范的更改包括以下更新:SOAP 1.1基于XML 1.0。 SOAP 1.2 is based on XML Information Set (XML Infoset). SOAP 1.2基于XML信息集(XML Infoset)。 The XML information set (infoset) provides a way to describe the XML document with XSD schema. XML信息集(信息集)提供了一种使用XSD架构描述XML文档的方法。 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. 但是,信息集不一定使用SOAP 1.1所基于的XML 1.0序列化来序列化文档。这种描述XML文档的新方法有助于揭示其他序列化格式,例如二进制协议格式。 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. 您可以使用二进制协议格式将消息压缩为紧凑格式,其中可能不需要某些详细标记信息。

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

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. 只要供应商符合SOAP 1.2中定义的绑定框架,SOAP 1.2就可以正式定义除使用HTTP之外的传输协议。 While HTTP is ubiquitous, it is not as reliable as other transports including TCP/IP and MQ. 虽然HTTP无处不在,但它不像其他传输包括TCP / IP和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. SOAP 1.2提供了SOAP处理模型的更具体的定义,它消除了在没有Web服务互操作性(WS-I)配置文件的情况下可能导致互操作性错误的许多歧义。 The goal is to significantly reduce the chances of interoperability issues between different vendors that use SOAP 1.2 implementations. 目标是显着降低使用SOAP 1.2实现的不同供应商之间的互操作性问题的可能性。 SOAP with Attachments API for Java (SAAJ) can also stand alone as a simple mechanism to issue SOAP requests. SOAP with Attachments API for Java(SAAJ)也可以作为发布SOAP请求的简单机制。 A major change to the SAAJ specification is the ability to represent SOAP 1.1 messages and the additional SOAP 1.2 formatted messages. SAAJ规范的一个重大变化是能够表示SOAP 1.1消息和其他SOAP 1.2格式的消息。 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. 例如,SAAJ版本1.3引入了一组新的常量和方法,这些常量和方法更有利于SOAP头元素上的SOAP 1.2(例如getRole(),getRelay())。 There are also additional methods on the factories for SAAJ to create appropriate SOAP 1.1 or SOAP 1.2 messages. 工厂上还有其他方法可供SAAJ创建适当的SOAP 1.1或SOAP 1.2消息。 The XML namespaces for the envelope and encoding schemas have changed for SOAP 1.2. SOAP 1.2的包络和编码模式的XML名称空间已更改。 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. 这些更改将SOAP处理器与SOAP 1.1和SOAP 1.2消息区分开来,并支持SOAP模式中的更改,而不会影响现有实现。 Java Architecture for XML Web Services (JAX-WS) introduces the ability to support both SOAP 1.1 and SOAP 1.2. XML Web Services的Java体系结构(JAX-WS)引入了支持SOAP 1.1和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. 因为JAX-RPC引入了在遍历运行时遍历SOAP消息的要求,所以需要在其适当的SOAP上下文中表示此消息。 In JAX-WS, a number of additional enhancements result from the support for SAAJ 1.3. 在JAX-WS中,SAAJ 1.3的支持带来了许多额外的增强。

There is not difine POST AND GET method for particular android....but all here is differance 对于特定的android没有不同的POST和GET方法....但这里所有都是不同的

GET The GET method appends name/value pairs to the URL, allowing you to retrieve a resource representation. GET GET方法将名称/值对附加到URL,允许您检索资源表示。 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. 这个问题的一大问题是URL的长度是有限的(大约3000个字符),如果页面上的表单中有很多内容,导致数据丢失,因此只有少量参数才能使用此方法。

What does this mean for me? 这对我意味着什么? Basically this renders the GET method worthless to most developers in most situations. 基本上,这使得GET方法在大多数情况下对大多数开发人员毫无价值。 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. 以下是另一种查看方式:如果表单使用大量参数,或者参数包含大量数据,则URL可能会被截断(并且很可能会提供当今以数据为中心的站点)。 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. 此外,在URL上传递的参数在浏览器的地址字段中可见(YIKES !!!),不是显示任何敏感(甚至非敏感)数据的最佳位置,因为您只是在乞求好奇的用户惹它。

POST The alternative to the GET method is the POST method. POST GET方法的替代方法是POST方法。 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. 此方法将名称/值对打包在HTTP请求的主体内,这使得URL更加清晰,并且对表单输出没有任何大小限制,基本上它是一个很容易使用的。 POST is also more secure but certainly not safe. POST也更安全,但肯定不安全。 Although HTTP fully supports CRUD, HTML 4 only supports issuing GET and POST requests through its various elements. 尽管HTTP完全支持CRUD,但HTML 4仅支持通过其各种元素发出GET和POST请求。 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. 这种限制使Web应用程序无法充分利用HTTP,并且为了解决这个问题,大多数应用程序都会重载POST来处理除资源检索之外的所有事情。

Link to original IBM source 链接到原始IBM源代码

Following document published by W3C also describes the differences between SOAP 1.1 and 1.2: W3C发布的以下文档还描述了SOAP 1.1和1.2之间的差异:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM