加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

关于webservice遇到的一些问题

发布时间:2020-12-16 21:58:00 所属栏目:安全 来源:网络整理
导读:首先是怎么看wsdl的xml格式理解里面的参数 types element?name="callInfo"?type="xsd:string"/ ? add 方法参数类型 /element /types ? message name=”addRequest”?? add 方法参数 part name=”” type=””/ /message message name=”addResponse”?? add

首先是怎么看wsdl的xml格式理解里面的参数

<types>

<element?name="callInfo"?type="xsd:string"/ ?add方法参数类型>

</element>

</types>

?

<message name=”addRequest”??add方法参数>

<part name=”” type=””/>

</message>

<message name=”addResponse”??add方法返回>

<part name=”” type=””/>

</message>

?

<portType name=””??操作方法列表>

<operation neme=”add”>

<input message=”tns:方法元素”/>

<output message=”tns:返回相应”/>

</operation>

</portType>

?

<binding neme=”购物车” type=”tns:” 为服务绑定方法操作>

</binding>

?

<service name=”服务的名字:商城”>

<port name=”购物车”?binding=”tns:服务于购物车”>

<soap:address location=”http://localhost/index.php” 路径>

</port>

</sevice>



soap遇到最多的问题就是head头产生的,以下是遇到的一些问题

ns1:Client.NoSOAPAction?no SOAPAction header! ?

头文件少了soapAction,这里采用curl方式请求,不知道Action没关系,在

curl_setopt($curl,CURLOPT_HTTPHEADER,array("SOAPAction: ''"));


头文件也可以加默认参数

curl_setopt($curl,array("Content-Type: text/xml;charset=utf-8"));

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读