带有肥皂头的 NuSoap PHP 网络服务 [英] NuSoap PHP webservice with soap headers

查看:26
本文介绍了带有肥皂头的 NuSoap PHP 网络服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何使用 NuSoap 库在soap Web 服务服务器中实现soap 标头身份验证.

I am wondering how to implement soap header authentication in a soap web service server using NuSoap library.

我看过很多关于 NuSoap 客户端的例子,但想在服务器中实现它.

I have seen lots of examples about NuSoap Client but want to implement this in a server.

推荐答案

    $client->setHeaders('<wsse:Security S:mustUnderstand="1">
            <wsu:Timestamp xmlns:ns15="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity" xmlns:ns14="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512" xmlns:ns13="http://www.w3.org/2003/05/soap-envelope" wsu:Id="_1">
                <wsu:Created>createdDate</wsu:Created>
                <wsu:Expires>expireDate</wsu:Expires>
            </wsu:Timestamp>
            <wsse:UsernameToken xmlns:ns15="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity" xmlns:ns14="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512" xmlns:ns13="http://www.w3.org/2003/05/soap-envelope" wsu:Id="uuid_25007e25-6a0a-4a0c-9c3e-0d332f262cdc">
                <wsse:Username>username</wsse:Username>
                <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
            </wsse:UsernameToken>
        </wsse:Security>');

这篇关于带有肥皂头的 NuSoap PHP 网络服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆