Cannot open file 'typemap.dat'
Problem reading type map file typemap.dat.
Using internal type definitions for C++ instead.
Connecting to 'http://www.xmethods.net/wsdl/query.wsdl' to retrieve WSDL/XSD... connection failed
SOAP 1.1 fault: SOAP-ENV:Client [no subcode]
"Try Again"
Detail: get host by name failed in tcp_connect()作者: growup 时间: 2007-08-31 23:17
wsdl2h根据.wsdl生成.h文件,上面这个ur是l官网手册中的例子,但这个url是不可用的。
换个别的.wsdl文件。gSoap源码里应该有范例的,找一下。作者: dagun 时间: 2010-12-01 16:56
我也狂晕中,哪位朋友可以解决这个问题啊,楼上的朋友,给个解释吧?作者: dagun 时间: 2010-12-01 17:00
我的服务端为php Apache服务器
客户端用gsoap C语言开发的客户端,现在遇到下面问题,谁可以给个解答,谢谢啦
SOAP 1.1 fault: SOAP-ENV:Client [no subcode]
"error in msg parsing:
Charset from HTTP Content-Type 'US-ASCII' does not match encoding from XML declaration 'UTF-8'
Detail:
Segmention fault
if (soap_ssl_client_context(&soap,
/* SOAP_SSL_DEFAULT | SOAP_SSL_SKIP_HOST_CHECK, */ /* if we don't want the host name checks since these will change from machine to machine */
SOAP_SSL_NO_AUTHENTICATION, /* use SOAP_SSL_DEFAULT in production code */
NULL, /* keyfile (cert+key): required only when client must authenticate to server (see SSL docs to create this file) */
NULL, /* password to read the keyfile */
NULL, /* optional cacert file to store trusted certificates, use cacerts.pem for all public certificates issued by common CAs */
NULL, /* optional capath to directory with trusted certificates */
NULL /* if randfile!=NULL: use a file with random data to seed randomness */
))
{
printf("soap_ssl_client_context failed\n");
soap_print_fault(&soap, stderr);
exit(1);
}
soap.connect_timeout = 60; /* try to connect for 1 minute */
soap.send_timeout = soap.recv_timeout = 30; /* if I/O stalls, then timeout after 30 seconds */
if (soap_call_ns2__myPlus(&soap, to_server, soap_actionnew, value.num1, value.num2, &result) == SOAP_OK)
// if (soap_call_ns2__GetScada(&soap, server, "", getvalue.HostIP, getvalue.name, &result) == SOAP_OK)
// if (soap_call_ns2__GetScada(&soap, server, "", "", "", &result) == SOAP_OK)
fprintf(stdout, "Result:%s\n", result);
else
{
printf("error\n");
soap_print_fault(&soap, stderr);
}
soap_destroy(&soap); /* C++ */
soap_end(&soap);
soap_done(&soap);
CRYPTO_thread_cleanup();
return 0;
}
void locking_function(int mode, int n, const char *file, int line)
{ if (mode & CRYPTO_LOCK)
MUTEX_LOCK(mutex_buf[n]);
else
MUTEX_UNLOCK(mutex_buf[n]);
}
unsigned long id_function()
{ return (unsigned long)THREAD_ID;
}
int CRYPTO_thread_setup()
{ int i;
mutex_buf = (MUTEX_TYPE*)malloc(CRYPTO_num_locks() * sizeof(pthread_mutex_t));
if (!mutex_buf)
return SOAP_EOM;
for (i = 0; i < CRYPTO_num_locks(); i++)
MUTEX_SETUP(mutex_buf[i]);
CRYPTO_set_id_callback(id_function);
CRYPTO_set_locking_callback(locking_function);
CRYPTO_set_dynlock_create_callback(dyn_create_function);
CRYPTO_set_dynlock_lock_callback(dyn_lock_function);
CRYPTO_set_dynlock_destroy_callback(dyn_destroy_function);
return SOAP_OK;
}
void CRYPTO_thread_cleanup()
{ int i;
if (!mutex_buf)
return;
CRYPTO_set_id_callback(NULL);
CRYPTO_set_locking_callback(NULL);
CRYPTO_set_dynlock_create_callback(NULL);
CRYPTO_set_dynlock_lock_callback(NULL);
CRYPTO_set_dynlock_destroy_callback(NULL);
for (i = 0; i < CRYPTO_num_locks(); i++)
MUTEX_CLEANUP(mutex_buf[i]);
free(mutex_buf);
mutex_buf = NULL;
}