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

Langage C++ Discussion :

Appel WebService Soap en C++


Sujet :

Langage C++

  1. #1
    Futur Membre du Club
    Inscrit en
    Avril 2012
    Messages
    14
    Détails du profil
    Informations forums :
    Inscription : Avril 2012
    Messages : 14
    Points : 6
    Points
    6
    Par défaut Appel WebService Soap en C++
    Bonjour,

    J'essaie d'utiliser un WS Soap que j'ai écrit en PHP (avec nuSoap) dans un programme en C++ (ce sera un service Windows ensuite).
    Ce programme en C++ utilise gSoap.
    J'utilise donc le wsdl2h.exe pour générer le fichier .h qui va me permettre d'utiliser mon webservice.

    Le WS fonctionne car je peux l'utiliser via SOAPUI et les retours et mise à jour demandées sont ok.
    Quand j'appelle le wsdl (via http://url/toto.php?wsdl) avec wsdl2h.exe, il me dit :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    Warning: no binding 'Testing WSDL Binding' portType '"urn:Testing WSDL ":Testing
     wsdl:WSDL wsdl:PortType' in WSDL definitions '' namespace urn:Testing WSDL
    Warning: no matching portType operation 'gethelloworld' in WSDL definitions '' n
    amespace urn:Testing WSDL
    Warning: no matching portType operation 'putmessage' in WSDL definitions '' name
    space urn:Testing WSDL
    Warning: no port 'Testing WSDL Port' binding '"urn:Testing WSDL ":Testing wsdl:W
    SDL wsdl:Binding' in WSDL definitions '' namespace urn:Testing WSDL
    Error: no wsdl:definitions/portType/operation
    Error: no wsdl:definitions/portType/operation
     
    To complete the process, compile with:
    soapcpp2 toto.h
    J'ai remarqué que quand j'appelle son WSDL, il commence comme cela :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <definitions targetNamespace="urn:Testing WSDL"><types><xsd:schema targetNamespace="urn:Testing WSDL"><xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/><xsd:import namespace="http://schemas.xmlsoap.org/wsdl/"/></xsd:schema></types>
    Alors que si j'appelle le WSDL d'Ebay, il commence comme cela :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    <wsdl:definitions targetNamespace="urn:ebay:apis:eBLBaseComponents"><wsdl:types><!-- Version 873 --><!-- (c) 2004-2014 eBay, Inc. All rights reserved --><xs:schema targetNamespace="urn:ebay:apis:eBLBaseComponents" elementFormDefault="qualified" attributeFormDefault="unqualified"><!-- Custom Security header element--><xs:element name="RequesterCredentials" type="ns:CustomSecurityHeaderType"><xs:annotation><xs:documentation>
    Vous pouvez remarque qu'il commence par "<wsdl: ..."

    Par conséquent je ne sais pas si mon problème vient de mon webservice (auquel cas je ne suis pas dans la bonne rubrique), ou si c'est un problème à l'utilisation de wsdl2h.exe.

    Merci pour vos idées

  2. #2
    r0d
    r0d est déconnecté
    Expert éminent

    Homme Profil pro
    tech lead c++ linux
    Inscrit en
    Août 2004
    Messages
    4 262
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ain (Rhône Alpes)

    Informations professionnelles :
    Activité : tech lead c++ linux

    Informations forums :
    Inscription : Août 2004
    Messages : 4 262
    Points : 6 680
    Points
    6 680
    Billets dans le blog
    2
    Par défaut
    Bonjour,

    C'est difficile à dire. gSoap est capricieux, il est souvent difficile de savoir ce qu'il n'aime pas.
    Ce que je ferais à ta place, c'est récupérer le fichier wsdl et le copier en local, pour faire des tests dessus; pour comprendre ce qui ne va pas.
    Par exemple, je ne suis pas sûr que gSoap aime beaucoup les espaces dans le namespace. Tu peux donc essayer de remplacer "Testing WSDL" par "TestingWSDL" (par exemple) dans le fichier wsdl.
    « L'effort par lequel toute chose tend à persévérer dans son être n'est rien de plus que l'essence actuelle de cette chose. »
    Spinoza — Éthique III, Proposition VII

  3. #3
    Futur Membre du Club
    Inscrit en
    Avril 2012
    Messages
    14
    Détails du profil
    Informations forums :
    Inscription : Avril 2012
    Messages : 14
    Points : 6
    Points
    6
    Par défaut
    Bonjour R0d,

    C'est exactement ce que j'ai commencé à faire après avoir posté, un petit éclair dans ma tête ... Effectivement ça permet d'avancer.
    Merci pour ton message.

  4. #4
    Membre émérite
    Avatar de white_tentacle
    Profil pro
    Inscrit en
    Novembre 2008
    Messages
    1 505
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Novembre 2008
    Messages : 1 505
    Points : 2 799
    Points
    2 799
    Par défaut
    Citation Envoyé par r0d Voir le message
    Bonjour,

    C'est difficile à dire. gSoap est capricieux, il est souvent difficile de savoir ce qu'il n'aime pas.
    Ce que je ferais à ta place, c'est récupérer le fichier wsdl et le copier en local, pour faire des tests dessus; pour comprendre ce qui ne va pas.
    Par exemple, je ne suis pas sûr que gSoap aime beaucoup les espaces dans le namespace. Tu peux donc essayer de remplacer "Testing WSDL" par "TestingWSDL" (par exemple) dans le fichier wsdl.
    D’ailleurs, de manière générale, les outils travaillant sur les wsdl sont capricieux et n’acceptent pas tous la même chose. Il faut parfois un peu bricoler les schémas pour les faire accepter par les différents outils.

  5. #5
    Futur Membre du Club
    Inscrit en
    Avril 2012
    Messages
    14
    Détails du profil
    Informations forums :
    Inscription : Avril 2012
    Messages : 14
    Points : 6
    Points
    6
    Par défaut
    Je patauge un peu ... messages d'erreur sur messages d'erreur.

    Est-ce que l'un d'entre vous aurait l'amabilité de poster un wsdl simple mais bien normé pour que je puisse avancer ?

    J'ai repris le WSDL d'Ebay qui fonctionnait quand j'appelle directement l'url via wsdl2h.exe, mais quand je le mets dans un fichier ws.wsdl, wsdl2h.exe ne veut rien entendre, il fait plein d'erreur.

  6. #6
    r0d
    r0d est déconnecté
    Expert éminent

    Homme Profil pro
    tech lead c++ linux
    Inscrit en
    Août 2004
    Messages
    4 262
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Ain (Rhône Alpes)

    Informations professionnelles :
    Activité : tech lead c++ linux

    Informations forums :
    Inscription : Août 2004
    Messages : 4 262
    Points : 6 680
    Points
    6 680
    Billets dans le blog
    2
    Par défaut
    Citation Envoyé par TheFurby Voir le message
    Est-ce que l'un d'entre vous aurait l'amabilité de poster un wsdl simple mais bien normé pour que je puisse avancer ?
    Si ça peut t'aider, j'ai implémenté un WS avec gSoap cet hiver. Il propose 3 operations (apply, applyEx et scoreToProba). Il nous a servi pour générer le serveur (écrit en c++) et le client (écrit en C#). A noter que, pour que tout fonctionne, côté client et côté serveur, ça m'a prit presque une semaine rien que sur le wsdl, que voici:
    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
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    <?xml version="1.0" encoding="UTF-8"?>
     
    <wsdl:definitions
     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
     xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" 
     xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" 
     xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
     xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" 
     xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" 
     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
     xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     
    	<!----------------------------------- types --------------------------------------->
    	<wsdl:types>		
     
    			<xsd:complexType name="ResultStruct">
    				<xsd:sequence>
    					<xsd:element name="errorCode" type="xsd:int"/>
    					<xsd:element name="score" type="xsd:float"/>
    					<xsd:element name="proba" type="xsd:float"/>
    				</xsd:sequence>
    			</xsd:complexType>
     
    			<xsd:complexType name="Factor">
    				<xsd:sequence>
    					<xsd:element name="name" type="xsd:string"/>
    					<xsd:element name="factor" type="xsd:float"/>
    				</xsd:sequence>
    			</xsd:complexType>			
     
    			<xsd:complexType name="ArrayOfFactors">
    				<xsd:sequence>
    					<xsd:element maxOccurs="unbounded" name="factor" type="tns:Factor"/>
    				</xsd:sequence>
    			</xsd:complexType>
     
    			<xsd:complexType name="ResultStructEx">
    				<xsd:sequence>
    					<xsd:element name="resultStruct" type="tns:ResultStruct"/>
    					<xsd:element name="scaling" type="xsd:float"/>
    					<xsd:element name="factors" type="tns:ArrayOfFactors"/>
    				</xsd:sequence>
    			</xsd:complexType>		
     
    			<xsd:complexType name="ApplyStruct">
    				<xsd:sequence>
    					<xsd:element name="pmmlFilename" type="xsd:string" />
    					<xsd:element name="separator" type="xsd:string" />
    					<xsd:element name="dataFormat" type="xsd:string" />
    					<xsd:element name="dataLine" type="xsd:string" />
    				</xsd:sequence>	
    			</xsd:complexType>		
     
     
    	</wsdl:types>
     
     
    	<!----------------------------------- messages --------------------------------------->
    	<wsdl:message name="ApplyRequest">
    		<wsdl:part name="applyStruct" type="tns:ApplyStruct" />
    	</wsdl:message>
     
    	<wsdl:message name="ApplyResponse">
    		<wsdl:part name="result" type="tns:ResultStruct"/>
    	</wsdl:message>
     
    	<wsdl:message name="ApplyExRequest">
    		<wsdl:part name="applyStructEx" type="tns:ApplyStruct" />
    	</wsdl:message>
     
    	<wsdl:message name="ApplyExResponse">
    		<wsdl:part name="result" type="tns:ResultStructEx"/>
    	</wsdl:message>
     
    	<wsdl:message name="ScoreToProbaRequest">
    		<wsdl:part name="pmmlFilename" type="xsd:string" />
    		<wsdl:part name="score" type="tns:ResultStruct"/>
    	</wsdl:message>
     
    	<wsdl:message name="ScoreToProbaResponse">
    		<wsdl:part name="proba" type="tns:ResultStruct"/>
    	</wsdl:message>
     
     
    	<!----------------------------------- port --------------------------------------->
    	<wsdl:portType name="OASPortType">
     
    		<wsdl:operation name="apply">
    			<wsdl:documentation>Apply a model on a given line of data</documentation>
    			<wsdl:input message="tns:ApplyRequest"/>
    			<wsdl:output message="tns:ApplyResponse"/>
    		</wsdl:operation>
     
    		<wsdl:operation name="applyEx">
    			<wsdl:documentation>Extended version of the apply operation</documentation>
    			<wsdl:input message="tns:ApplyExRequest"/>
    			<wsdl:output message="tns:ApplyExResponse"/>
    		</wsdl:operation>
     
    		<wsdl:operation name="scoreToProba">
    			<wsdl:documentation>Calculate the probability that corresponds to a given score</documentation>
    			<wsdl:input message="tns:ScoreToProbaRequest"/>
    			<wsdl:output message="tns:ScoreToProbaResponse"/>
    		</wsdl:operation>
     
     
    	</wsdl:portType>
     
     
    	<!----------------------------------- bindings --------------------------------------->
    	<wsdl:binding name="OASBinding" type="tns:OASPortType">
     
    		<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
     
    		<wsdl:operation name="apply">
    			<soap:operation soapAction="http://cts.vadis.com/apply"/>
    			<wsdl:input name="tns:ApplyRequest">
    				<soap:body use="literal"/>
    			</wsdl:input>
    			<wsdl:output name="tns:ApplyResponse">
    				<soap:body use="literal" />
    			</wsdl:output>
    		</wsdl:operation>
     
    		<wsdl:operation name="applyEx">
    			<soap:operation soapAction="http://cts.vadis.com/applyex"/>
    			<wsdl:input name="tns:ApplyExRequest">
    				<soap:body use="literal"/>
    			</wsdl:input>
    			<wsdl:output name="tns:ApplyExResponse">
    				<soap:body use="literal" />
    			</wsdl:output>
    		</wsdl:operation>
     
    		<wsdl:operation name="scoreToProba">
    			<soap:operation soapAction="http://cts.vadis.com/scoretoproba"/>
    			<wsdl:input name="tns:ScoreToProbaRequest">
    				<soap:body use="literal"/>
    			</wsdl:input>
    			<wsdl:output name="tns:ScoreToProbaResponse">
    				<soap:body use="literal" />
    			</wsdl:output>
    		</wsdl:operation>
     
     
    	</wsdl:binding>
     
     
    	<!----------------------------------- service --------------------------------------->
    	<wsdl:service name="OnlineApplierService">
     
    		<wsdl:port name="OASPort" binding="tns:OASBinding">
    			<soap:address location="127.0.0.1"/>
    		</wsdl:port>
     
    	</wsdl:service>
     
     
    </wsdl:definitions>
    Et la commande pour générer les en-têtes:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    wsdl2h.exe -n oas -o online_applier_service.h online_applier.wsdl
    Tu peux peut-être également jeter un coup d'oeil au tuto que j'ai écrit: clic. Il est un peu vieux mais je pense qu'il est toujours d'actualité.

    Citation Envoyé par TheFurby Voir le message
    J'ai repris le WSDL d'Ebay qui fonctionnait quand j'appelle directement l'url via wsdl2h.exe, mais quand je le mets dans un fichier ws.wsdl, wsdl2h.exe ne veut rien entendre, il fait plein d'erreur.
    Ça c'est bizarre... Peux-tu copier le WSDL en question stp?
    « L'effort par lequel toute chose tend à persévérer dans son être n'est rien de plus que l'essence actuelle de cette chose. »
    Spinoza — Éthique III, Proposition VII

  7. #7
    Futur Membre du Club
    Inscrit en
    Avril 2012
    Messages
    14
    Détails du profil
    Informations forums :
    Inscription : Avril 2012
    Messages : 14
    Points : 6
    Points
    6
    Par défaut
    Merci pour ces infos, ça va me permettre de vérifier si c'est moi ou le wsdl qui ne va pas

    Voici le lien vers le Wsdl d'Ebay : http://developer.ebay.com/webservice...t/eBaySvc.wsdl

    Pour le mettre dans un fichier, je l'ai appelé, fait un copier coller dans un éditeur de texte et sauvegardé avec le nom ws2.wsdl

    Quand j’utilise wsdl2h.exe avec la commande pour le lire sur le net, ça fonctionne, quand je lis directement mon fichier, j'ai une erreur.

  8. #8
    Futur Membre du Club
    Inscrit en
    Avril 2012
    Messages
    14
    Détails du profil
    Informations forums :
    Inscription : Avril 2012
    Messages : 14
    Points : 6
    Points
    6
    Par défaut
    Je viens d'essayer avec ton wsdl, effectivement il passe mais j'ai quand même beaucoup de warning et quelques erreurs qui ne semblent pas bloquantes.
    Comme je pensais à un problème de répertoire avec les noms longs, j'ai tout mis presque à la racine.

    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
    E:\tmp>c:wsdl2h.exe -n oas -o e:\tmp\ws3.h e:\tmp\ws3.wsdl"
     
    **  The gSOAP WSDL/Schema processor for C and C++, wsdl2h release 1.2.16
    **  Copyright (C) 2000-2010 Robert van Engelen, Genivia Inc.
    **  All Rights Reserved. This product is provided "as is", without any warranty.
     
    **  The wsdl2h tool is released under one of the following two licenses:
    **  GPL or the commercial license by Genivia Inc. Use option -l for more info.
     
    Saving e:\tmp\ws3.h
     
    Cannot open file 'typemap.dat'
    Problem reading type map file 'typemap.dat'.
    Using internal type definitions for C++ instead.
     
     
    Reading file 'e:\tmp\ws3.wsdl'... Warning: element 'xsd:complexType' at level 2
    was not recognized and will be ignored
    Warning: element 'xsd:complexType' at level 2 was not recognized and will be ign
    ored
    Warning: element 'xsd:complexType' at level 2 was not recognized and will be ign
    ored
    Warning: element 'xsd:complexType' at level 2 was not recognized and will be ign
    ored
    Warning: element 'xsd:complexType' at level 2 was not recognized and will be ign
    ored
    done reading 'e:\tmp\ws3.wsdl'
    Warning: no part 'applyStruct' type '"":ApplyStruct' in WSDL definitions '' name
    space
    Warning: no part 'result' type '"":ResultStruct' in WSDL definitions '' namespac
    e
    Warning: no part 'applyStructEx' type '"":ApplyStruct' in WSDL definitions '' na
    mespace
    Warning: no part 'result' type '"":ResultStructEx' in WSDL definitions '' namesp
    ace
    Warning: no part 'score' type '"":ResultStruct' in WSDL definitions '' namespace
     
    Warning: no part 'proba' type '"":ResultStruct' in WSDL definitions '' namespace
     
    Warning: no matching portType operation 'apply' in WSDL definitions '' namespace
     
    Warning: no matching portType operation 'applyEx' in WSDL definitions '' namespa
    ce
    Warning: no matching portType operation 'scoreToProba' in WSDL definitions '' na
    mespace
    Error: no wsdl:definitions/portType/operation
    Error: no wsdl:definitions/portType/operation
    Error: no wsdl:definitions/portType/operation
     
    To complete the process, compile with:
    soapcpp2 e:\tmp\ws3.h
    Quand je regarde l'entête généré ... je me demande en quoi ça va aider, il n'y a aucune définition :

    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
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    /* e:\tmp\ws3.h
       Generated by wsdl2h 1.2.16 from e:\tmp\ws3.wsdl and typemap.dat
       2014-07-15 12:14:32 GMT
     
       DO NOT INCLUDE THIS FILE DIRECTLY INTO YOUR PROJECT BUILDS
       USE THE soapcpp2-GENERATED SOURCE CODE FILES FOR YOUR PROJECT BUILDS
     
       gSOAP XML Web services tools.
       Copyright (C) 2001-2010 Robert van Engelen, Genivia Inc. All Rights Reserved.
       Part of this software is released under one of the following licenses:
       GPL or Genivia's license for commercial use.
    */
     
    /** @page page_notes Build Notes
     
    NOTE:
     
     - Run soapcpp2 on e:\tmp\ws3.h to generate the SOAP/XML processing logic.
       Use soapcpp2 option -I to specify paths for #import
       To build with STL, 'stlvector.h' is imported from 'import' dir in package.
       Use soapcpp2 option -i to generate improved proxy and server classes.
     - Use wsdl2h options -c and -s to generate pure C code or C++ code without STL.
     - Use 'typemap.dat' to control namespace bindings and type mappings.
       It is strongly recommended to customize the names of the namespace prefixes
       generated by wsdl2h. To do so, modify the prefix bindings in the Namespaces
       section below and add the modified lines to 'typemap.dat' to rerun wsdl2h.
     - Use Doxygen (www.doxygen.org) on this file to generate documentation.
     - Use wsdl2h options -nname and -Nname to globally rename the prefix 'ns'.
     - Use wsdl2h option -d to enable DOM support for xsd:anyType.
     - Use wsdl2h option -g to auto-generate readers and writers for root elements.
     - Struct/class members serialized as XML attributes are annotated with a '@'.
     - Struct/class members that have a special role are annotated with a '$'.
     
    WARNING:
     
       DO NOT INCLUDE THIS FILE DIRECTLY INTO YOUR PROJECT BUILDS.
       USE THE SOURCE CODE FILES GENERATED BY soapcpp2 FOR YOUR PROJECT BUILDS:
       THE soapStub.h FILE CONTAINS THIS CONTENT WITHOUT ANNOTATIONS.
     
    LICENSE:
     
    @verbatim
    --------------------------------------------------------------------------------
    gSOAP XML Web services tools
    Copyright (C) 2000-2010, Robert van Engelen, Genivia Inc. All Rights Reserved.
     
    This software is released under one of the following two licenses:
    1) GPL or 2) Genivia's license for commercial use.
    --------------------------------------------------------------------------------
    1) GPL license.
     
    This program is free software; you can redistribute it and/or modify it under
    the terms of the GNU General Public License as published by the Free Software
    Foundation; either version 2 of the License, or (at your option) any later
    version.
     
    This program is distributed in the hope that it will be useful, but WITHOUT ANY
    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
    PARTICULAR PURPOSE. See the GNU General Public License for more details.
     
    You should have received a copy of the GNU General Public License along with
    this program; if not, write to the Free Software Foundation, Inc., 59 Temple
    Place, Suite 330, Boston, MA 02111-1307 USA
     
    Author contact information:
    engelen@genivia.com / engelen@acm.org
    --------------------------------------------------------------------------------
    2) A commercial-use license is available from Genivia, Inc., contact@genivia.com
    --------------------------------------------------------------------------------
    @endverbatim
     
    */
     
     
    //gsoapopt w
     
    /******************************************************************************\
     *                                                                            *
     * Definitions                                                                *
     *                                                                            *
     *                                                                            *
    \******************************************************************************/
     
     
    /******************************************************************************\
     *                                                                            *
     * Import                                                                     *
     *                                                                            *
    \******************************************************************************/
     
     
    // STL vector containers (use option -s to remove STL dependency)
    #import "stlvector.h"
     
    /******************************************************************************\
     *                                                                            *
     * Schema Namespaces                                                          *
     *                                                                            *
    \******************************************************************************/
     
    // This service uses SOAP 1.2 namespaces:
    //gsoap SOAP-ENV schema namespace:	http://www.w3.org/2003/05/soap-envelope
    //gsoap SOAP-ENC schema namespace:	http://www.w3.org/2003/05/soap-encoding
     
    /* NOTE:
     
    It is strongly recommended to customize the names of the namespace prefixes
    generated by wsdl2h. To do so, modify the prefix bindings below and add the
    modified lines to typemap.dat to rerun wsdl2h:
     
     
    */
     
    /******************************************************************************\
     *                                                                            *
     * Built-in Schema Types and Top-Level Elements and Attributes                *
     *                                                                            *
    \******************************************************************************/
     
     
    /******************************************************************************\
     *                                                                            *
     * Forward Declarations                                                       *
     *                                                                            *
    \******************************************************************************/
     
     
     
    /******************************************************************************\
     *                                                                            *
     * XML Data Binding                                                           *
     *                                                                            *
    \******************************************************************************/
     
     
    /**
     
    @page page_XMLDataBinding XML Data Binding
     
    SOAP/XML services use data bindings contractually bound by WSDL and auto-
    generated by wsdl2h and soapcpp2 (see Service Bindings). Plain data bindings
    are adopted from XML schemas as part of the WSDL types section or when running
    wsdl2h on a set of schemas to produce non-SOAP-based XML data bindings.
     
    The following readers and writers are C/C++ data type (de)serializers auto-
    generated by wsdl2h and soapcpp2. Run soapcpp2 on this file to generate the
    (de)serialization code, which is stored in soapC.c[pp]. Include "soapH.h" in
    your code to import these data type and function declarations. Only use the
    soapcpp2-generated files in your project build. Do not include the wsdl2h-
    generated .h file in your code.
     
    XML content can be retrieved from:
      - a FILE* fd, using soap->recvfd = fd
      - a socket, using soap->socket = ...
      - a C++ stream, using soap->is = ...
      - a buffer, using the soap->frecv() callback
     
    XML content can be stored to:
      - a FILE* fd, using soap->sendfd = fd
      - a socket, using soap->socket = ...
      - a C++ stream, using soap->os = ...
      - a buffer, using the soap->fsend() callback
     
     
    */
     
    /* End of e:\tmp\ws3.h */
    ps: j'ai lu ton tutorial avant de poster ici, il est facile à trouver, c'est un des seuls en Français et bien rédigé Merci !

Discussions similaires

  1. [XL-2010] Appel d'un webservice SOAP (wsdl)
    Par laloune dans le forum Macros et VBA Excel
    Réponses: 4
    Dernier message: 30/07/2016, 02h16
  2. [2005] Appel WebService SOAP dans un TRIGGER
    Par dsr57 dans le forum Développement
    Réponses: 5
    Dernier message: 03/12/2014, 14h37
  3. Appel d'une Webservice SOAP en Java
    Par shaun_the_sheep dans le forum Services Web
    Réponses: 0
    Dernier message: 25/03/2013, 08h45
  4. [Web Service] Client SOAP ou autre pour appel webservice
    Par flo73 dans le forum Bibliothèques et frameworks
    Réponses: 5
    Dernier message: 14/07/2010, 16h23
  5. [Web Service] Appel Webservice SOAP
    Par HaTnuX dans le forum Bibliothèques et frameworks
    Réponses: 1
    Dernier message: 16/08/2008, 22h33

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