#40922 [Opn]: parse_packet_soap does not decode objects properties from local message schema
| From: | php dot ajr at vitalphone dot net | Date: | Wed, 04 Apr 2007 15:41:44 +0000 |
| Subject: | #40922 [Opn]: parse_packet_soap does not decode objects properties from local message schema | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-111096@lists.php.net to get a copy of this message | ||
ID: 40922
User updated by: php dot ajr at vitalphone dot net
Reported By: php dot ajr at vitalphone dot net
Status: Open
Bug Type: Feature/Change Request
Operating System: Mandriva Linux 2007.0
PHP Version: 5.1.6
Assigned To: dmitry
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2007-04-04 15:16:58] 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 11:27:53] 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-03-31 16:10:48] php dot ajr at vitalphone dot net
Best category about this bug or featur
------------------------------------------------------------------------
[2007-03-26 15:00:43] php dot ajr at vitalphone dot net
Removed version at the first time.
------------------------------------------------------------------------
[2007-03-26 14:42:11] 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" } }
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40922&edit=1