Bug #36575 [Com]: Incorrect complex type instantiation with hierarchies
| From: | bhavin dot zestard at gmail dot com | Date: | Thu, 21 Dec 2017 12:22:47 +0000 |
| Subject: | Bug #36575 [Com]: Incorrect complex type instantiation with hierarchies | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-213212@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=36575&edit=1
ID: 36575
Comment by: bhavin dot zestard at gmail dot com
Reported by: hjiverson at plauditdesign dot com
Summary: Incorrect complex type instantiation with
hierarchies
Status: Closed
Type: Bug
Package: SOAP related
Operating System: Gentoo Linux 2.6, Windows XP SP2
PHP Version: 5.1.2
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
Sorry for previous wrong question
Here is my question for soap API call with NetSuite
https://magento.stackexchange.com/questions/205645/magento-2-to-netsuit-error-baseref-is-an-abstract-type-and-cannot-be-instantiat
Previous Comments:
------------------------------------------------------------------------
[2017-12-21 12:19:15] bhavin dot zestard at gmail dot com
Here is my question
Please help
https://stackoverflow.com/questions/42839090/coupon-is-always-re-added-during-checkout
------------------------------------------------------------------------
[2006-03-03 10:21:25] dmitry@php.net
Dixed in CVS HEAD and PHP_5_1.
------------------------------------------------------------------------
[2006-03-01 17:55:07] hjiverson at plauditdesign dot com
Description:
------------
The client and server always try to instantiate the base XSD type defined in a hierarchy.
For example: A3 extends A2, A2 extends A1. function returnA2(), which is mapped to return A2 in
WSDL, returns an instance of A3 (which is legal, since A3 is an A2). SOAP tries to create an A1,
even though it is actually an instance of A3. If A1 is not defined in the class map, SOAP returns an
A2, which is also not correct.
The correct behavior would be (like Axis) to map and return an A3--the exact type the instance is
mapped to--as long as it is instanceof A2.
Reproduce code:
---------------
http://dev.plauditdesign.com/~hjiverson/php-soap-bug.txt
Expected result:
----------------
Response:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:test.soap#" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns2="urn:test.soap.types#"
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:testResponse><result
xsi:type="ns2:A3"><var1 xsi:type="xsd:string">one</var1><var2
xsi:type="xsd:string">var two</var2><var3
xsi:type="xsd:string">var
three</var3></result></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
Actual result:
--------------
Response:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Cannot
instantiate abstract class
CT_A1</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=36575&edit=1