Created
July 13, 2019 12:27
-
-
Save parsibox/635b3ad2b257f8594a7aecffbff0a2fa to your computer and use it in GitHub Desktop.
send long number in php soap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$parm = array(); | |
$parm[] = new SoapVar('27809804001843174', XSD_STRING, null, null, 'ns1:payerId' ); | |
$parm[] = new SoapVar('13980416', XSD_STRING, null, null, 'ns1:persianDate' ); | |
$typedVar = new SoapVar($parm, SOAP_ENC_OBJECT); | |
$my_res=$client->__call("getTransactionByPayerId", array($typedVar ) ); | |
?> |
Author
parsibox
commented
Jan 25, 2020
$nmB = 'http://mynamespace2';
$nsB = 'myns2';
$element1 = new Type1SoapStruct;
$element1->attribute1 = new SoapVar('myattribute1', XSD_STRING, 'type1', null, $nmB, $nsB);
$element1->_ = 'myvalue1';
$nmA = 'http://mynamespace1';
$nsA = 'myns1';
$element1_soapvar = new SoapVar($element1, SOAP_ENC_OBJECT, null, null, $nmA, $nsA);
$params = new StdClass();
$params->element1 = $element1_soapvar;
$this->__soapCall('mycall', array(new SoapVar(array($params), SOAP_ENC_OBJECT)));
4. The generated XML now looks like this :)
<ns1:element1 ns2:attribute1="myattribute1" xsi:type="ns2:type1">myvalue1</ns1:element>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment