php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67152 Abstract types do not have their concrete type specified in WSDL mode
Submitted: 2014-04-29 23:59 UTC Modified: 2015-11-01 04:22 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: josh at 6bit dot com Assigned: dmitry (profile)
Status: No Feedback Package: SOAP related
PHP Version: 5.4.27 OS: All
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: josh at 6bit dot com
New email:
PHP Version: OS:

 

 [2014-04-29 23:59 UTC] 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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-10-21 22:00 UTC] dmitry@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: dmitry
 [2015-10-21 22:35 UTC] dmitry@php.net
-Status: Assigned +Status: Feedback
 [2015-10-21 22:35 UTC] 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>
 [2015-11-01 04:22 UTC] php-bugs at lists dot php dot net
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.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 06:01:35 2024 UTC