Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues in nusoap_server::parseRequest (v0.9.18) #132

Open
VMFnet opened this issue Feb 27, 2025 · 1 comment
Open

Issues in nusoap_server::parseRequest (v0.9.18) #132

VMFnet opened this issue Feb 27, 2025 · 1 comment

Comments

@VMFnet
Copy link

VMFnet commented Feb 27, 2025

In nusoap v0.9.17, warnings were raised due to undefined variables in nusoap_server::parseRequest. However, in v0.9.18, this behavior changed, and now an error occurs:

"Too few arguments to function MyFunc(), 0 passed in ..."

After investigating, we identified several issues in nusoap_server::parseRequest and invoke_method:

  1. Incorrect Operation Name in wsdl::getOperationData()
  • In parseRequest, the variable $this->methodnameis passed to getOperationData, which might be incorrect. It is currently set to "MyOperationRequest" but getOperationData() should expect a value like "MyOperation", as this is the correct key under $this->binding[$portData['binding']]['operations'].
  • The same issue occurs in nusoap_server::invoke_method.
  • As a result, $opData in parseRequest() is empty, leading to warnings when attempting to access $opData['output']['message'] in v0.9.17.
  1. Function Stops Execution in v0.9.18
  • In v0.9.17, the code continued execution even if $opData['output']['message'] was missing, likely because $this->responseTagName would later be set to a default value or was not required.
  • In v0.9.18, execution stops if this offset does not exist, causing SOAP parameters to not be parsed and preventing the function from executing correctly.
  1. Incorrect output Key Usage
  • In v0.9.18, the code incorrectly expects an 'output' key with 'name'.
  • However, in v0.9.17, this key was correctly named 'message', which matches the WSDL definition.
    The code should continue using 'message' instead of 'name' under 'output'.

Temporary Fix

As a quick workaround, removing the return false; line in parseRequest prevents the function from stopping execution.

However, the root cause lies in how operation names are handled and how 'output' keys are referenced.

This needs to be addressed properly in the parseRequest and invoke_method functions.

@tenzap
Copy link
Contributor

tenzap commented Feb 28, 2025

Is this fixed by #131?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants