Results 1 to 13 of 13

Thread: gSoap Web Service

  1. #1
    Join Date
    Jul 2011
    Location
    Gurgaon
    Posts
    25
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default gSoap Web Service

    I need to consume a web service created in .Net.
    And I am using a gSoap plug-in library within qt framework.

    I have generated all the proxy classes to create a web service client and added reference in the project’s .pro file.
    After doing all the coding related stuff I get some compile time issues when compiling the project.

    The issues that compiler reports are.
    error: undefined reference to `vtable for _ns1__GetDayName'
    error: undefined reference to `_ns1__GetDayName::soap_default(soap*)'
    error: undefined reference to `soap_delete'
    error: undefined reference to `soap_free
    error: undefined reference to `soap_end

    plz help me out...

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: gSoap Web Service

    The class _ns1__GetDayName is either missin a Q_OBJECT macro, not listed in the PRO file HEADERS, or you have not run qmake since adding it.

    You seem to be missing LIBS entries to tell qmake to link the gsoap library.

  3. #3
    Join Date
    Jul 2011
    Location
    Gurgaon
    Posts
    25
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default Re: gSoap Web Service

    I have done the following stuff......

    please tell me if there is something wrong

    Qt Code:
    1. QT += core
    2.  
    3. QT -= gui
    4.  
    5. TARGET = WebServiceTest2
    6. CONFIG += console
    7. CONFIG -= app_bundle
    8.  
    9. CONFIG += qt
    10.  
    11. TEMPLATE = app
    12.  
    13. INCLUDEPATH += ../Desktop/Qt/gSoap/gsoap-2.8/gsoap/wsdl
    14. INCLUDEPATH += ../Desktop/Qt/gSoap/gsoap-2.8/gsoap
    15. INCLUDEPATH += ../Desktop/Qt/gSoap/gsoap-2.8/gsoap/bin/win32/JustDance
    16.  
    17. SOURCES += main.cpp \
    To copy to clipboard, switch view to plain text mode 

  4. #4
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: gSoap Web Service

    Umm, I already told you
    You seem to be missing LIBS entries to tell qmake to link the gsoap library.
    That's a line like (not identical to):
    Qt Code:
    1. LIBS += -L/path/to/location/og/gsoap/libs -lgsoap
    To copy to clipboard, switch view to plain text mode 

  5. #5
    Join Date
    Jul 2011
    Location
    Gurgaon
    Posts
    25
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default Re: gSoap Web Service

    Quote Originally Posted by cuteatul View Post
    I have done the following stuff......

    please tell me if there is something wrong

    Qt Code:
    1. QT += core
    2.  
    3. QT -= gui
    4.  
    5. TARGET = WebServiceTest2
    6. CONFIG += console
    7. CONFIG -= app_bundle
    8.  
    9. CONFIG += qt
    10.  
    11. TEMPLATE = app
    12.  
    13. INCLUDEPATH += ../Desktop/Qt/gSoap/gsoap-2.8/gsoap/wsdl
    14. INCLUDEPATH += ../Desktop/Qt/gSoap/gsoap-2.8/gsoap
    15. INCLUDEPATH += ../Desktop/Qt/gSoap/gsoap-2.8/gsoap/bin/win32/JustDance
    16.  
    17. SOURCES += main.cpp \
    To copy to clipboard, switch view to plain text mode 
    thank brother.....
    But after that I am getting following errors...

    :-1: error: cannot find -lgsoap
    :-1: error: collect2: ld returned 1 exit status

  6. #6
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: gSoap Web Service

    Then the library is not called gsoap ... it was just an educated guess, which is why I said like and not identical to my example. Try reading the gSoap INSTALL.txt file because I'm sure you'll find it there.

  7. #7
    Join Date
    Jul 2011
    Location
    Gurgaon
    Posts
    25
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default Re: gSoap Web Service

    Here is my Install.txt..... I couldn't find anything here.........

    ================================================== ==============================
    INSTALLATION
    ================================================== ==============================

    See README.txt for an overview of the gSOAP software and more details on the
    installation in case of a problem.

    This part explains how gSOAP is built on your platform.

    Using Autoconf/Automake
    -----------------------

    Requirements to configure and build the package with autoconf/automake:

    1. Automake tools (make and GNU m4) to configure and build
    2. Bison http://www.gnu.org/software/bison or the alternative Yacc
    3. Flex http://flex.sourceforge.net
    4a. either OpenSSL (for optional HTTPS) http://www.openssl.org
    4b. or GNUTLS (for optional HTTPS) http://www.gnu.org/software/gnutls/
    5. Zlib (for optional compression) http://www.zlib.net
    6. Pthreads or win32 threads (optional)

    See Installation Instructions below.

    I do not have/want Automake! Or what shoulld I do when 'make' fails?
    --------------------------------------------------------------------

    No problem.

    If autoconf/automake are not available or 'make' fails for some reason, you can
    build the soapcpp2 and wsdl2h tools with the provided makefiles. To do so:

    cd gsoap/src
    make -f MakefileManual
    cd gsoap/wsdl
    make -f MakefileManual

    This compiles and installs the binaries in gsoap/bin. Move them to a bin
    directory or include them in your executable path.

    For your project builds, use the stdsoap2.c and stdsoap2.cpp sources rather
    than the libgsoap libs, as the libs are not built. To enable SSL, GZIP, HTTP
    cookies, IPv6 support, and/or force C locale usage, use the compiler flags:

    -DWITH_OPENSSL or -DWITH_GNUTLS
    -DWITH_GZIP
    -DWITH_COOKIES
    -DWITH_IPV6
    -DWITH_C_LOCALE

    Note: these flags when set must be used to compile ALL your sources to ensure
    consistency.

    Windows Users
    -------------

    Win32 binaries and project code is included in this package. Win32 users can
    start right away without autoconf/automake. The 'soapcpp2.exe' binary compiler
    and 'wsdl2h.exe' WSDL parser are included in 'gsoap/bin/win32', see also the
    'gsoap/VisualStudio2005' folder for the tool project files. The 'soapcpp2.exe'
    and 'wsdl2h.exe' tools are command-line based and should be invoked from within
    the IDE to process WSDL, XSD, and gSOAP service specification header files:

    .wsdl .xsd --> wsdl2h.exe --> .h (special .h formatted with gSOAP annotations)
    .h --> soapcpp2.exe --> .h .c .cpp .xml ...

    Symbian
    -------

    Symbian instructions and example code is located in 'gsoap/Symbian'.

    Palm
    ----

    Palm OS support is no longer available for this release. The latest stable
    release with Palm OS support is gSOAP 2.7.8c.

    Installation Instructions
    -------------------------

    To build gSOAP on your platform using autoconf/automake, please enter the
    following commands:

    $ ./configure
    $ make
    $ make install

    This will install the executables and libraries on your system (and you need
    root access to do so).

    To build without the default OpenSSL SSL/TLS support, use:

    $ ./configure --disable-ssl
    $ make
    $ make install

    To build with GNUTLS SSL/TLS support, use:

    $ ./configure --enable-gnutls
    $ make
    $ make install

    IMPORTANT: the WS-Security WSSE plugin requires OpenSSL and will not build with
    GNUTLS. This limitation is being addressed, so please check future 2.8.x
    releases.

    To configure and build the examples, use the --enable-samples option:

    $ ./configure --enable-samples

    To configure and build the libraries in DEBUG mode, which produces 'SENT.log',
    'RECV.log' and 'TEST.log' files for message logs and gSOAP engine event logs,
    use:

    $ ./configure --enable-debug

    To enable IPV6 support, use:

    $ ./configure --enable-ipv6

    If you do not want the libraries to depend on a global namespace table (.nsmap
    file content), use:

    $ ./configure --disable-namespaces

    However, you MUST set a namespace table at runtime with soap_set_namespaces()
    right after initialization with soap_init() or soap_new() to ensure that a
    namespace mapping table is used by the engine context.

    If you want to install the executables in your local folder, enter:

    $ ./configure
    $ make
    $ make install exec_prefix=$HOME

    Summary
    -------

    To build your projects, you need the following executables:

    soapcpp2 the gSOAP stub/skeleton generator
    wsdl2h the gSOAP WSDL/schema parser and code generator

    Pre-built executables for select platforms can be found in gsoap/bin.

    You also need the following libraries (built from stdsoap2.c[pp]):

    libgsoap++.a C++ runtime
    libgsoapck++.a C++ runtime with HTTP cookie support
    libgsoapssl++.a C++ runtime with cookies, zlib, and SSL
    libgsoap.a C runtime
    libgsoapck.a C runtime with HTTP cookie support
    libgsoapssl.a C runtime with cookies, zlib, and SSL

    Or you can use the stdsoap2.c and stdsoap2.cpp source directly, but you need to use the propoer -DWITH_X flags to enable support for 'X' (see above).

    This version of gSOAP requires SSL support with OpenSSL 0.9.6 or later.

  8. #8
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: gSoap Web Service


    Quote Originally Posted by cuteatul View Post
    Here is my Install.txt..... I couldn't find anything here.........

    ----8< ------- snip ------
    Summary
    -------

    To build your projects, you need the following executables:

    soapcpp2 the gSOAP stub/skeleton generator
    wsdl2h the gSOAP WSDL/schema parser and code generator

    Pre-built executables for select platforms can be found in gsoap/bin.

    You also need the following libraries (built from stdsoap2.c[pp]):

    libgsoap++.a C++ runtime
    libgsoapck++.a C++ runtime with HTTP cookie support
    libgsoapssl++.a C++ runtime with cookies, zlib, and SSL
    libgsoap.a C runtime
    libgsoapck.a C runtime with HTTP cookie support
    libgsoapssl.a C runtime with cookies, zlib, and SSL

    Or you can use the stdsoap2.c and stdsoap2.cpp source directly, but you need to use the propoer -DWITH_X flags to enable support for 'X' (see above).

    This version of gSOAP requires SSL support with OpenSSL 0.9.6 or later.
    So the library is called "gsoap++" or "gsoapck++" or "gsoapssl++" depending on what features you need.

  9. #9
    Join Date
    Jul 2011
    Location
    Gurgaon
    Posts
    25
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default Re: gSoap Web Service

    I am getting this error after modifying code...

    :-1: error: cannot find -lgsoapck++

  10. #10
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: gSoap Web Service

    I suggest you look at your build of gSoap and see if it even exists. If you didn't build that support the library won't exist. This is also in the INSTALL.txt file.

  11. #11
    Join Date
    Jul 2011
    Location
    Gurgaon
    Posts
    25
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default Re: gSoap Web Service


  12. #12
    Join Date
    Jul 2011
    Location
    Gurgaon
    Posts
    25
    Thanks
    4
    Qt products
    Qt3 Qt4
    Platforms
    Windows Symbian S60 Maemo/MeeGo

    Default Re: gSoap Web Service

    plz can you explain in detail....................
    ???????????????????

  13. #13
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: gSoap Web Service

    Quote Originally Posted by ChrisW67 View Post



    So the library is called "gsoap++" or "gsoapck++" or "gsoapssl++" depending on what features you need.
    Library is called "libgsoap++" or "libgsoapck++" or "libgsoapssl++"

Similar Threads

  1. QT mobile and gSOAP
    By arjoshi in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 30th November 2010, 22:28
  2. gsoap help me !
    By yunpeng880 in forum Qt Programming
    Replies: 2
    Last Post: 28th June 2009, 20:09
  3. how c# access Gsoap'web service?
    By yunpeng880 in forum Qt Programming
    Replies: 2
    Last Post: 16th December 2008, 11:44
  4. QMake and GSoap
    By srccode in forum Newbie
    Replies: 1
    Last Post: 14th April 2006, 01:19

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.