Bonjour,
J'utilise GSOAP pour effectuer un appel de web service en C++ sous windows.
une fois gsoap installé sous windows, j'ai essayé de compiler l'exemple (calc++) de la librairie sous DOS avec les commandes suivantes :
j'obtiens ceci :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 soapcpp2 -i calc.h
puis j'ai procédé à la compilation :
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 ** The gSOAP Stub and Skeleton Compiler for C and C++ 2.7.12 ** Copyright (C) 2000-2008, Robert van Engelen, Genivia Inc. ** All Rights Reserved. This product is provided "as is", without any warranty. ** The gSOAP compiler is released under one of the following three licenses: ** GPL, the gSOAP public license, or the commercial license by Genivia Inc. Saving soapStub.h Saving soapH.h Saving soapC.cpp Using ns service name: calc Using ns service style: rpc Using ns service encoding: encoded Using ns service location: http://websrv.cs.fsu.edu/~engelen/calcserver.cgi Using ns schema namespace: urn:calc Saving calc.wsdl Web Service description Compliance warning: operation 'ns__add' is not compliant with WS-I Basic Profile 1.0a, reason: uses SOAP encoding Compliance warning: operation 'ns__sub' is not compliant with WS-I Basic Profile 1.0a, reason: uses SOAP encoding Compliance warning: operation 'ns__mul' is not compliant with WS-I Basic Profile 1.0a, reason: uses SOAP encoding Compliance warning: operation 'ns__div' is not compliant with WS-I Basic Profile 1.0a, reason: uses SOAP encoding Compliance warning: operation 'ns__pow' is not compliant with WS-I Basic Profile 1.0a, reason: uses SOAP encoding Saving soapcalcProxy.h client proxy class Saving soapcalcProxy.cpp client proxy class Saving soapcalcService.h service class Saving soapcalcService.cpp service class Saving calc.add.req.xml sample SOAP/XML request Saving calc.add.res.xml sample SOAP/XML response Saving calc.sub.req.xml sample SOAP/XML request Saving calc.sub.res.xml sample SOAP/XML response Saving calc.mul.req.xml sample SOAP/XML request Saving calc.mul.res.xml sample SOAP/XML response Saving calc.div.req.xml sample SOAP/XML request Saving calc.div.res.xml sample SOAP/XML response Saving calc.pow.req.xml sample SOAP/XML request Saving calc.pow.res.xml sample SOAP/XML response Saving calc.nsmap namespace mapping table Saving ns.xsd XML schema
j'obtiens en partie l'erreur suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2g++ -o calcClient calcclient.cpp "D:/temp/gsoap-2.7/gsoap/samples/calc++/stdsoap2.cpp" soapC.cpp soapcalcProxy.cpp
Avez-vous une idée sur ce problème svp.
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 soapcalcProxy.cpp:307: error: `soap_closesock' was not declared in this scope soapcalcProxy.cpp:310: error: `soap_closesock' was not declared in this scope soapcalcProxy.cpp: At global scope: soapcalcProxy.cpp:313: error: `calcProxy' is not a class or namespace soapcalcProxy.cpp: In function `int pow(double, double, double*)': soapcalcProxy.cpp:314: error: invalid use of `this' in non-member function soapcalcProxy.cpp:317: error: `NULL' was not declared in this scope soapcalcProxy.cpp:318: error: `soap_endpoint' was not declared in this scope soapcalcProxy.cpp:320: error: invalid use of undefined type `struct soap' soapcalcProxy.cpp:14: error: forward declaration of `struct soap' soapcalcProxy.cpp:323: error: `soap_begin' was not declared in this scope soapcalcProxy.cpp:324: error: `soap_serializeheader' was not declared in this sc ope soapcalcProxy.cpp:325: error: `soap_serialize_ns__pow' was not declared in this scope soapcalcProxy.cpp:326: error: `soap_begin_count' was not declared in this scope soapcalcProxy.cpp:327: error: invalid use of undefined type `struct soap' soapcalcProxy.cpp:14: error: forward declaration of `struct soap' soapcalcProxy.cpp:328: error: invalid use of undefined type `struct soap' soapcalcProxy.cpp:14: error: forward declaration of `struct soap' soapcalcProxy.cpp:328: error: `SOAP_IO_LENGTH' was not declared in this scope soapcalcProxy.cpp:329: error: `soap_envelope_begin_out' was not declared in this scope soapcalcProxy.cpp:330: error: `soap_putheader' was not declared in this scope soapcalcProxy.cpp:331: error: `soap_body_begin_out' was not declared in this sco pe soapcalcProxy.cpp:332: error: `soap_put_ns__pow' was not declared in this scope soapcalcProxy.cpp:333: error: `soap_body_end_out' was not declared in this scope soapcalcProxy.cpp:334: error: `soap_envelope_end_out' was not declared in this s cope soapcalcProxy.cpp:335: error: invalid use of undefined type `struct soap' soapcalcProxy.cpp:14: error: forward declaration of `struct soap' soapcalcProxy.cpp:337: error: `soap_end_count' was not declared in this scope soapcalcProxy.cpp:338: error: invalid use of undefined type `struct soap' soapcalcProxy.cpp:14: error: forward declaration of `struct soap' soapcalcProxy.cpp:339: error: `soap_endpoint' was not declared in this scope soapcalcProxy.cpp:339: error: `soap_connect' was not declared in this scope soapcalcProxy.cpp:340: error: `soap_envelope_begin_out' was not declared in this scope soapcalcProxy.cpp:341: error: `soap_putheader' was not declared in this scope soapcalcProxy.cpp:342: error: `soap_body_begin_out' was not declared in this sco pe soapcalcProxy.cpp:343: error: `soap_put_ns__pow' was not declared in this scope soapcalcProxy.cpp:344: error: `soap_body_end_out' was not declared in this scope soapcalcProxy.cpp:345: error: `soap_envelope_end_out' was not declared in this s cope soapcalcProxy.cpp:346: error: `soap_end_send' was not declared in this scope soapcalcProxy.cpp:347: error: `soap_closesock' was not declared in this scope soapcalcProxy.cpp:349: error: `soap_closesock' was not declared in this scope soapcalcProxy.cpp:350: error: `soap_default_double' was not declared in this sco pe soapcalcProxy.cpp:351: error: `soap_begin_recv' was not declared in this scope soapcalcProxy.cpp:352: error: `soap_envelope_begin_in' was not declared in this scope soapcalcProxy.cpp:353: error: `soap_recv_header' was not declared in this scope soapcalcProxy.cpp:354: error: `soap_body_begin_in' was not declared in this scop e soapcalcProxy.cpp:355: error: `soap_closesock' was not declared in this scope soapcalcProxy.cpp:356: error: `soap_get_ns__powResponse' was not declared in thi s scope soapcalcProxy.cpp:357: error: invalid use of undefined type `struct soap' soapcalcProxy.cpp:14: error: forward declaration of `struct soap' soapcalcProxy.cpp:358: error: invalid use of undefined type `struct soap' soapcalcProxy.cpp:14: error: forward declaration of `struct soap' soapcalcProxy.cpp:358: error: `SOAP_TAG_MISMATCH' was not declared in this scope soapcalcProxy.cpp:358: error: invalid use of undefined type `struct soap' soapcalcProxy.cpp:14: error: forward declaration of `struct soap' soapcalcProxy.cpp:359: error: `soap_recv_fault' was not declared in this scope soapcalcProxy.cpp:360: error: `soap_closesock' was not declared in this scope soapcalcProxy.cpp:362: error: `soap_body_end_in' was not declared in this scope soapcalcProxy.cpp:363: error: `soap_envelope_end_in' was not declared in this sc ope soapcalcProxy.cpp:364: error: `soap_end_recv' was not declared in this scope soapcalcProxy.cpp:365: error: `soap_closesock' was not declared in this scope soapcalcProxy.cpp:368: error: `soap_closesock' was not declared in this scope
Merci
Partager