时间: 2021-07-31 作者:daque
soap不过一种和议,是一种大略的鉴于xml的和议,用来在web上调换构造和典型消息,从它的名字(soap , simple object access protocol,大略物件考察和议)就不妨看出安排的手段是为使消息调换尽大概的大略。soap不过一个框架,它不妨以http为载体,也不妨经过其余如ftp,smtp以至一张软盘来实行,然而普遍情景下都是沿用http和议,以是犹如给人的回忆是soap必需鉴于http。其余,既是soap是一种和议,那它就不表示着确定要效劳于webservice。至于soap有rpc和xml的http的2种形式这种讲法不够精确,开始soap即是鉴于xml的,其余rpc call经过http来做,下边是个名字叫"echostring"的rpc本领挪用的soap request:post /test/simple.asmx http/1.1host: 131.107.72.13content-type: text/xml; charset=utf-8content-length: lengthsoapaction: "http://soapinterop.org/echostring"<?xml version="1.0" encoding="utf-8"?><soap:envelope xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://soapinterop.org/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:body soap:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"><tns:echostring><inputstring>string</inputstring></tns:echostring></soap:body></soap:envelope>你不妨看到,本领名echostring是包括在soap body中的。