使用php soap进行基本身份验证

使用php soap进行基本身份验证,php,soap,Php,Soap,我正在尝试连接到使用PHP7基本身份验证的soap服务器 在本例中,登录名和密码不会发送到标题中 我错过什么了吗 代码: 标题发送: POST /V4/services/ServerAPI HTTP/1.1 Host: serverurl.com Connection: Keep-Alive User-Agent: PHP version: PHP SDK 4.52.1 Content-Type: application/soap+xml; charset=utf-8; action="test

我正在尝试连接到使用PHP7基本身份验证的soap服务器

在本例中,登录名和密码不会发送到标题中

我错过什么了吗

代码:

标题发送:

POST /V4/services/ServerAPI HTTP/1.1 Host:
serverurl.com Connection: Keep-Alive User-Agent: PHP
version: PHP SDK 4.52.1 Content-Type: application/soap+xml;
charset=utf-8; action="test" Content-Length: 6904
通常我会看到类似的东西

Basic authentication: mybase64
$authentication->getLogin()返回一个整数。用字符串强制转换来解决问题

$options['login'] = (string) $authentication->getLogin();
我想使用基本身份验证(header),而不是wsse或SoapHeader中的任何内容;)
$options['login'] = (string) $authentication->getLogin();