繁体   English   中英

使用php进行Web服务认证

[英]web service authentication using php

POST /xxxx/service.asmx HTTP/1.1
Host: xxx.xxx.xxx.xx
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://apps.org/GetLogin"

<?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>
    <GetLogin xmlns="http://nhiapps.org/">
      <username>string</username>
      <password>string</password>
      <AppsID>string</AppsID>
    </GetLogin>
  </soap:Body>
</soap:Envelope>

<?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>
    <GetLoginResponse xmlns="http://nhiapps.org/">
      <GetLoginResult>string</GetLoginResult>
    </GetLoginResponse>
  </soap:Body>
</soap:Envelope>

这是我的SOAP代码。 我想使用PHP执行Web服务认证。 我必须调用IP地址中存在的get login函数以完成身份验证。

我建议您使用现有框架。

只要在作曲家中添加http://framework.zend.com/manual/current/en/modules/zend.soap.client.html ,它就可以工作。

暂无
暂无

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

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