SoapUI WSDL call to PHP (curl or SoapClient)
- 5 months ago
Hi insurteched
The issue you're facing sounds from PHP's native SoapClient lacking native support for generating WS-Security UsernameToken headers with PasswordDigest, Nonce, and Timestamp, which is a format SoapUI can produce when configured accordingly.
- Seems your PHP code fails to generate the required WS-Security header format, leading to the [ns1:InvalidSecurity] error.
- This discrepancy arises because SoapUI can automatically generate WS-Security headers when configured, whereas PHP SoapClient only supports basic HTTP authentication and lacks built-in support for WS-Security UsernameToken with PasswordDigest.
Consider using a PHP library that supports WS-Security, such as robrichards/wse-php, which can help generate the required WS-Security headers.
Use a library such as robrichards/wse-php to generate the correct WS-Security headers in PHP. This will allow your PHP server-side code to authenticate successfully with services that require UsernameToken with PasswordDigest, Nonce, and Timestamp—matching what SoapUI produces78.
To learn more - WS-Security (WSS) for API Testing | SoapUI\
Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards