Problem using GSOAP with OpenSSL on Linux

This is a discussion on Problem using GSOAP with OpenSSL on Linux within the C Programming forums, part of the General Programming Boards category; I'm having a big problem trying to get gsoap working with OpenSSL. It all compiles with no errors, it just ...

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    2

    Problem using GSOAP with OpenSSL on Linux

    I'm having a big problem trying to get gsoap working with OpenSSL. It all compiles with no errors, it just doesn't work for me, thus I must be doing something wrong.

    I compile OpenSSL then GSOAP as instructed (configure, make, make install).
    Then I run:
    wsdl2h -c -o headerfile.h wsdlurlgoeshere (it's a https url)

    This gets all the WSDL data fine.

    Then I run:
    soapcpp2 headerfile.h

    This creates all the soap files fine.

    Then I create a simple test script (test.c) that includes soap and the nsmap file. My main function just calls a function of the API and returns to print a success message.

    So I compile that:
    gcc -0 test test.c soapC.c soapClient.c -lgsoap

    This compiles without any errors.

    Then I run the program ./test and I get the following displayed:

    SOAP 1.1 fault: SOAP-ENV:Client [no subcode]
    "OpenSSL not installed: recompile with -DWITH_OPENSSL"
    Detail: [no detail]

    When gsoap compiles it says compiling with OpenSSL and such and works fine.

    If I try compile the test with either:
    gcc -0 test test.c soapC.c soapClient.c -lgsoapssl
    Or
    gcc -0 test test.c soapC.c soapClient.c -lgsoapssl++

    Then I get a bunch of errors although that could be more correct.

    I've tried recompiling openssl and gsoap 100 times trying different things but I just get no success.

    So if you can let me know where I'm going wrong or tell me specifically how to get this going it'd be much appreciated.

    I'm sorry I couldn't give the actual WSDL and code but I'm under NDA for this API at the moment.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,824
    > SOAP 1.1 fault: SOAP-ENV:Client [no subcode]
    > "OpenSSL not installed: recompile with -DWITH_OPENSSL"
    > Detail: [no detail]
    Search your soap files for fragments of these error messages, to see if you can figure out how it gets to the error messages.


    > When gsoap compiles it says compiling with OpenSSL and such and works fine.
    Maybe so, but did you do as the error message suggested?

    gcc -0 test -DWITH_OPENSSL test.c soapC.c soapClient.c -lgsoap



    > I'm sorry I couldn't give the actual WSDL and code but I'm under NDA for this API at the moment.
    NDA => money => contract => why aren't you asking THEM these support questions?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    2
    Thanks for your suggestion Salem but -DWITH_OPENSSL is in regards to the compilation of GSOAP, not my program.

    I worked out the solution, it was my own lack of knowledge of C. For the benefit of others:

    As mentioned I compiled my program using this command:
    gcc -0 test test.c soapC.c soapClient.c -lgsoap

    Whereas it actually should have been:
    gcc -o test test.c soapC.c soapClient.c -lgsoapssl -lssl

    It was just missing the correct libraries.

    As for your question Salem, I wrote the API so I could only ask myself.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 10-18-2005, 11:20 AM
  2. Linux problem
    By MiraX33 in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 09-05-2005, 02:22 AM
  3. Modem problem w/ RedHat Linux 9
    By Machewy in forum Tech Board
    Replies: 10
    Last Post: 01-05-2004, 06:58 PM
  4. Problem with C++ in linux
    By MelaOS in forum C++ Programming
    Replies: 2
    Last Post: 12-28-2003, 06:29 AM
  5. Linux modem problem
    By VooDoo in forum Linux Programming
    Replies: 5
    Last Post: 08-19-2002, 06:34 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21