I am trying to call an RPGLE service program from PHP using the PHP Toolkit. The procedure returns a data structure that includes an element of type N
(indicator) and returns either *off
or *on
.
I am trying to figure out how to structure my return parameter in PHP to accept a value of this type and cannot find any information about sending or receiving boolean values with XMLService.
I contacted Alan Seiden with this question and his answer fixed my issue.
You can use a 1-byte character parameter in place of a specialized indicator type. For example:
Input
Output
The XML (for an output param) will come back like:
Which yields PHP in the $result['retvals'] of:
Which will evaluate to true/false (1/0) correctly as long as you don't type check.
Thank you very much Alan!