php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #40922 parse_packet_soap does not decode objects properties from local message schema
Submitted: 2007-03-26 14:42 UTC Modified: 2017-10-24 07:56 UTC
Votes:6
Avg. Score:3.7 ± 1.9
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:1 (25.0%)
From: php dot ajr at vitalphone dot net Assigned:
Status: Open Package: SOAP related
PHP Version: 5.1.6 OS: Mandriva Linux 2007.0
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2007-03-26 14:42 UTC] php dot ajr at vitalphone dot net
Description:
------------
Hi,

Our script are using PHP5/SOAP functionality. It interoperates with .Net Webservices. The server WSDL does not content the description of object properties. The Microsoft Server return the XML Schema for the object properties into the response with the data in the "Diffgr" contener like :

<xs:element name="InfoEligibilite">
-<xs:complexType>
--<xs:sequence>
---<xs:element name="offercode" type="xs:string"/>
---<xs:element name="bandwidthadsl1" type="xs:string"/>
---<xs:element name="bandwidthadsl2plus" type="xs:string"/>
---<xs:element name="upload" type="xs:string"/>
---<xs:element name="accesstype" type="xs:string"/>
--</xs:sequence>
-</xs:complexType>
</xs:element>

and

<diffgr:diffgram>
-<WSSignup_Dataset>
--<InfoEligibilite diffgr:id="InfoEligibilite1" msdata:rowOrder="0">
---<offercode>DSLFMTIF</offercode>
---<bandwidthadsl1>6048</bandwidthadsl1>
---<bandwidthadsl2plus>14528</bandwidthadsl2plus>
---<upload>256</upload>
---<accesstype>SHARED</accesstype>
--</InfoEligibilite>
--<InfoEligibilite diffgr:id="InfoEligibilite2" msdata:rowOrder="1">
---<offercode>DSLFMDTTIF</offercode>
---<bandwidthadsl1>6048</bandwidthadsl1>
---<bandwidthadsl2plus>14528</bandwidthadsl2plus>
---<upload>256</upload>
---<accesstype>FULL</accesstype>
--</InfoEligibilite>
-</WSSignup_Dataset>
</diffgr:diffgram>

The parse_packet_soap.c programm decodes the object properties only from the WSDL schema, see the lines between 257 and 342. For the compatibility with all webservice form, it is necessary to add the property decoding from the response XML schema.


Reproduce code:
---------------
    $client = new  SoapClient('http://test.isdbwssignup.telecomitalia-entreprises.fr/WSSignup.asmx?WSDL',
                    array('trace' => 1, 'soap_version'  => SOAP_1_1));

    $resultat = $client->GetInfoEligibility($parametres);
    //
    // Affichage du resultat
    //
    echo '</br />Analyse du resultat</br />';
    var_dump($resultat);


Expected result:
----------------
<diffgr:diffgram>
-<WSSignup_Dataset>
--<InfoEligibilite diffgr:id="InfoEligibilite1" msdata:rowOrder="0">
---<offercode>DSLFMTIF</offercode>
---<bandwidthadsl1>6048</bandwidthadsl1>
---<bandwidthadsl2plus>14528</bandwidthadsl2plus>
---<upload>256</upload>
---<accesstype>SHARED</accesstype>
--</InfoEligibilite>
--<InfoEligibilite diffgr:id="InfoEligibilite2" msdata:rowOrder="1">
---<offercode>DSLFMDTTIF</offercode>
---<bandwidthadsl1>6048</bandwidthadsl1>
---<bandwidthadsl2plus>14528</bandwidthadsl2plus>
---<upload>256</upload>
---<accesstype>FULL</accesstype>
--</InfoEligibilite>
-</WSSignup_Dataset>
</diffgr:diffgram>


Actual result:
--------------
object(stdClass)#3 (1) { ["GetInfoEligibilityResult"]=>  object(stdClass)#4 (1) { ["any"]=>  string(10418) "DSLFMTIF604814528256SHAREDDSLFMDTTIF604814528256FULL" } } 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-04 11:27 UTC] dmitry@php.net
Nor WSDL neither webservice, that you provided, work for me.
Please provide full-functional example, that I'll able to test locally.

BTW I don't think ext/soap will so smart to support such feature automatic. Do you know any W3C or MSFT standards about it?

 [2007-04-04 15:16 UTC] php dot ajr at vitalphone dot net
Hello,

Thanks for your response. My ticket laies down as a real fact. We are study the source code before open it.

We are look the parse_packet_soap.c code and it decodes the packet from the .Net Webserver in using the WSDL schema and none the schema into this packet.

If you want to test it. We have an URL to a sample PHP module. Please send me an e-mail to forward this URL and give me an public IP address if you want test this module at your office.

Best regards.

JR ATHANASE
 [2007-04-04 15:41 UTC] php dot ajr at vitalphone dot net
Hello,

We add in the following of this message the response content (packet) of the .net Webservice :

-
	<WSSignup_Dataset>
-
	<xs:schema id="WSSignup_Dataset" targetNamespace="http://tempuri.org/WSSignup_Dataset.xsd" attributeFormDefault="qualified" elementFormDefault="qualified">
-
	<xs:element name="WSSignup_Dataset" msdata:IsDataSet="true">
-
	<xs:complexType>
-
	<xs:choice maxOccurs="unbounded">
-
	<xs:element name="Error">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="Code" type="xs:string" minOccurs="0"/>
<xs:element name="Label" type="xs:string" minOccurs="0"/>
<xs:element name="Message" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="User">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="iduser" type="xs:int"/>
<xs:element name="idclient" type="xs:string" minOccurs="0"/>
<xs:element name="civilitycode" type="xs:string" minOccurs="0"/>
<xs:element name="firstname" type="xs:string" minOccurs="0"/>
<xs:element name="lastname" type="xs:string"/>
<xs:element name="phone" type="xs:string" minOccurs="0"/>
<xs:element name="contract" type="xs:string" minOccurs="0"/>
<xs:element name="address" type="xs:string" minOccurs="0"/>
<xs:element name="siret" type="xs:string" minOccurs="0"/>
<xs:element name="zipcode" type="xs:string" minOccurs="0"/>
<xs:element name="town" type="xs:string" minOccurs="0"/>
<xs:element name="country" type="xs:string" minOccurs="0"/>
<xs:element name="status" type="xs:string"/>
<xs:element name="dcommand" type="xs:dateTime" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="DslFirst">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="iduser" type="xs:int"/>
<xs:element name="idlogindsl" type="xs:string"/>
<xs:element name="phone" type="xs:string" minOccurs="0"/>
<xs:element name="passwd" type="xs:string" minOccurs="0"/>
<xs:element name="offercode" type="xs:string" minOccurs="0"/>
<xs:element name="mailalert" type="xs:string" minOccurs="0"/>
<xs:element name="accesstype" type="xs:string" minOccurs="0"/>
<xs:element name="portability" type="xs:string" minOccurs="0"/>
<xs:element name="status" type="xs:string" minOccurs="0"/>
<xs:element name="bactive" type="xs:string"/>
<xs:element name="dcommand" type="xs:dateTime" minOccurs="0"/>
<xs:element name="ddelivery" type="xs:dateTime" minOccurs="0"/>
<xs:element name="dstatus" type="xs:dateTime" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="Dialup">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="iduser" type="xs:int"/>
<xs:element name="idlogindialup" type="xs:string"/>
<xs:element name="passwd" type="xs:string" minOccurs="0"/>
<xs:element name="offercode" type="xs:string" minOccurs="0"/>
<xs:element name="status" type="xs:string" minOccurs="0"/>
<xs:element name="bactive" type="xs:string"/>
<xs:element name="dcommand" type="xs:dateTime" minOccurs="0"/>
<xs:element name="dstatus" type="xs:dateTime" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="IpSubnet">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="idlogin" type="xs:string"/>
<xs:element name="StaticIPText" type="xs:string"/>
<xs:element name="StaticIP" type="xs:decimal"/>
<xs:element name="StaticIPSubnet" type="xs:int"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="Equipment">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="idloginequipment" type="xs:string"/>
<xs:element name="iduser" type="xs:int"/>
<xs:element name="offercode" type="xs:string" minOccurs="0"/>
<xs:element name="status" type="xs:string" minOccurs="0"/>
<xs:element name="compagny" type="xs:string" minOccurs="0"/>
<xs:element name="address" type="xs:string" minOccurs="0"/>
<xs:element name="zipcode" type="xs:string" minOccurs="0"/>
<xs:element name="town" type="xs:string" minOccurs="0"/>
<xs:element name="country" type="xs:string" minOccurs="0"/>
<xs:element name="phonenumber" type="xs:string" minOccurs="0"/>
<xs:element name="bactive" type="xs:string"/>
<xs:element name="dcommand" type="xs:dateTime" minOccurs="0"/>
<xs:element name="ddelivery" type="xs:dateTime" minOccurs="0"/>
<xs:element name="dstatus" type="xs:dateTime" minOccurs="0"/>
<xs:element name="numtracking" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="civility">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="icivility" type="xs:int"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="shortname" type="xs:string"/>
<xs:element name="civilitycode" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="Offers">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="offercode" type="xs:string"/>
<xs:element name="offername" type="xs:string"/>
<xs:element name="servicename" type="xs:string"/>
<xs:element name="servicecode" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="Status">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="offercode" type="xs:string"/>
<xs:element name="offername" type="xs:string"/>
<xs:element name="status" type="xs:string"/>
<xs:element name="comment" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="Service">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="servicename" type="xs:string"/>
<xs:element name="servicecode" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="ErrorCode">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="code" type="xs:string"/>
<xs:element name="label" type="xs:string"/>
<xs:element name="message" type="xs:string"/>
<xs:element name="language" type="xs:string"/>
<xs:element name="dcreate" type="xs:dateTime" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="InfoEligibilite">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="offercode" type="xs:string"/>
<xs:element name="bandwidthadsl1" type="xs:string"/>
<xs:element name="bandwidthadsl2plus" type="xs:string"/>
<xs:element name="upload" type="xs:string"/>
<xs:element name="accesstype" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="VOIP">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="iduser" type="xs:int"/>
<xs:element name="idvoip" type="xs:int"/>
<xs:element name="idloginvoip" type="xs:string"/>
<xs:element name="status" type="xs:string" minOccurs="0"/>
<xs:element name="offercode" type="xs:string" minOccurs="0"/>
<xs:element name="phonecount" type="xs:int"/>
<xs:element name="bbackup" type="xs:string" minOccurs="0"/>
<xs:element name="backuptel" type="xs:string" minOccurs="0"/>
<xs:element name="ip" type="xs:string" minOccurs="0"/>
<xs:element name="portability" type="xs:string" minOccurs="0"/>
<xs:element name="forfaitintra_offercode" type="xs:string" minOccurs="0"/>
<xs:element name="forfaitlocnat_offercode" type="xs:string" minOccurs="0"/>
<xs:element name="forfaitmobile_offercode" type="xs:string" minOccurs="0"/>
<xs:element name="trunk" type="xs:string" minOccurs="0"/>
<xs:element name="bactive" type="xs:string"/>
<xs:element name="dcommand" type="xs:dateTime" minOccurs="0"/>
<xs:element name="ddelivery" type="xs:dateTime" minOccurs="0"/>
<xs:element name="dstatus" type="xs:dateTime" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="VOIP_Phone">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="iduser" type="xs:int"/>
<xs:element name="idphone" type="xs:int"/>
<xs:element name="idloginvoip" type="xs:string"/>
<xs:element name="voipphone" type="xs:string" minOccurs="0"/>
<xs:element name="email" type="xs:string" minOccurs="0"/>
<xs:element name="status" type="xs:string" minOccurs="0"/>
<xs:element name="bactive" type="xs:string"/>
<xs:element name="dcommand" type="xs:dateTime" minOccurs="0"/>
<xs:element name="ddelivery" type="xs:dateTime" minOccurs="0"/>
<xs:element name="dstatus" type="xs:dateTime" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="Email">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="iduser" type="xs:int"/>
<xs:element name="idloginemail" type="xs:string"/>
<xs:element name="passwd" type="xs:string" minOccurs="0"/>
<xs:element name="email" type="xs:string" minOccurs="0"/>
<xs:element name="status" type="xs:string" minOccurs="0"/>
<xs:element name="bactive" type="xs:string"/>
<xs:element name="dcommand" type="xs:dateTime" minOccurs="0"/>
<xs:element name="dstatus" type="xs:dateTime" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="Web">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="idlogin" type="xs:string"/>
<xs:element name="passwd" type="xs:string" minOccurs="0"/>
<xs:element name="email" type="xs:string" minOccurs="0"/>
<xs:element name="web" type="xs:string" minOccurs="0"/>
<xs:element name="webalias" type="xs:string" minOccurs="0"/>
<xs:element name="bactive" type="xs:string"/>
<xs:element name="dcreate" type="xs:dateTime" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="UserServices">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="idUser" type="xs:int"/>
<xs:element name="idLogin" type="xs:string"/>
<xs:element name="ServiceCode" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="Info">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="label" type="xs:string"/>
<xs:element name="message" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
-
	<xs:element name="Ip">
-
	<xs:complexType>
-
	<xs:sequence>
<xs:element name="iduser" type="xs:int"/>
<xs:element name="idlogin" type="xs:string" minOccurs="0"/>
<xs:element name="fixedipclair" type="xs:string" minOccurs="0"/>
<xs:element name="fixedip" type="xs:string" minOccurs="0"/>
<xs:element name="fixedipsunet" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
-
	<diffgr:diffgram>
-
	<WSSignup_Dataset>
-
	<InfoEligibilite diffgr:id="InfoEligibilite1" msdata:rowOrder="0">
<offercode>DSLFMTIF</offercode>
<bandwidthadsl1>6048</bandwidthadsl1>
<bandwidthadsl2plus>14528</bandwidthadsl2plus>
<upload>256</upload>
<accesstype>SHARED</accesstype>
</InfoEligibilite>
-
	<InfoEligibilite diffgr:id="InfoEligibilite2" msdata:rowOrder="1">
<offercode>DSLFMDTTIF</offercode>
<bandwidthadsl1>6048</bandwidthadsl1>
<bandwidthadsl2plus>14528</bandwidthadsl2plus>
<upload>256</upload>
<accesstype>FULL</accesstype>
</InfoEligibilite>
</WSSignup_Dataset>
</diffgr:diffgram>
</WSSignup_Dataset>

You can see that property definition are into this packet. Always, send us a message to forward the URL to produce it and the parameters.

Best regards.

JR ATHANASE

JR ATHANASE
 [2011-02-21 21:09 UTC] jani@php.net
-Package: Feature/Change Request +Package: SOAP related
 [2015-03-26 16:17 UTC] aavindraa at gmail dot com
Still experiencing this issue on PHP 5.6.7 on SLES 11 SP3.

Will there ever be a fix for this?

Unfortunately, we're stuck using SOAP for many of our web services in the enterprise. Even in 2015.
 [2017-10-24 07:56 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: dmitry +Assigned To:
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC