We have developed a simple C++ application using gSoap . When we use classical Makefile, everything is OK and the system works fine. But when we use GNU autotools as the build system, we encounter a strange constraint violation validation error when we call the service:
( SOAP 1.1 fault: SOAP-ENV:Client [no subcode]
"Validation constraint violation: invalid value in element 'risk'"
Detail: [no detail]
We've checked all the compile and like flags and both look the same.
Makefile.am
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
AUTOMAKE_OPTIONS = subdir-objects
AM_CPPFLAGS = --pedantic -Wall -Wno-vla -Wno-unknown-pragmas -Wno-format
bin_PROGRAMS= Client Server
Client_SOURCES=card_soap_client.cpp envC.cpp stdsoap2.cpp cardProxy.cpp cardC.cpp
Client_CPPFLAGS= $(AM_CPPFLAGS) -DWITH_NONAMESPACES
Server_SOURCES=card_soap_server.cpp envC.cpp stdsoap2.cpp cardService.cpp cardC.cpp
Server_CPPFLAGS= $(AM_CPPFLAGS) -DWITH_NONAMESPACES
Makefile
CF=-c -Wall --pedantic -Wno-vla -Wno-unknown-pragmas -Wno-format -g -O2 -fPIC -DPIC -DWITH_NONAMESPACES
LF = -g -O2
all: card_soap_client.o card_soap_server.o cardProxy.o cardService.o cardC.o envC.o stdsoap2.o
g++ card_soap_client.o cardProxy.o cardC.o envC.o stdsoap2.o $(LF) -o Client
g++ card_soap_server.o cardService.o cardC.o envC.o stdsoap2.o $(LF) -o Server
cardC.o:cardC.cpp
g++ $(CF) cardC.cpp
cardService.o:cardService.cpp
g++ $(CF) cardService.cpp
cardProxy.o:cardProxy.cpp
g++ $(CF) cardProxy.cpp
envC.o: envC.cpp
g++ $(CF) envC.cpp
stdsoap2.o: stdsoap2.cpp
g++ $(CF) stdsoap2.cpp
card_soap_client.o:card_soap_client.cpp
g++ $(CF) card_soap_client.cpp
card_soap_server.o:card_soap_server.cpp
g++ $(CF) card_soap_server.cpp
We've generated the service using 2.8.9 and 2.8.23 and compiled with g++-4.7. The service is generated with the following command:
soapcpp2 -i -n -qcard -I/usr/share/gsoap/import/ interface_v1.3.1.hpp
UPDATE: The full source is available here