php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47719 SOAP-ERROR: Encoding: Violation of encoding rules
Submitted: 2009-03-19 16:04 UTC Modified: 2013-02-18 00:33 UTC
Votes:5
Avg. Score:4.8 ± 0.4
Reproduced:5 of 5 (100.0%)
Same Version:2 (40.0%)
Same OS:0 (0.0%)
From: oxomichael at hotmail dot com Assigned:
Status: No Feedback Package: SOAP related
PHP Version: 5.2.9 OS: Windows
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: oxomichael at hotmail dot com
New email:
PHP Version: OS:

 

 [2009-03-19 16:04 UTC] oxomichael at hotmail dot com
Description:
------------
I get an SOAP Error violation encoding 

From Windows XP with WAMPSERVER PHP5.2.9-r1
From Ubuntu 8.10 & PHP 5.2.6

From Gentoo & PHP 5.2.8 (I have the error but i have the return from webservice with LastResponse)


Works Fine on Ubunutu 8.0.4 LTS & PHP 5.2.4 (Production server)

The webservice i request wait for an string compose as "xml" et send also a string as xml (see code example for what i send)

Soap request :
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://webservices.infogreffe.fr/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getProduitsWebServicesXML><param0 xsi:type="xsd:string">&lt;demande&gt;&lt;emetteur&gt;&lt;code_abonne&gt;85000109&lt;/code_abonne&gt;&lt;mot_passe&gt;166&lt;/mot_passe&gt;&lt;reference_client&gt;G0&lt;/reference_client&gt;&lt;code_requete&gt;&lt;type_profil&gt;A&lt;/type_profil&gt;&lt;origine_emetteur&gt;IC&lt;/origine_emetteur&gt;&lt;nature_requete&gt;C&lt;/nature_requete&gt;&lt;type_document&gt;AC&lt;/type_document&gt;&lt;type_requete&gt;S&lt;/type_requete&gt;&lt;media&gt;WS&lt;/media&gt;&lt;mode_diffusion&gt;&lt;mode type="XL"/&gt;&lt;mode type="T"/&gt;&lt;mode type="C"/&gt;&lt;/mode_diffusion&gt;&lt;/code_requete&gt;&lt;/emetteur&gt;&lt;commande&gt;&lt;num_siren&gt;494967938&lt;/num_siren&gt;&lt;/commande&gt;&lt;/demande&gt;</param0></ns1:getProduitsWebServicesXML></SOAP-ENV:Body></SOAP-ENV:Envelope>


Reproduce code:
---------------
Code give as information because i can't have any debug information from webservice.

Code URL : http://oxomichael.serveftp.net/michael/infogreffe.txt



Expected result:
----------------
<?xml version='1.0' encoding='UTF-8'?><SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:SOAP-ENC='http://schemas.xmlsoap.org/soap/encoding/' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xsd='http://www.w3.org/2001/XMLSchema'><SOAP-ENV:Body><ns0:getProduitsWebServicesXMLResponse xmlns:ns0='urn:local' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><return xsi:type='xsd:string'><liste_depot_acte><depot_acte><num_gest><greffe>7803</greffe><dossier_millesime>08</dossier_millesime><dossier_statut>B</dossier_statut><dossier_chrono>04241</dossier_chrono></num_gest><num_siren>494967938</num_siren><num_depot>17380</num_depot><date_depot>2008-12-03</date_depot><acte><date_acte>2008-11-24</date_acte><num_acte>01</num_acte><type_acte>PG</type_acte><type_acte_libelle>PROCES VERBAL D'ASSEMBLEE GENERALE ORDINAIRE</type_acte_libelle><nbpages_acte>3</nbpages_acte><decision><nature>CHANGEMENT DE COMMISSAIRES AUX COMPTES TITULAIRE ET SUPPLEANT</nature><libelle></libelle></decision><mode_diffusion><mode type="C"></mode><mode type="T"></mode></mode_diffusion></acte></depot_acte><depot_acte><num_gest><greffe>7501</greffe><dossier_millesime>08</dossier_millesime><dossier_statut>B</dossier_statut><dossier_chrono>01601</dossier_chrono></num_gest><num_siren>494967938</num_siren><num_depot>86746</num_depot><date_depot>2008-09-26</date_depot><acte><date_acte>2008-09-25</date_acte><num_acte>01</num_acte><type_acte>RA</type_acte><type_acte_libelle>RAPPORT</type_acte_libelle><nbpages_acte>6</nbpages_acte><decision><nature></nature><libelle></libelle></decision><mode_diffusion><mode type="T"></mode><mode type="C"></mode></mode_diffusion></acte></depot_acte><depot_acte><num_gest><greffe>9401</greffe><dossier_millesime>07</dossier_millesime><dossier_statut>B</dossier_statut><dossier_chrono>01328</dossier_chrono></num_gest><num_siren>494967938</num_siren><num_depot>4476</num_depot><date_depot>2007-03-21</date_depot><acte><date_acte>2007-02-19</date_acte><num_acte>01</num_acte><type_acte>04</type_acte><type_acte_libelle>STATUTS CONSTITUTIFS</type_acte_libelle><nbpages_acte>16</nbpages_acte><mode_diffusion><mode type="T"></mode><mode type="C"></mode></mode_diffusion></acte><acte><date_acte>2007-02-19</date_acte><num_acte>02</num_acte><type_acte>AA</type_acte><type_acte_libelle>ACTE</type_acte_libelle><nbpages_acte>1</nbpages_acte><decision><nature>NOMINATION DE DIRECTEUR GENERAL</nature><libelle></libelle></decision><mode_diffusion><mode type="T"></mode><mode type="C"></mode></mode_diffusion></acte><acte><date_acte>2007-02-27</date_acte><num_acte>03</num_acte><type_acte>AA</type_acte><type_acte_libelle>ACTE</type_acte_libelle><nbpages_acte>1</nbpages_acte><decision><nature>ATTESTATION BANCAIRE</nature><libelle></libelle></decision><mode_diffusion><mode type="T"></mode><mode type="C"></mode></mode_diffusion></acte><acte><date_acte>2007-02-27</date_acte><num_acte>04</num_acte><type_acte>AA</type_acte><type_acte_libelle>ACTE</type_acte_libelle><nbpages_acte>1</nbpages_acte><decision><nature>LISTE DES SOUSCRIPTEURS</nature><libelle></libelle></decision><mode_diffusion><mode type="T"></mode><mode type="C"></mode></mode_diffusion></acte></depot_acte><depot_acte><num_gest><greffe>7501</greffe><dossier_millesime>08</dossier_millesime><dossier_statut>B</dossier_statut><dossier_chrono>01601</dossier_chrono></num_gest><num_siren>494967938</num_siren><num_depot>86904</num_depot><date_depot>2008-09-26</date_depot><acte><date_acte>2008-09-24</date_acte><num_acte>01</num_acte><type_acte>PH</type_acte><type_acte_libelle>PROCES VERBAL D'ASSEMBLEE MIXTE</type_acte_libelle><nbpages_acte>5</nbpages_acte><decision><nature>CHANGEMENT DE DATE D'EXERCICE SOCIAL</nature><libelle>AU 31/12</libelle></decision><decision><nature>MODIFICATION(S) STATUTAIRE(S)</nature><libelle></libelle></decision><mode_diffusion><mode type="T"></mode><mode type="C"></mode></mode_diffusion></acte><acte><date_acte>2008-09-24</date_acte><num_acte>02</num_acte><type_acte>06</type_acte><type_acte_libelle>STATUTS A JOUR</type_acte_libelle><nbpages_acte>17</nbpages_acte><decision><nature></nature><libelle></libelle></decision><mode_diffusion><mode type="T"></mode><mode type="C"></mode></mode_diffusion></acte></depot_acte><depot_acte><num_gest><greffe>7501</greffe><dossier_millesime>08</dossier_millesime><dossier_statut>B</dossier_statut><dossier_chrono>01601</dossier_chrono></num_gest><num_siren>494967938</num_siren><num_depot>6338</num_depot><date_depot>2008-01-23</date_depot><acte><date_acte>2007-11-16</date_acte><num_acte>01</num_acte><type_acte>09</type_acte><type_acte_libelle>STATUTS APRES TRANSFERT DE SIEGE</type_acte_libelle><nbpages_acte></nbpages_acte><decision><nature></nature><libelle></libelle></decision><mode_diffusion><mode type="C"></mode></mode_diffusion></acte><acte><date_acte>2007-11-16</date_acte><num_acte>02</num_acte><type_acte>PA</type_acte><type_acte_libelle>PROCES VERBAL</type_acte_libelle><nbpages_acte>6</nbpages_acte><decision><nature>AUGMENTATION DE CAPITAL</nature><libelle></libelle></decision><mode_diffusion><mode type="T"></mode><mode type="C"></mode></mode_diffusion></acte><acte><date_acte>2007-11-15</date_acte><num_acte>03</num_acte><type_acte>PA</type_acte><type_acte_libelle>PROCES VERBAL</type_acte_libelle><nbpages_acte>6</nbpages_acte><decision><nature>AUGMENTATION DE CAPITAL</nature><libelle></libelle></decision><decision><nature>MODIFICATION(S) STATUTAIRE(S)</nature><libelle></libelle></decision><mode_diffusion><mode type="T"></mode><mode type="C"></mode></mode_diffusion></acte><acte><date_acte>2007-10-29</date_acte><num_acte>04</num_acte><type_acte>PA</type_acte><type_acte_libelle>PROCES VERBAL</type_acte_libelle><nbpages_acte>4</nbpages_acte><decision><nature>TRANSFERT DE SIEGE SOCIAL D'UN GREFFE EXTERIEUR</nature><libelle>ANCIEN SIEGE : 7 RUE BOULINEAU 94250 GENTILLY</libelle></decision><mode_diffusion><mode type="T"></mode><mode type="C"></mode></mode_diffusion></acte></depot_acte><depot_acte><num_gest><greffe>7803</greffe><dossier_millesime>08</dossier_millesime><dossier_statut>B</dossier_statut><dossier_chrono>04241</dossier_chrono></num_gest><num_siren>494967938</num_siren><num_depot>16261</num_depot><date_depot>2008-11-07</date_depot><acte><date_acte>2008-10-09</date_acte><num_acte>01</num_acte><type_acte>09</type_acte><type_acte_libelle>STATUTS APRES TRANSFERT DE SIEGE</type_acte_libelle><nbpages_acte>18</nbpages_acte><mode_diffusion><mode type="C"></mode><mode type="T"></mode></mode_diffusion></acte><acte><date_acte>2008-10-09</date_acte><num_acte>02</num_acte><type_acte>PH</type_acte><type_acte_libelle>PROCES VERBAL D'ASSEMBLEE MIXTE</type_acte_libelle><nbpages_acte>23</nbpages_acte><decision><nature>TRANSFERT DE SIEGE SOCIAL D'UN GREFFE EXTERIEUR</nature><libelle></libelle></decision><decision><nature>MODIFICATION(S) STATUTAIRE(S)</nature><libelle></libelle></decision><decision><nature>DEMISSION DE DIRECTEUR GENERAL</nature><libelle></libelle></decision><decision><nature>AUGMENTATION DE CAPITAL</nature><libelle></libelle></decision><mode_diffusion><mode type="C"></mode><mode type="T"></mode></mode_diffusion></acte></depot_acte><depot_acte><num_gest><greffe>7501</greffe><dossier_millesime>08</dossier_millesime><dossier_statut>B</dossier_statut><dossier_chrono>01601</dossier_chrono></num_gest><num_siren>494967938</num_siren><num_depot>81004</num_depot><date_depot>2008-09-09</date_depot><acte><date_acte>2008-09-08</date_acte><num_acte>01</num_acte><type_acte>OE</type_acte><type_acte_libelle>ORDONNANCE</type_acte_libelle><nbpages_acte>2</nbpages_acte><decision><nature></nature><libelle></libelle></decision><mode_diffusion><mode type="T"></mode><mode type="C"></mode></mode_diffusion></acte></depot_acte></liste_depot_acte></return></ns0:getProduitsWebServicesXMLResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

Actual result:
--------------
Nothing, I get the soap encoding error 

SoapFault exception: [Client] SOAP-ERROR: Encoding: Violation of encoding rules in infogreffe.php:81
Stack trace:
#0 [internal function]: SoapClient->__call('getProduitsWebS...', Array)
#1 infogreffe.php(81): SoapClient->getProduitsWebServicesXML('<demande><emett...')
#2 {main}<br/>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-20 21:32 UTC] felipe@php.net
-Status: Open +Status: Feedback
 [2010-06-20 21:32 UTC] felipe@php.net
Please try using this snapshot:

  http://snaps.php.net/php5.2-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [2011-03-11 18:08 UTC] benjamin-richard at wanadoo dot fr
Hi, 
did you find a solution to your problem ? i have the same on a PHP 5.3.3

Thanks
 [2013-02-18 00:33 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 "Open". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 13:01:31 2024 UTC