微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

发送soap型webservice消息

 

POST /webservice/Service.asmx HTTP/1.1
Host: 132.159.206.26
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/WebserviceTest"

<?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:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <WebserviceTest xmlns="http://tempuri.org/">
      <str>string</str>
    </WebserviceTest>
  </soap:Body>
</soap:Envelope>
 

发送soap消息时,如果碰到bad request或internal server error等,可以判断可能是自定义参数部分不符合接口要求,比如参数内容中如string含有<或>应用&lt;或&gt;替代

 

str0= REPLACE( str0,"<","&lt;" ) str0= REPLACE( str0,">","&gt;" )

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐