Search code examples
web-servicesxsdwsdlgsoaponvif

how to call web service functions


Nowadays, we see that some APIs are provided as web services. For example, ONVIF provides APIs in wsdl and xsd files from which gsoap generates sources. My question is that regardless of the context for which the API is generated, can we rely only on the wsdl and xsd files or we need some additional documents to know how to call and use these generated classes, functions and in the whole these generated cpp codes? In another words, can the xml files suffice for extracting the information of how to call the generated codes and use them? If just having the wsdl and xsd files are enough, please tell me how to extract these information.


Solution

  • No, with the wsdl files, you can only create the classes and methods.

    Normaly the names are the same as the element names in the soap request. So you can look there how and witch method you have to use.

    The xsd file is only to verify the request, if they are in a valid format.

    A documentation would be helpfull. Without one, you have to try and error.