My .h file contains constraint annotation like <minOccurs>:<maxOccurs> as described in http://www.cs.fsu.edu/~engelen/soapdoc2.html#tth_sEc17 http://www.cs.fsu.edu/~engelen/soapdoc2.html#tth_sEc17 and I am using soapcpp2 with -s flag. Although I use soap_set_imode(&soap, SOAP_XML_STRICT); in my code I am still able to generate an xml file that does not fit the .xsd file without getting any error. Shouldn't there appear one of the error codes mentioned in http://www.cs.fsu.edu/~engelen/soapdoc2.html#tth_sEc10.2 http://www.cs.fsu.edu/~engelen/soapdoc2.html#tth_sEc10.2 ?
---In ***@yahoogroups.com, <***@...> wrote:
Hallo Florian,
to enforce strict validation of the xml-messages during generation you can set the following flag in your c code after soapinit:
soap_set_imode(&soap, SOAP_XML_STRICT);
don't forget -s option in soapcpp2 this will generate a deserialization code with strice xml validation check.
best regard
Abebe
On Fri, Nov 15, 2013 at 11:27 AM, <***@... mailto:***@...> wrote:
I'm facing the following problem concerning xml validation with gSOAP:
I use wsdl2h to generate a header file from my xsd and soapcpp2 to generate C sources from that header file.
Using the generated sources in my program I'm able to write an xml file, and sadly I'am able to write a xml file which is not valid against the original schema.
Is there any way to validate the generated xml file against the xsd after/during generation with the help of gsoap? Or do I have to use a seperate validator?
Thank you very much in advance,
Sebastian