简体   繁体   English

SOAP Web服务如何工作以及如何在PHP中使用它们

[英]How do SOAP web services work and how to use them in PHP

How is the element in the Soap Envelope different from the HTTP headers? Soap Envelope中的元素与HTTP标头有何不同?

Why are REST responses considered human readable whereas SOAP are not? 为什么REST响应被认为是人类可读的,而SOAP却不可读?

When using SOAP services in PHP with the SoapClient() class, is the basic idea that the SoapClient() class takes in a WSDL as a parameter, finds the location of the web service, constructs the SOAP envelop based on what methods and params are called on your SoapClient object, sends off the request, and returns some kind of response? 当在PHP中将SoapClient()类与SOAP服务一起使用时,SoapClient()类将WSDL作为参数,找到Web服务的位置,并根据所使用的方法和参数构造SOAP信封是一个基本思想。在您的SoapClient对象上调用,发出请求,并返回某种响应?

SOAP is just an XML based protocol on top of HTTP. SOAP只是HTTP之上的基于XML的协议。 I don't know why it wouldn't be human readable .. it's a bit more convoluted I suppose but it's still plain/text 我不知道为什么它不是人类可读的..我想这有点令人费解,但它仍然是纯文本/文本

Form my experience with SOAP it offers a basic architecture for setting up a webservice. 根据我在SOAP方面的经验,它提供了用于设置Web服务的基本体系结构。 You call a SOAP webservice much like you'd call a regular function. 您调用SOAP Web服务的方式就像调用常规函数一样。 You can have an arbirtary number of parameters, just make sure they serialize well over XML/HTTP. 您可以具有任意数量的参数,只需确保它们可以在XML / HTTP上很好地序列化即可。

Additionally SOAP gives you a WSDL file with is basically a description of your webservices (a list of functions and their parameters). 此外,SOAP还为您提供了一个WSDL文件,该文件基本上是对Web服务的描述(函数及其参数的列表)。

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

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