PHP SoapClient - SOAP request with long integer -
i have troubles large integer values , php soapclient class. seems soapclient cannot handle large numeric values - , can't send number larger php_int_max (2147483647), though soap parameter type "xsd:long".
this wsdl specification of soap method need call:
<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>
the value of finish-item-id
"3599569593
" (a string loaded mysql big int type). seems soapclient casting 32-bit integer.
the soap envelope looks this:
<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>
it changed 3599569593 2147483647 , soap service telling me i'm passing wrong id.
is there workaround? (i can't change wsdl.)
you haven't shown php code, casting float seems work.
$soapvar = (float)'3599569593';
or when send parameter.
Comments
Post a Comment