-
Notifications
You must be signed in to change notification settings - Fork 270
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
[Exploration] Add Soap PHP library support #1986
base: trunk
Are you sure you want to change the base?
Conversation
@vyskoczilova would you be interested in taking a look at Soap and see where it fails? To test the Node version, you could add tests to For the Web version, you could write a PHP file during the Website boot here. For example:
And call it using this URL http://127.0.0.1:5400/website-server/?php=8.0&url=%2Fsoap-test.php&networking=yes |
Was networking enabled? |
With networking, it's a WASM error. We need to add a test to
|
I ran The unit test seems to pass, but in the browser, it fails with another WASM error.
|
@bgrgicak It would probably work with JSPI. Finding the right place to call |
I spent a bit more time testing this. First I worked on a minimal SOAP example. It works well in the terminal, but it times out with an error in the browser. I don't have experience with SoapClients and assume that I'm doing something wrong. Here are my testing results so far. NodeI added a SoapServer for the test to avoid remote requests and also to test the server. The unit test doesn't return any errors, but there is a PHP error WebWhen I test it in the browser by adding this code to the Website boot here.
AsyncifyIt results in another Asyncify error.
JSPIJSPI returns a different error from Node.
|
Asyncify is tedious. It's much easier to get it to work with JSPI first and figure out Asyncify from there. The JSPI error message tells me it's receiving an empty response instead of the expected XML document from the requested URL. Is that so? What happens when that URL is requested with CURL? Does it respond with the correct XML document? Or is it an empty response or error 500? SOAP needs to be explicitly enabled on the target site, perhaps it isn't? |
This PR is an experiment and it's not intended to be merged.
This PR adds Soap support to PHP, by building PHP with
--enable-soap
.Progress on adding Soap support
I was able to build PHP 8.0 with Soap and can see it's enabled in PHP Info.
To recompile PHP you can use
npm run recompile:php:web:asyncify:8.0
for a single version, or all versions usingnpm run recompile:php
.See full list of recompile commands here.
TODO: Check if Soap works in Playground
We need to check if Soap works in Playground.
I tried a test script from Stack overflow but it failed with this error
Fixes #1236
Testing Instructions (or ideally a Blueprint)