SIGPIPE (Broken pipe) on tcp_disconnect to exec a client (WCF Soap 1.1 and server)

587 Views Asked by At

I am developing a Qt client (C++) with gSOAP lib, which is supposed to discuss with a Web Service by Microsoft (WCF). I use SOAP 1.1 on both sides.

My client code is as follows :

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 = "[email protected]";
    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;

Problem: when I execute the program, I get a SIGPIPE (Broken pipe) in the "tcp_disconnect" function, on the exactly line "r = SSL_shutdown (soap-> ssl);".

Error message generated:

Error -1 fault: SOAP-ENV: Client [no subcode] "End of file or no input: Operation interrupted or timed out" Detail: [no detail]

Do you have any idea why? If you need more resources or information, please let me know!

A big thank in advance,

Louep.

0

There are 0 best solutions below