Bug #74984 [Opn->Csd]: [Client] SOAP-ERROR: Encoding: object has no XXX property
| From: | peter_liang at vtech dot com | Date: | Tue, 25 Jul 2017 03:31:18 +0000 |
| Subject: | Bug #74984 [Opn->Csd]: [Client] SOAP-ERROR: Encoding: object has no XXX property | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-210311@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74984&edit=1
ID: 74984
User updated by: peter_liang at vtech dot com
Reported by: peter_liang at vtech dot com
Summary: [Client] SOAP-ERROR: Encoding: object has no XXX
property
-Status: Open
+Status: Closed
Type: Bug
Package: SOAP related
Operating System: CentOS 7.3
PHP Version: 7.0.21
Block user comment: N
Private report: N
New Comment:
I change the PHP SoapUI call as follow, the issue resolves.
$arguments = array ();
$arguments[] = new SoapVar("#caller-id#",XSD_STRING,null,null, "caller-id");
$arguments[] = new SoapVar(#customer-id#,XSD_INTEGER,null,null, "customer-id");
$soapClient = new \SoapClient(#WSDL#, null);
$result = $soapClient->fetchCustomerDevices(new SoapVar($arguments,SOAP_ENC_OBJECT));
Thus I closed the bug.
Previous Comments:
------------------------------------------------------------------------
[2017-07-25 03:03:39] peter_liang at vtech dot com
Description:
------------
When I call a webservice, it works on Java and SoapUI, fails in PHP.
Java & SoapUI return a list, PHP return a stdClass with nothing.
// SoapUI
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:man="#namespace#">
<soapenv:Header/>
<soapenv:Body>
<man:fetchCustomerDevices>
<caller-id>#called-id#</caller-id>
<customer-id>#customer-id#</customer-id>
</man:fetchCustomerDevices>
</soapenv:Body>
</soapenv:Envelope>
// Java
service.fetchCustomerDevices(
#called-id#,
new BigInteger(#customer-id#),
null,
false);
// PHP
$arguments =
array(
'caller-id' => '#called-id#',
'customer-id' => #customer-id#,
'device-serial' => null,
'sendEmail' => false
);
$soapClient = new \SoapClient($wsdl, null);
$result = $soapClient->fetchCustomerDevices($arguments);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74984&edit=1