|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[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. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 17:00:01 2025 UTC |
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>