php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62231 Tag attributes missing in SOAP Response in non-WSDL mode
Submitted: 2012-06-05 10:30 UTC Modified: -
Votes:7
Avg. Score:4.6 ± 0.5
Reproduced:6 of 6 (100.0%)
Same Version:1 (16.7%)
Same OS:1 (16.7%)
From: joerg dot klein at ifsam dot lu Assigned:
Status: Open Package: SOAP related
PHP Version: 5.3.13 OS: Windows 2008R2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: joerg dot klein at ifsam dot lu
New email:
PHP Version: OS:

 

 [2012-06-05 10:30 UTC] joerg dot klein at ifsam dot lu
Description:
------------
While receiving a message back from a soap call, tag attributes are missing. The 
SoapClient uses non-WSDL mode and soap_version SOAP_1_1.

Response with correct tag attribute (SoapClient::__getLastResponse): 
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header>
<ActivityId CorrelationId="53d1a6af-6103-441f-ad3a-7160a76f341f" 
xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">5cbc1103-
589c-4f6e-86ee-9cafc58caab5</ActivityId></s:Header><s:Body>
<GetMessagesResponse xmlns="http://test.example.com/2009/7/3/TestService">
<GetMessagesResult>
<Messages xmlns="http://test.example.com/2009/7/24/messages">
  <Document xmlns="urn:iso:std:iso:20022:tech:xsd:setr.012.001.03" 
xmlns:im="http://test.example.com/internalMessage/V1.0">
    <Sbcpt>
      <MltplExctnDtls>
        <IndvExctnDtls>
      	   <NetAmt Ccy="EUR">7000.00</NetAmt>
	</IndvExctnDtls>
      </MltplExctnDtls>
    </Sbcpt>
  </Document>
</Messages></GetMessagesResult></GetMessagesResponse></s:Body></s:Envelope>

Test script:
---------------
$options = array('soapaction' => 'http://test.example.com/2009/7/3/TestService/TestService/GetMessages');
$XMLObject = $this->soapClient->__soapCall("GetMessages", array(), $options);

echo "NetAmt :".$XMLObject->Messages->Document->Sbcpt->MltplExctnDtls->IndvExctnDtls->NetAmt;
echo "Ccy :".$XMLObject->Messages->Document->Sbcpt->MltplExctnDtls->IndvExctnDtls->NetAmt['Ccy'];

Expected result:
----------------
NetAmt: 7000
Ccy: EUR

Actual result:
--------------
NetAmt: 7000
Ccy: 

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Thu Jan 23 05:01:24 2020 UTC