Closed wilkolazki closed 4 years ago
Validation rules can be not generated, look to https://github.com/WsdlToPhp/PackageGenerator/wiki/Options#validation
Fix testings in progress, feel free to comment the fix at https://github.com/WsdlToPhp/PackageGenerator/commit/a79d7a6e7e0c239781ef55996b7cbe8078f1428d#diff-36d7df7d6013e2e7ba6be1f26ff0d720
You can test fix with corresponding phars from:
Let me know how it goes so I'll publish a new release
I have checked out the branch feature/issue-210 and tested it on my case. The generated validators work properly.
Some weird thing is that the code differs in two places. Besides validators, each generated service is now accessing getSoapClient
staticly with self::
and not via $this->
. I assume this might be result of some other change already in master, but not in my previous composer installed version.
For now I have ignored this change and not commited it to my package.
Thank you for super fast reaction. That was very impressive.
Great work! Szymon Wilkołazki
The feature/issue-210 is based on the 2.x branch which is the initial bahaviour that evolved in the develop branch (3.x tags), that's all :wink:
So if, appart from the fix, the only other changes are the usage of the getSoapClient (statically instead of the inner instance), I'll release it so you'll be able to use the 3.x release that'll generate the code with the fix and the $this->getSoapClient()
call.
Sorry for not responding in time. Yes, the validators and the self/$this were the only changes in the whole generated source tree in my project. I think it should be safe to release.
Thanks again for your work.
Hi,
I am trying to implement a soap api which uses only decimal numbers. The generated code is unusable because of following validation:
For any integer number
mb_strpos($weight, '.')
returnsfalse
. When you add a1
to this it becomes1
. Whole checkmb_strlen(mb_substr($weight, mb_strpos($weight, '.') + 1))
will be greater than 0 for any number greater or equal to 10.For example, when I try to set the weight to
200
I get the following message:The WSDL fragment this code is base on is as follows:
The full wsdl can be found at here. The WSDL is publicly available, but the service requires a contract.
I hope this description helps fix the issue.
Is there any way to disable the generation of this checks until the issue is fixed?