大きな整数値と PHP SoapClient クラスに問題があります。SoapClient は大きな数値を処理できないようです。また、SOAP パラメーターの型が "xsd:long" であっても、PHP_INT_MAX (2147483647) より大きい数値を送信できません。
これは、呼び出す必要がある SOAP メソッドの WSDL 仕様です。
<message name="doFinishItemRequest">
<part name="session-handle" type="xsd:string"/>
<part name="finish-item-id" type="xsd:long"/>
<part name="finish-cancel-all-bids" type="xsd:int"/>
<part name="finish-cancel-reason" type="xsd:string"/>
</message>
の値finish-item-id
は"3599569593
" (MySQL BIG INT 型からロードされた文字列) ですが、SoapClient はそれを 32 ビット整数にキャストしているようです。
SOAP エンベロープは次のようになります。
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:AllegroWebApi" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:doFinishItem>
<session-handle xsi:type="xsd:string">8a5d261806a4b60a283dabdb092e061a2d46e5d80bcc68bb00_56</session-handle>
<finish-item-id xsi:type="xsd:long">2147483647</finish-item-id>
<finish-cancel-all-bids xsi:type="xsd:int">0</finish-cancel-all-bids>
<finish-cancel-reason xsi:type="xsd:string"></finish-cancel-reason>
</ns1:doFinishItem>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
3599569593 が 2147483647 に変更され、SOAP サービスから間違った ID を渡していると通知されます。
回避策はありますか? (WSDL を変更することはできません。)