IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Bibliothèques et frameworks PHP Discussion :

[Web Service] Problème taille des objets


Sujet :

Bibliothèques et frameworks PHP

  1. #1
    Membre habitué
    Homme Profil pro
    Développeur Web
    Inscrit en
    Juillet 2011
    Messages
    135
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : Conseil

    Informations forums :
    Inscription : Juillet 2011
    Messages : 135
    Points : 153
    Points
    153
    Par défaut [Web Service] Problème taille des objets
    Bonjour,

    J'ai un problème avec le retour XML en SOAP.
    J'utilise la technologie PHP.
    En fait mon webservice fonctionne correctement lorsque je retourne un tableau de moins de 12 entrées sinon il me retourne une erreur '["faultstring"]=>
    string(33) "looks like we got no XML document"' .
    Comment faire pour remédier à ce problème ?
    Faut-il augmenter la mémoire?

    Voici un exemple d'un retour de la fonction lorsque ca fonctionne :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope" xmlns:ns1="urn:NavisionWs" xmlns:enc="http://www.w3.org/2003/05/soap-encoding" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><env:Body xmlns:rpc="http://www.w3.org/2003/05/soap-rpc"><ns1:recupererPrixStockResponse env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"><rpc:result>tabProduit</rpc:result><tabProduit enc:itemType="enc:Struct" enc:arraySize="12" xsi:type="enc:Array"><item xsi:type="enc:Struct"><id xsi:type="xsd:string">ZMVHS1</id><tarif1 xsi:type="xsd:string">.99000000000000000000</tarif1><tarif2 xsi:type="xsd:string">.99000000000000000000</tarif2><tarif3 xsi:type="xsd:string">.99000000000000000000</tarif3><tarif4 xsi:type="xsd:string">.99000000000000000000</tarif4><tarif5 xsi:type="xsd:string">.99000000000000000000</tarif5><tarif6 xsi:type="xsd:string">.95000000000000000000</tarif6><tarif7 xsi:type="xsd:string">.99000000000000000000</tarif7><stock xsi:type="xsd:int">6</stock><stockReel xsi:type="xsd:int">6</stockReel></item><item xsi:type="enc:Struct"><id xsi:type="xsd:string">ZMSG100G</id><tarif1 xsi:type="xsd:string">6.55000000000000000000</tarif1><tarif2 xsi:type="xsd:string">6.55000000000000000000</tarif2><tarif3 xsi:type="xsd:string">6.55000000000000000000</tarif3><tarif4 xsi:type="xsd:string">6.55000000000000000000</tarif4><tarif5 xsi:type="xsd:string">6.55000000000000000000</tarif5><tarif6 xsi:type="xsd:string">5.50000000000000000000</tarif6><tarif7 xsi:type="xsd:string">6.55000000000000000000</tarif7><stock xsi:type="xsd:int">4</stock><stockReel xsi:type="xsd:int">4</stockReel></item><item xsi:type="enc:Struct"><id xsi:type="xsd:string">ZMSG100C</id><tarif1 xsi:type="xsd:string">6.55000000000000000000</tarif1><tarif2 xsi:type="xsd:string">6.55000000000000000000</tarif2><tarif3 xsi:type="xsd:string">6.55000000000000000000</tarif3><tarif4 xsi:type="xsd:string">6.55000000000000000000</tarif4><tarif5 xsi:type="xsd:string">6.55000000000000000000</tarif5><tarif6 xsi:type="xsd:string">5.50000000000000000000</tarif6><tarif7 xsi:type="xsd:string">6.55000000000000000000</tarif7><stock xsi:type="xsd:int">28</stock><stockReel xsi:type="xsd:int">28</stockReel></item><item xsi:type="enc:Struct"><id xsi:type="xsd:string">ZMS600B</id><tarif1 xsi:type="xsd:string">26.59000000000000000000</tarif1><tarif2 xsi:type="xsd:string">26.45000000000000000000</tarif2><tarif3 xsi:type="xsd:string">26.30000000000000000000</tarif3><tarif4 xsi:type="xsd:string">26.25000000000000000000</tarif4><tarif5 xsi:type="xsd:string">25.97000000000000000000</tarif5><tarif6 xsi:type="xsd:string">26.83000000000000000000</tarif6><tarif7 xsi:type="xsd:string">25.30000000000000000000</tarif7><stock xsi:type="xsd:int">14</stock><stockReel xsi:type="xsd:int">14</stockReel></item><item xsi:type="enc:Struct"><id xsi:type="xsd:string">ZMRHS1</id><tarif1 xsi:type="xsd:string">5.53000000000000000000</tarif1><tarif2 xsi:type="xsd:string">5.50000000000000000000</tarif2><tarif3 xsi:type="xsd:string">5.47000000000000000000</tarif3><tarif4 xsi:type="xsd:string">5.40000000000000000000</tarif4><tarif5 xsi:type="xsd:string">5.35000000000000000000</tarif5><tarif6 xsi:type="xsd:string">5.41000000000000000000</tarif6><tarif7 xsi:type="xsd:string">5.00000000000000000000</tarif7><stock xsi:type="xsd:int">0</stock><stockReel xsi:type="xsd:int">1</stockReel></item><item xsi:type="enc:Struct"><id xsi:type="xsd:string">ZMPC302U3</id><tarif1 xsi:type="xsd:string">14.50000000000000000000</tarif1><tarif2 xsi:type="xsd:string">14.50000000000000000000</tarif2><tarif3 xsi:type="xsd:string">14.50000000000000000000</tarif3><tarif4 xsi:type="xsd:string">14.50000000000000000000</tarif4><tarif5 xsi:type="xsd:string">14.50000000000000000000</tarif5><tarif6 xsi:type="xsd:string">10.00000000000000000000</tarif6><tarif7 xsi:type="xsd:string">14.50000000000000000000</tarif7><stock xsi:type="xsd:int">40</stock><stockReel xsi:type="xsd:int">40</stockReel></item><item xsi:type="enc:Struct"><id xsi:type="xsd:string">ZMPB84IW</id><tarif1 xsi:type="xsd:string">30.10000000000000000000</tarif1><tarif2 xsi:type="xsd:string">29.59000000000000000000</tarif2><tarif3 xsi:type="xsd:string">29.10000000000000000000</tarif3><tarif4 xsi:type="xsd:string">28.48000000000000000000</tarif4><tarif5 xsi:type="xsd:string">28.18000000000000000000</tarif5><tarif6 xsi:type="xsd:string">28.95000000000000000000</tarif6><tarif7 xsi:type="xsd:string">27.45000000000000000000</tarif7><stock xsi:type="xsd:int">15</stock><stockReel xsi:type="xsd:int">16</stockReel></item><item xsi:type="enc:Struct"><id xsi:type="xsd:string">ZMPB112IW</id><tarif1 xsi:type="xsd:string">36.50000000000000000000</tarif1><tarif2 xsi:type="xsd:string">35.89000000000000000000</tarif2><tarif3 xsi:type="xsd:string">35.30000000000000000000</tarif3><tarif4 xsi:type="xsd:string">34.54000000000000000000</tarif4><tarif5 xsi:type="xsd:string">34.17000000000000000000</tarif5><tarif6 xsi:type="xsd:string">35.10000000000000000000</tarif6><tarif7 xsi:type="xsd:string">33.28000000000000000000</tarif7><stock xsi:type="xsd:int">13</stock><stockReel xsi:type="xsd:int">14</stockReel></item><item xsi:type="enc:Struct"><id xsi:type="xsd:string">ZMMH200U3</id><tarif1 xsi:type="xsd:string">44.77000000000000000000</tarif1><tarif2 xsi:type="xsd:string">44.27000000000000000000</tarif2><tarif3 xsi:type="xsd:string">43.78000000000000000000</tarif3><tarif4 xsi:type="xsd:string">42.37000000000000000000</tarif4><tarif5 xsi:type="xsd:string">41.91000000000000000000</tarif5><tarif6 xsi:type="xsd:string">41.00000000000000000000</tarif6><tarif7 xsi:type="xsd:string">40.83000000000000000000</tarif7><stock xsi:type="xsd:int">0</stock><stockReel xsi:type="xsd:int">0</stockReel></item><item xsi:type="enc:Struct"><id xsi:type="xsd:string">ZMK200M</id><tarif1 xsi:type="xsd:string">2.99000000000000000000</tarif1><tarif2 xsi:type="xsd:string">2.99000000000000000000</tarif2><tarif3 xsi:type="xsd:string">2.99000000000000000000</tarif3><tarif4 xsi:type="xsd:string">3.85000000000000000000</tarif4><tarif5 xsi:type="xsd:string">3.80000000000000000000</tarif5><tarif6 xsi:type="xsd:string">3.95000000000000000000</tarif6><tarif7 xsi:type="xsd:string">3.80000000000000000000</tarif7><stock xsi:type="xsd:int">118</stock><stockReel xsi:type="xsd:int">119</stockReel></item><item xsi:type="enc:Struct"><id xsi:type="xsd:string">ZMHE135</id><tarif1 xsi:type="xsd:string">19.50000000000000000000</tarif1><tarif2 xsi:type="xsd:string">19.50000000000000000000</tarif2><tarif3 xsi:type="xsd:string">19.50000000000000000000</tarif3><tarif4 xsi:type="xsd:string">19.75000000000000000000</tarif4><tarif5 xsi:type="xsd:string">19.70000000000000000000</tarif5><tarif6 xsi:type="xsd:string">21.51000000000000000000</tarif6><tarif7 xsi:type="xsd:string">19.70000000000000000000</tarif7><stock xsi:type="xsd:int">8</stock><stockReel xsi:type="xsd:int">8</stockReel></item><item xsi:type="enc:Struct"><id xsi:type="xsd:string">ZMGWB8800GTS</id><tarif1 xsi:type="xsd:string">15.00000000000000000000</tarif1><tarif2 xsi:type="xsd:string">15.00000000000000000000</tarif2><tarif3 xsi:type="xsd:string">15.00000000000000000000</tarif3><tarif4 xsi:type="xsd:string">15.00000000000000000000</tarif4><tarif5 xsi:type="xsd:string">15.00000000000000000000</tarif5><tarif6 xsi:type="xsd:string">12.00000000000000000000</tarif6><tarif7 xsi:type="xsd:string">15.00000000000000000000</tarif7><stock xsi:type="xsd:int">17</stock><stockReel xsi:type="xsd:int">17</stockReel></item></tabProduit></ns1:recupererPrixStockResponse></env:Body></env:Envelope>
    Sinon l'erreur :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    object(SoapFault)#3 (10) {
      ["message":protected]=>
      string(33) "looks like we got no XML document"
      ["string":"Exception":private]=>
      string(0) ""
      ["code":protected]=>
      int(0)
      ["file":protected]=>
      string(32) "xxxx.php"
      ["line":protected]=>
      int(22)
      ["trace":"Exception":private]=>
      array(2) {
        [0]=>
        array(6) {
          ["file"]=>
          string(32) "/xxxx.php"
          ["line"]=>
          int(22)
          ["function"]=>
          string(6) "__call"
          ["class"]=>
          string(10) "SoapClient"
          ["type"]=>
          string(2) "->"
          ["args"]=>
          array(2) {
            [0]=>
            string(18) "recupererPrixStock"
            [1]=>
            array(1) {
              [0]=>
              object(stdClass)#1 (2) {
                ["login"]=>
                string(4) "xxxx"
                ["password"]=>
                string(4) "xxxx"
              }
            }
          }
        }
        [1]=>
        array(6) {
          ["file"]=>
          string(32) "/xxx.php"
          ["line"]=>
          int(22)
          ["function"]=>
          string(18) "recupererPrixStock"
          ["class"]=>
          string(10) "SoapClient"
          ["type"]=>
          string(2) "->"
          ["args"]=>
          array(1) {
            [0]=>
            object(stdClass)#1 (2) {
              ["login"]=>
              string(4) "XXXX"
              ["password"]=>
              string(4) "XXXX"
            }
          }
        }
      }
      ["previous":"Exception":private]=>
      NULL
      ["faultstring"]=>
      string(33) "looks like we got no XML document"
      ["faultcode"]=>
      string(6) "Sender"
      ["faultcodens"]=>
      string(39) "http://www.w3.org/2003/05/soap-envelope"
    }

  2. #2
    Expert éminent sénior
    Avatar de mathieu
    Profil pro
    Inscrit en
    Juin 2003
    Messages
    10 213
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 10 213
    Points : 15 499
    Points
    15 499
    Par défaut
    quand tu es à la limite des 12 éléments, les données envoyées font quelle taille ?
    avec les connexions internet actuelles, on peut facilement envoyer plusieurs centaines de Mo donc en dessous de cette taille, il ne devrait pas y avoir de problème de mémoire mais plutôt une limité posée par la configuration du serveur ou du service.

  3. #3
    Membre habitué
    Homme Profil pro
    Développeur Web
    Inscrit en
    Juillet 2011
    Messages
    135
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : Conseil

    Informations forums :
    Inscription : Juillet 2011
    Messages : 135
    Points : 153
    Points
    153
    Par défaut
    Je ne sais pas.... Mais ça fait pas grand chose. J'ai déjà envoyé bcp plus que ca.
    Je dois modifier quelle valeur de php?

    Sinon j'ai trouvé un élément :
    En utilisant getLastResponse je me suis rendu compte qu'il manque deux caractères à la réponse voici ce que je récupère :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    ...xsd:string">15.00000000000000000000</tarif7><stock xsi:type="xsd:int">14</stock><stockReel xsi:type="xsd:int">14</stockReel></item><item xsi:type="SOAP-ENC:Struct"><id xsi:type="xsd:string">ZMF1PLUSSF</id><tarif1 xsi:type="xsd:string">2.67000000000000000000</tarif1><tarif2 xsi:type="xsd:string">2.64000000000000000000</tarif2><tarif3 xsi:type="xsd:string">2.58000000000000000000</tarif3><tarif4 xsi:type="xsd:string">2.44000000000000000000</tarif4><tarif5 xsi:type="xsd:string">2.41000000000000000000</tarif5><tarif6 xsi:type="xsd:string">2.58000000000000000000</tarif6><tarif7 xsi:type="xsd:string">2.39000000000000000000</tarif7><stock xsi:type="xsd:int">0</stock><stockReel xsi:type="xsd:int">0</stockReel></item></tabProduit></ns1:recupererPrixStockResponse></SOAP-ENV:Body></SOAP-ENV:Envelop"
    Il manque "e>" . Comment faire pour y remédier ?

    En fait que j'envoie 100 ou 1000 objets il manque ces deux caractères de fin...

  4. #4
    Membre habitué
    Homme Profil pro
    Développeur Web
    Inscrit en
    Juillet 2011
    Messages
    135
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : Conseil

    Informations forums :
    Inscription : Juillet 2011
    Messages : 135
    Points : 153
    Points
    153
    Par défaut
    En fait il y avait un problème d'encodage de mon fichier php.
    Je l'ai ouvert une fois avec le blocnote et ca a modifié l'encodage du coup j'ai dû réencoder le fichier.

    Voila

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. [Web Service] Problème SOAP communication à travers des tableaux
    Par yonialhadeff dans le forum Bibliothèques et frameworks
    Réponses: 0
    Dernier message: 08/12/2011, 17h58
  2. Réponses: 0
    Dernier message: 26/07/2011, 14h04
  3. [Web Service] Problème d'affichage des valeurs renvoyées par un webservice
    Par informatique34 dans le forum Bibliothèques et frameworks
    Réponses: 6
    Dernier message: 11/07/2011, 14h34
  4. Service WCF, Silverlight et taille des objets
    Par Steven62 dans le forum Windows Communication Foundation
    Réponses: 1
    Dernier message: 18/08/2009, 11h57
  5. Web Service : problème de serialisation d'objets
    Par cfeltz dans le forum Silverlight
    Réponses: 2
    Dernier message: 25/05/2009, 16h10

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo