Home >php教程 >php手册 >PHP调用JAVA 需要认证的webservices

PHP调用JAVA 需要认证的webservices

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 10:46:431313browse

根据官方文档一般是发送头信息,但是这个SOAP服务端不支持,最后是在new的时候发送了相关的参数才通过认证
PHP官方的实例基本都是下面这样子的代码,'authentication' => SOAP_AUTHENTICATION_BASIC 基本都少这行
这次遇到的问题主要是服务提供商没有说清楚具体的认证方式以及具体的参数,导致瞎折腾了一段时间。
其中:login和password参数是可以自定义的
 
帮助010203040506 $soapParams = array(             'login' => 'username' ,             'password' => 'password' ,             'authentication' => SOAP_AUTHENTICATION_BASIC         ); $client = new SoapClient('xxxx?wsdl', $soapParams);
 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:TWIG的 tests 学习Next article:PHP 中使用 PDO