Closed ms999 closed 6 years ago
Hi.
Huh, I must say I do not known how to fix it. Do have any clues?
It is Java Exception not nusoap or php issue. try to use nusoap client. if your soap service build using nusoap server.
I get it, but I guess it's not problem at Java side, because you know, Java is here for long-time and it's well-tested.
Hello,
as I suspected the problem was in PHP7 changes.
https://stackoverflow.com/questions/40038144/nusoap-soap-env-xml-was-empty-didnt-parse-message
$HTTP_RAW_POST_DATA is never defined in PHP7+.
This feature was DEPRECATED in PHP 5.6.0, and REMOVED as of PHP 7.0.0. If set to TRUE, PHP will always populate the $HTTP_RAW_POST_DATA containing the raw POST data. Otherwise, the variable is populated only when the MIME type of the data is unrecognised.
I fixed this by using file_get_contents("php://input")
instead of $HTTP_RAW_POST_DATA
in the service invocation:
@$server->service(file_get_contents("php://input"));
Everything is great, I am closing the issue.
Thanks!
Hello,
thank you for the library. It definitely fixed issues with PHP 5.6. When I tried to run it on PHP7.1 - looks like PHP7 chose diferent type and I got this exception on the Java service that talks to my PHP service:
wsclient.WSClient (WSClient.java:88) - Error, Webservice result: java.rmi.RemoteException: Runtime exception; nested exception is: unexpected element type: expected={http://www.w3.org/2001/XMLSchema}QName, actual={http://www.w3.org/2001/XMLSchema}string
Thanks!