tcp_disconnect上的SIGPIPE(Broken pipe)执行客户端(WCF Soap 1.1和服务器)

时间:2012-10-23 12:39:58

标签: soap pipe gsoap sigpipe

我正在使用gSOAP lib开发一个Qt客户端(C ++),它应该与Microsoft(WCF)的Web服务进行讨论。我在两边使用SOAP 1.1。

我的客户端代码如下:

CustomBinding_USCOREISynchronisation service;

    soap_ssl_init(); /* init OpenSSL (just once) */

    soap_init2(service.soap, SOAP_IO_KEEPALIVE, SOAP_IO_KEEPALIVE);
    service.soap->max_keep_alive = 1000; // at most 100 calls per keep-alive session
    service.soap->accept_timeout = 6000; // optional: let server time out after ten minutes of inactivity

    if (soap_ssl_client_context(service.soap,
       SOAP_SSL_NO_AUTHENTICATION,
       NULL,    /* keyfile: required only when client must authenticate to server (see SSL docs on how to obtain this file) */
       NULL,     /* password to read the key file (not used with GNUTLS) */
       NULL, /* cacert file to store trusted certificates (needed to verify server) */    NULL,  /* capath to directory with trusted certificates */
       NULL  /* if randfile!=NULL: use a file with random data to seed randomness */
    ))
    {
       soap_print_fault(service.soap, stderr);
       exit(1);
    }

    _ns1__Connect req;
    _ns1__ConnectResponse resp;

    std::string strLogin = "tata@gmail.com";
    std::string strPassword = "681982981298192891287B0A";
    bool bInternalUser = true;

    req.login = &strLogin;
    req.password = &strPassword;
    req.isInternalUser = &bInternalUser;

    int err = service.__ns1__Connect(&req, &resp);
    if (SOAP_OK == err)
        qDebug() << ":D";
    else
    {
        qDebug() << "Error : " << err;
        soap_print_fault(service.soap, stderr);
    }

    qDebug() << "Result of Connect : " << resp.ConnectResult;

问题:当我执行程序时,我在“tcp_disconnect”函数中得到一个SIGPIPE(Broken pipe),在“r = SSL_shutdown(soap-&gt; ssl);”的确切行上。“

生成错误消息:

错误-1错误:SOAP-ENV:客户端[无子代码] “文件结束或无输入:操作中断或超时” 细节:[没有细节]

你知道为什么吗?如果您需要更多资源或信息,请告诉我们!

提前非常感谢,

Louep。

0 个答案:

没有答案