Précédent   Forum du club des développeurs et IT Pro > PHP > Bibliothèques et frameworks > Services Web
Services Web Forum d'entraide pour les services Web en PHP, qui permettent de créer et de consommer facilement des webservices (génération de WSDL etc.). Exemples : SOAP, NuSOAP, REST, SCA-SDO... Avant de poster -> Cours webservices
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse
 
Outils de la discussion
Publicité
'
Vieux 16/11/2012, 08h24   #1
archcooler
Invité de passage
 
Homme
Développeur Web
Inscription : novembre 2012
Messages : 6
Détails du profil
Informations personnelles :
Sexe : Homme
Localisation : France

Informations professionnelles :
Activité : Développeur Web
Secteur : High Tech - Multimédia et Internet

Informations forums :
Inscription : novembre 2012
Messages : 6
Points : 0
Points : 0
Par défaut probleme server soap php

Bonjour, j'ai un souci avec mon server,

j'ai donc créer le wsdl a partir d'une class php
le client me trouve bien les méthodes
je peux donc les exécuter une à une pour les tester.
malheureusement des que j'en met deux à la suite j'ai une erreur qui apparait
et qui m'oblige a re instancient mon objet client pour que sa marche.


voici l'erreur :
Citation:
SoapClient::__doRequest() [<a href='soapclient.--dorequest'>soapclient.--dorequest</a>]: 6 bytes of buffered data lost during stream conversion!

voici le wsdl :
<definitions name="themeWsdl" targetNamespace="urn:themeWsdl" xmlns:typens="urn:themeWsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
  <message name="GetIdTheme">
    <part name="i" type="xsd:string"/>
  </message>
  <message name="GetIdThemeResponse">
    <part name="GetIdThemeReturn" type="xsd:string"/>
  </message>
  <message name="GetNbTheme"/>
  <message name="GetNbThemeResponse">
    <part name="GetNbThemeReturn" type="xsd:string"/>
  </message>
  <message name="GetNomTheme">
    <part name="i1" type="xsd:string"/>
  </message>
  <message name="GetNomThemeResponse">
    <part name="GetNomThemeReturn" type="xsd:string"/>
  </message>
  <portType name="example1PortType">
    <operation name="GetIdTheme">
      <documentation>Recupere le id du theme</documentation>
      <input message="typens:GetIdTheme"/>
      <output message="typens:GetIdThemeResponse"/>
    </operation>
    <operation name="GetNbTheme">
      <documentation>Recupere le nb de theme</documentation>
      <input message="typens:GetNbTheme"/>
      <output message="typens:GetNbThemeResponse"/>
    </operation>
    <operation name="GetNomTheme">
      <documentation>Recupere le nom du theme</documentation>
      <input message="typens:GetNomTheme"/>
      <output message="typens:GetNomThemeResponse"/>
    </operation>
  </portType>
  <binding name="example1Binding" type="typens:example1PortType">
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="GetIdTheme">
      <soap:operation soapAction="urn:example1Action"/>
      <input>
        <soap:body namespace="urn:themeWsdl" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
        <soap:body namespace="urn:themeWsdl" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
    </operation>
    <operation name="GetNbTheme">
      <soap:operation soapAction="urn:example1Action"/>
      <input>
        <soap:body namespace="urn:themeWsdl" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
        <soap:body namespace="urn:themeWsdl" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
    </operation>
    <operation name="GetNomTheme">
      <soap:operation soapAction="urn:example1Action"/>
      <input>
        <soap:body namespace="urn:themeWsdl" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </input>
      <output>
        <soap:body namespace="urn:themeWsdl" use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
      </output>
    </operation>
  </binding>
  <service name="themeWsdlService">
    <port name="example1Port" binding="typens:example1Binding">
      <soap:address location="http://protung.ro/examplewsdl"/>
    </port>
  </service>
</definitions>
voici mon client:
Code :
1
2
3
4
5
6
  $objClient = new SoapClient('server.wsdl', array('wsdl_cache' => 0,'trace' => 1));
    $objPeople = $objClient->__call('GetNbTheme',array());
	for($i=0;$i<$objPeople;$i++){     
      $nom=$objClient-> __call('GetNomTheme',array($i));
      print( "theme :".$nom.'<br>');
     }
archcooler est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse
Outils de la discussion

Navigation rapide


Fuseau horaire GMT +2. Il est actuellement 19h04.


 
 
 
 
Partenaires

Hébergement Web