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

SOA Discussion :

web service soap par ou commencer


Sujet :

SOA

  1. #1
    Membre régulier
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Janvier 2010
    Messages
    391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Mauritanie

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Janvier 2010
    Messages : 391
    Points : 113
    Points
    113
    Par défaut web service soap par ou commencer
    bonjour, je veux créer un web service pour accéder au site www.isurveysoft.com récupérer mes données et l'importer vers ma base de donner pour cela IsurveySoft utilise soap

    et me founit ces information



    Consuming the iSURVEY Export Web Service v3
    The web service
    The iSURVEY Export Web Service uses SOAP for communication.
    The Export Web Service URL: https://www.isurveysoft.com/services...rtservice.asmx
    The Export Web Service WSDL: https://www.isurveysoft.com/services...vice.asmx?wsdl
    There are two Web Service operations exposed by this webservice – ExportSurvey and
    ExportSurveyResults. These two operations are intended to be used together - the ExportSurvey response
    contains reference information needed to interpret the ExportSurveyResults response data.
    The operations provided use up to four message parameters – Company Identifier, Survey Password,
    Results Surveyed From Date, Results Surveyed To Date. For more information about obtaining the
    Company Identifier and Survey Password, see iSURVEY Company Identifier and Survey Password.
    ExportSurvey provides the question and answer sets for the survey.
    ExportSurveyResults provides the survey result set in XML which would otherwise be provided as a CSV
    file.

    Web Service Operation - Export Survey
    This ExportSurvey Web Service operation accepts two parameters – the Company Identifier(cp), and the
    Survey PIN (sp) for authentication.
    Information on where to find the Company Identifier and the Survey PIN on the isurveysoft.com web site
    is described at the end of this document.
    REQUEST
    The sample SOAP request is provided below for SOAP 1.1 and 1.2.
    SOAP 1.1
    POST /servicesv3/exportservice.asmx HTTP/1.1
    Host: www.isurveysoft.com
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    SOAPAction: "https://www.isurveysoft.com/servicesv3/ExportSurvey"
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
    xmlnssd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <ExportSurvey xmlns="https://www.isurveysoft.com/servicesv3/">
    <cp>string</cp>
    <sp>string</sp>
    </ExportSurvey>
    </soap:Body>
    </soap:Envelope>


    RESPONSE
    The Survey is exported as a Serialised Survey object. The sample SOAP response is provided below for
    SOAP 1.1 and 1.2.


    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Content-Length: length
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlnssi="http://www.w3.org/2001/XMLSchema-instance"
    xmlnssd="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <ExportSurveyResponse xmlns="https://www.isurveysoft.com/servicesv3/">
    <ExportSurveyResult>
    <SurveyId>long</SurveyId>
    <SurveyName>string</SurveyName>
    <ScreenIdFirst>long</ScreenIdFirst>
    <SurveyThemeId>long</SurveyThemeId>
    <SurveyTestMode>boolean</SurveyTestMode>
    <SurveyVersion>long</SurveyVersion>
    <SurveyIsPurchased>boolean</SurveyIsPurchased>
    <IsDemoSurvey>boolean</IsDemoSurvey>
    <Screens>
    <Screen type="string" nextScreenIsLinked="boolean">
    <ScreenId>long</ScreenId>
    <ScreenIdNext>long</ScreenIdNext>
    <ScreenText>string</ScreenText>
    <ScreenInstruction>string</ScreenInstruction>
    <ThemeClassId>long</ThemeClassId>
    <ScreenOptions xsi:nil="true" />
    <Answers xsi:nil="true" />
    <Questions xsi:nil="true" />
    </Screen>
    <Screen type="string" nextScreenIsLinked="boolean">
    <ScreenId>long</ScreenId>
    <ScreenIdNext>long</ScreenIdNext>
    <ScreenText>string</ScreenText>
    <ScreenInstruction>string</ScreenInstruction>
    <ThemeClassId>long</ThemeClassId>
    <ScreenOptions xsi:nil="true" />
    <Answers xsi:nil="true" />
    <Questions xsi:nil="true" />
    </Screen>
    </Screens>
    <SurveyOptions>
    <SurveyOption>
    <SurveyOptionRefCode>string</SurveyOptionRefCode>
    <SurveyOptionValueText>string</SurveyOptionValueText>
    </SurveyOption>
    <SurveyOption>
    <SurveyOptionRefCode>string</SurveyOptionRefCode>
    <SurveyOptionValueText>string</SurveyOptionValueText>
    </SurveyOption>
    </SurveyOptions>
    </ExportSurveyResult>
    </ExportSurveyResponse>
    </soap:Body></soap:Envelope>
    j'ai fait un peu de recherche mais tout ce que j'ai compris est de de creer mon client

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    $client = new SoapClient("https://www.isurveysoft.com/servicesv3/exportservice.asmx?wsdl");
    mais je ne sais pas comment introduire mes deux fichier request et reponse pour pouvoir authentifier et acceder au données

    j'ai besoin de votre aide pour m’éclaircir ce web service merci d'avance

  2. #2
    Provisoirement toléré
    Homme Profil pro
    Inscrit en
    Août 2002
    Messages
    143
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations forums :
    Inscription : Août 2002
    Messages : 143
    Points : 261
    Points
    261
    Par défaut
    Un web service SOAP expose un WSDL (https://www.isurveysoft.com/services...vice.asmx?wsdl). Il s'agit de son contrat : input, output, exception.

    La plupart des langages proposent des outils pour générer des classes qui vont te permettre d'appeler simplement ton service. En Java tu as par exemple wsdl2java.

  3. #3
    Membre régulier
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Janvier 2010
    Messages
    391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Mauritanie

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Janvier 2010
    Messages : 391
    Points : 113
    Points
    113
    Par défaut
    ok merci de votre aide moi je travail en PHP5 est ce que y a moin de le faire en PHP5 tout en sachant que je dispose comme information ces liens

    (https://www.isurveysoft.com/services...vice.asmx?wsdl) pour le fichier wsdl

    et les REQUEST ET REPONSE (https://www.isurveysoft.com/services...rtservice.asmx)

    merci d'avance de votre aide

  4. #4
    Membre régulier
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Janvier 2010
    Messages
    391
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Mauritanie

    Informations professionnelles :
    Activité : Développeur informatique

    Informations forums :
    Inscription : Janvier 2010
    Messages : 391
    Points : 113
    Points
    113
    Par défaut
    bonjour j'avance petit a petit sur mon web service
    j'ai chercher au coté de SoapClient natif de php5
    je fait fait cela:

    Code php : 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
     
    <?php
     
    		 //$fichiersoap="C:\wamp\www\rimcom\dolibarr.wsdl";
    		$url="https://www.isurveysoft.com/servicesv3/exportservice.asmx";
    		$wdsl="https://www.isurveysoft.com/servicesv3/exportservice.asmx?wsdl";
    		 $request="request.xml";
    		 $reponse="reponse.xml";
    	//$version=1.1;
    		// $action=
    	//$client = new SoapClient($request,$wdsl,$reponse,$version,$one_way =0);
     
    	$client = new SoapClient("https://www.isurveysoft.com/servicesv3/exportservice.asmx?wsdl",array('trace' => 1, "exceptions" =>0));
     
    					  $res=$client->__doRequest($request,$url,$reponse,1.1,0);
    					  echo $res;
                   // SoapClient::__doRequest($request,$url,$reponse,$version,$one_way =0);
       //   var_dump($client->__getTypes());
    ?>
    mon fichier request.xml :

    Code xml : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
     
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <ExportSurvey xmlns="https://www.isurveysoft.com/servicesv3/">
    <cp>idenfifant</cp>
    <sp>password</sp>
    </ExportSurvey>
    </soap:Body>
    </soap:Envelope>

    mon fichier reponse qu'il mon fournit reponse.xml
    Code xml : 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
     
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <ExportSurveyResponse xmlns="https://www.isurveysoft.com/servicesv3/">
    <ExportSurveyResult>
    <SurveyId>long</SurveyId>
    <SurveyName>string</SurveyName>
    <ScreenIdFirst>long</ScreenIdFirst>
    <SurveyThemeId>long</SurveyThemeId>
    <SurveyTestMode>boolean</SurveyTestMode>
    <SurveyVersion>long</SurveyVersion>
    <SurveyIsPurchased>boolean</SurveyIsPurchased>
    <IsDemoSurvey>boolean</IsDemoSurvey>
    <Screens>
    <Screen type="string" nextScreenIsLinked="boolean">
    <ScreenId>long</ScreenId>
    <ScreenIdNext>long</ScreenIdNext>
    <ScreenText>string</ScreenText>
    <ScreenInstruction>string</ScreenInstruction>
    <ThemeClassId>long</ThemeClassId>
    <ScreenOptions xsi:nil="true" />
    <Answers xsi:nil="true" />
    <Questions xsi:nil="true" />
    </Screen>
    <Screen type="string" nextScreenIsLinked="boolean">
    <ScreenId>long</ScreenId>
    <ScreenIdNext>long</ScreenIdNext>
    <ScreenText>string</ScreenText>
    <ScreenInstruction>string</ScreenInstruction>
    <ThemeClassId>long</ThemeClassId>
    <ScreenOptions xsi:nil="true" />
    <Answers xsi:nil="true" />
    <Questions xsi:nil="true" />
    </Screen>
    </Screens>
    <SurveyOptions>
    <SurveyOption>
    <SurveyOptionRefCode>string</SurveyOptionRefCode>
    <SurveyOptionValueText>string</SurveyOptionValueText>
    </SurveyOption>
    <SurveyOption>
    <SurveyOptionRefCode>string</SurveyOptionRefCode>
    <SurveyOptionValueText>string</SurveyOptionValueText>
    </SurveyOption>
    </SurveyOptions>
    </ExportSurveyResult>
    </ExportSurveyResponse>
    </soap:Body></soap:Envelope>

    j'ai cette erreur

    soap:ClientServer did not recognize the value of HTTP Header SOAPAction: reponse.xml.

    mon probleme devait venir de soapaction si quelqu'un connat de ce que represente les paramatre soapaction
    merci d'avance

Discussions similaires

  1. retourner tableau de string avec web service SOAP
    Par xx_FiFty_xx dans le forum XML/XSL et SOAP
    Réponses: 2
    Dernier message: 23/06/2008, 11h13
  2. Appels de Web services (SOAP) ?
    Par ovdbc dans le forum GWT et Vaadin
    Réponses: 1
    Dernier message: 17/10/2007, 12h28
  3. Déploiement web services SOAP sur Websphere 5.1
    Par g_rare dans le forum Websphere
    Réponses: 1
    Dernier message: 19/03/2007, 11h30
  4. web services, soap et compression.
    Par renaudjuif dans le forum Langage
    Réponses: 6
    Dernier message: 31/07/2006, 16h44
  5. [Web Service] [SOAP] Envoie requete
    Par _beber85 dans le forum JDBC
    Réponses: 1
    Dernier message: 08/06/2006, 10h31

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