void http_da_proxy_release(struct soap *soap, struct http_da_info *info) { soap->proxy_userid = NULL; soap->proxy_passwd = NULL; http_da_release(soap, info); }
int run_tests(int argc, char **argv) { struct soap *soap = soap_new1(SOAP_XML_INDENT); struct ns__echoString r; char *endpoint, *arg; int ret; soap_register_plugin(soap, http_da); endpoint = argv[1]; arg = argv[2]; if (strchr(arg, 'c')) soap_set_omode(soap, SOAP_IO_CHUNK); if (strchr(arg, 'z')) soap_set_omode(soap, SOAP_ENC_ZLIB); if (soap_call_ns__echoString(soap, endpoint, NULL, arg, &r)) { if (soap->error == 401) { if (!strcmp(soap->authrealm, authrealm)) { /* save userid and passwd for basic or digest authentication */ struct http_da_info info; http_da_save(soap, &info, authrealm, "Mufasa", "Circle Of Life"); if (!soap_call_ns__echoString(soap, endpoint, NULL, arg, &r)) { soap_end(soap); /* need to restore for authentication */ http_da_restore(soap, &info); if (!soap_call_ns__echoString(soap, endpoint, NULL, arg, &r)) { if (!strcmp(arg, r.arg)) printf("EchoString test OK\n"); else printf("Transmission error\n"); } } http_da_release(soap, &info); /* regular calls may follow */ } } } if (soap->error) soap_print_fault(soap, stderr); ret = soap->error; soap_destroy(soap); soap_end(soap); soap_free(soap); return ret; }