小编Sam*_*ers的帖子

如何在php5中实现ws-security 1.1

我试图在PHP5中使用Soap调用Web服务,为此,我需要使用WS-Security 1.1.

(在java和.NET中,这都是自动生成的.)

是否有可用于在PHP中轻松生成安全标头的框架?或者我必须自己添加整个标头?

WS-Security 1.1的规格:http://oasis-open.org/committees/download.php/16790/wss-1.1-spec-os-SOAPMessageSecurity.pdf

php ws-security soap web-services zend-framework

9
推荐指数
1
解决办法
1万
查看次数

通过https在php中调用wsdl

我正在尝试连接到下一个Web服务:

https://grab.beta.agiv.be/Tools/CRABTools.svc?wsdl

我还必须添加一个我已经创建的头元素.

我可以调用它只是使用PHP soapclientzend_soap_client?或者我必须使用nusoap_client

我试着像:

$soapclient = new nusoap_client($wsdl);
$header = "<o:Security s:mus... ../>"; // including my password and username

$soapclient->call("FindGemeentenResult",
array("houseNumberId" => 2306852),
"https://grab.beta.agiv.be/Tools/CRABTools.svc",
"http://ws.agiv.be/crabtools/ICRABTools/FindGemeentenResult",
$header);
Run Code Online (Sandbox Code Playgroud)

但现在我得到:

Error: HTTP Error: Unsupported HTTP response status 415 Cannot process the message because the content type 'text/xml; charset=ISO-8859-1' was not the expected type 'text/xml; charset=utf-8'. (soapclient->响应有响应的内容)

我对此很陌生,欢迎任何帮助!

php https wsdl nusoap exchangewebservices

2
推荐指数
2
解决办法
6364
查看次数