soap-client: Error wihle creating SoapRequest

Q A
Version 0.7.7

Hello,

i’m facing a problem when trying to call my soap service (my webservice is a soap 1.1) when i’m calling \Phpro\SoapClient\Client::call() i got this error: Argument 3 passed to Phpro\SoapClient\Soap\HttpBinding\SoapRequest::__construct() must be of the type string, null given This third argument is $action, but i can’t find any way to provide this action

thanks for your help.

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 15 (9 by maintainers)

Most upvoted comments

Closing this issue. Since php currently has strict types on the SoapClient::__doRequest(), action must always be a string. The solutions provided above will likely fail in newer php versions. If you are still facing this issue, it should be reported to php internals instead : the action should always be a string.

It’s been a while since I looked into this issue. Does making the action nullable in our SoapRequest fix the issue? Otherwise, the only solution I can think of is creating a native soap driver that can handle this situation, which is a lot of work or a wsdl changing middleware that adds this information into the wsdl. (which is error-prone)

I’ll try this next Friday and provide some feedback. I might also provide a PR + test if needed.