This example shows you how to find a business from a UDDI server.
#include "inqH.h"
int main(int argc, char **argv)
{
char *search_string = "xmethods";
if (argc > 1)
search_string = argv[1];
struct soap *soap = soap_new();
if (!bl)
soap_print_fault(soap, stderr);
{
std::cout << "Search results on " << search_string << ":" << std::endl << std::endl;
{
std::cout << "businessKey=" << (*bi)->businessKey << std::endl;
for (std::vector<uddi2__name*>::const_iterator n = (*bi)->name.begin(); n != (*bi)->name.end(); ++n)
std::cout << "name=" << (*n)->__item << std::endl;
std::cout << std::endl;
}
}
soap_destroy(soap);
soap_end(soap);
soap_done(soap);
free(soap);
return 0;
}
To compile:
- wsdl2h -tuddi2-typemap.dat inquire_v2.wsdl
- soapcpp2 -I.. -pinq inquire_v2.h
- g++ -DWITH_NONAMESPACES -I.. -o example2 example2.cpp inquire_v2.cpp inqC.cpp inqClient.cpp ../stdsoap2.cpp