0

I get SOAP_EMPTY using gsoap, I have searched for a long time and had no answer,SOAP_EMPTY is newly added to gsoap,and it seems I'm the unlucky guy to meet this problem.

Here is where my code come from:https://github.com/miibotree/ONVIF/blob/master/main.c Now soap_call___tds__GetCapabilities will return code SOAP_EMPTY,I'm now using gdb to track this problem it seems that I need to set a valid soap->id to avoid this problem,but I'm a fresh guy with onvif and don't know how to set a valid soap->id,and now I'm reading various docs about onvif and trying to solve it.

Hope any guys could help me, sinch searching so many docs makes my eyes pain and I still haven't found the answer,thanks.

jimmy
  • 1
  • 4

1 Answers1

0

SOAP_EMPTY is a validation failure. This error indicates than an element/attribute is empty but is supposed to have content. For example an integer value should not be an empty string. The old error generated by older gSOAP releases in this case was SOAP_TYPE which was less informative. In either case, validation fails. The best way to find out is to use soap_print_fault() and soap_print_fault_location()` where the latter call shows the location in XML where the problem is. Our ONVIF testing with gSOAP did not reveal such an issue.

Dr. Alex RE
  • 1,772
  • 1
  • 15
  • 23
  • Thanks for you answer,I will try soap_print_fault(),Could you tell me the link that have tutorial to use gsoap about onvif,I have studied gsoap in https://www.genivia.com/tutorials.html,but it it not related to onvif. – jimmy Feb 22 '18 at 00:49