PHP's Soap client appears to be handling arguments with type s1:char incorrectly when building the request. The Soap API requires either 'Y' or 'N' but in the request XML I get '0'. (Passing Bool true results in '1' but that isn't accepted as API in place of 'Y').
I'm using PHP Version 5.3.8 with the native Soap Client
Here's my PHP
$this->soapClient = new SoapClient( $client->wsdl,
array(
'soap_version' => SOAP_1_2,
'trace' => true
)
);
$result = $this->soapClient->SomeSoapMethod(array(
'sSessionKey' => $sessionKey,
// other string and int args that work fine here
'cReturnNonSeats' => 'Y' // API wants 'Y' or 'N'
));
The relevant XML node in the request XML:
<ns1:cReturnNonSeats>0</ns1:cReturnNonSeats>
And from the WSDL:
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="cReturnNonSeats" type="s1:char" />
</s:sequence>
</s:complexType>
Without getting into building XML manually, is there a way I can have some control over how these arguments are typecast?