Bug #67152 [Fbk->NoF]: Abstract types do not have their concrete type specified in WSDL mode
| From: | php-bugs at lists dot php dot net | Date: | Sun, 01 Nov 2015 04:22:19 +0000 |
| Subject: | Bug #67152 [Fbk->NoF]: Abstract types do not have their concrete type specified in WSDL mode | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-196953@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67152&edit=1
ID: 67152
Updated by: php-bugs@lists.php.net
Reported by: josh at 6bit dot com
Summary: Abstract types do not have their concrete type
specified in WSDL mode
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: SOAP related
Operating System: All
PHP Version: 5.4.27
Assigned To: dmitry
Private report: N
New Comment:
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2015-10-21 22:35:18] dmitry@php.net
What PHP code do you use to generate the request?
May be you should just add "classmap" option?
The following code seems to work...
<?php
class AccountReference {
public $ID;
public $AccountName;
}
$ar = new AccountReference;
$ar->ID = "ChrisTest";
$x = new SoapClient("
https://manageruat.flexnetoperations.com/service/snetmgr/services/SubscribeNet/wsdl/SubscribeNet.wsdl",
array(
"exceptions"=>0,
"trace"=>1,
'classmap' => array('AccountReference'=>'AccountReference')));
$x->Get(array("SubscribeNetObjectReference" => $ar));
echo $x->__getLastRequest() . "\n";
echo $x->__getLastResponse();
?>
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="uri:subscribenet.intraware.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns2="uri:webservice.subscribenet.intraware.com">
<SOAP-ENV:Body>
<ns2:Get>
<ns2:SubscribeNetObjectReference xsi:type="ns1:AccountReference">
<ns1:ID>ChrisTest</ns1:ID>
<ns1:AccountName xsi:nil="true"/>
</ns2:SubscribeNetObjectReference>
</ns2:Get>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
------------------------------------------------------------------------
[2014-04-29 23:59:05] josh at 6bit dot com
Description:
------------
See #39179, this issue still occurs in the latest and is no longer being tracked.
This is common in stupid "enterprisey" SOAP services that use an empty common abstract
base type.
Here is the WSDL I am trying to use, you'll notice that the parameter for the input message of
the 'Get' operation is specified to be the abstract SubscribeNetObjectReference type and I
need to send in the concrete AccountReference type:
https://manageruat.flexnetoperations.com/service/snetmgr/services/SubscribeNet/wsdl/SubscribeNet.wsdl
On a request using generated objects the xsi:type is set to "AccountReference" properly:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="uri:subscribenet.intraware.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ns2="uri:webservice.subscribenet.intraware.com">
<SOAP-ENV:Header>
<ns2:SessionHeader><ns2:SessionID>ee80aa73-385a-4936-beb9-95fb97e94a5675P/LFvqYa816cZ4AX/Qmm/Y</ns2:SessionID></ns2:SessionHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns2:Get>
<ns2:SubscribeNetObjectReference xsi:type="ns1:AccountReference">
<ns1:ID>ChrisTest</ns1:ID>
<ns1:AccountName xsi:nil="true"/>
</ns2:SubscribeNetObjectReference>
</ns2:Get>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
In WSDL mode it is not being set:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="uri:subscribenet.intraware.com"
xmlns:ns2="uri:webservice.subscribenet.intraware.com">
<SOAP-ENV:Header>
<ns2:SessionHeader><ns2:SessionID>ee80aa73-385a-4936-beb9-95fb97e94a5675P/LFvqYa816cZ4AX/Qmm/Y</ns2:SessionID></ns2:SessionHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns2:Get>
<ns2:SubscribeNetObjectReference>
<ns1:ID>ChrisTest</ns1:ID>
</ns2:SubscribeNetObjectReference>
</ns2:Get>
</SOAP-ENV:Body></SOAP-ENV:Envelope>
Expected result:
----------------
Need some way to specify the concrete base type.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67152&edit=1