Results 1 to 5 of 5

Thread: qmake: how to call gsoap

  1. #1
    Join Date
    Jan 2006
    Posts
    105
    Thanks
    21
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default qmake: how to call gsoap

    I'm trying to create a SOAP-Client in Qt.

    The Soap-Client works allready as pure c++ application with a custom Makefile.

    But now i wanted to use qmake for Makefile-generation.

    This is the Makefile i used for the c++ application:
    Qt Code:
    1. GSOAP=../gsoap/soapcpp2
    2. SOAPH=../gsoap/stdsoap2.h
    3. SOAPCPP=../gsoap/stdsoap2.cpp
    4. CPP=g++
    5. LIBS=-lwsock32
    6. COFLAGS=-O2
    7. CWFLAGS=-Wall
    8. CIFLAGS=-I../gsoap
    9. CMFLAGS=
    10. CFLAGS= $(CWFLAGS) $(COFLAGS) $(CIFLAGS) $(CMFLAGS)
    11. all: quote
    12. quote: quote.h quote.cpp $(SOAPH) $(SOAPC)
    13. $(GSOAP) quote.h
    14. $(CPP) $(CFLAGS) -o quote quote.cpp soapC.cpp soapClient.cpp $(SOAPCPP) $(LIBS)
    15. clean:
    16. del *.o soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h
    17. distclean:
    18. del *.o *.wsdl *.xsd *.xml *.nsmap *.log soapH.h soapStub.h soapC.cpp soapC.c soapClient.cpp soapClient.c soapServer.cpp soapServer.c soap*Proxy.h quote
    To copy to clipboard, switch view to plain text mode 

    So far I added this to my .pro file:
    INCLUDEPATH += ../gsoap
    SOURCES += quote.cpp soapC.cpp soapClient.cpp ../gsoap/stdsoap2.cpp
    HEADERS += quote.h
    LIBS += -lwsock32

    how do i add the $(GSOAP) quote.h call?
    what else i'm missing?

    thanks!
    niko

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: qmake: how to call gsoap

    I use something like that (using qmake 1.07a (Qt 3.3.4)):

    Qt Code:
    1. HEADERS += funcs.h \
    2. structs.h
    3. SOURCES += funcs.cpp \
    4. ws/soapGPSService.cpp \
    5. ws/soapC.cpp
    6. wsdldefinition.target = soapGPSService.h
    7. wsdldefinition.commands = soapcpp2 -2 -S -i -d ws funcs.h
    8. QMAKE_EXTRA_UNIX_TARGETS = wsdldefinition
    9. LIBS += -lgsoap++
    10. INCLUDEPATH += ../../gis/include \
    11. ../server \
    12. ws/
    13. CONFIG += release \
    14. warn_on \
    15. staticlib
    16. TEMPLATE = lib
    To copy to clipboard, switch view to plain text mode 
    Those includepaths are my project internal paths. GSoap includes are available globally in my system, so I didn't put them into INCLUDEPATH.

  3. #3
    Join Date
    Jan 2006
    Posts
    3
    Qt products
    Qt3 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qmake: how to call gsoap

    As option you can use QtSoap module from Qt Solutions.

  4. #4
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qmake: how to call gsoap

    I used the QtSOAP. Its useless, it doesnt support ids and href. And has many more problems. Qt people itself said to me that it needs very much refinement and will take time to get it perfect. Now I am using gSOAP.
    But QtSOAP is much more easy for newbie but gSOAP needs more attention.

    Its depends on your needs, if webservice is simple then you can go for QtSOAP. (=no complex xml request reply)



    Have Fun

  5. #5
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qmake: how to call gsoap

    Soa request is simple post or get http request...
    i use my fast writteln http debugger to create a xml request..
    http://www.qt-apps.org/content/show....?content=76432

    inside you find a sample soa to get EuroExchangeRate on swiss mony.

    After i pack the request on base64 encoded resource
    write the method

    on this way i update 300 Holiday houses on 7 minutes .... i send 100 group QThread request to other server and i process all response to my mysql database....

    Normal soa lib not work on Thread evry single request each time...


    Qt Code:
    1. void SoaRequest::Login()
    2. {
    3. qDebug() << "### soa Login ACTION ###################";
    4. QString Stream_0 ="PD94bWwgdm baseencoded xml Vyc2lv";
    5. QString Stream = fromBase64(Stream_0);
    6. Stream = Stream.replace("_PASS_",decodeBase64(setter.value("tijava/pass").toString()));
    7. Stream = Stream.replace("_USER_",decodeBase64(setter.value("tijava/user").toString()));
    8. ResetSession();
    9. Send(Stream,_URLSYSTEM_,1);
    10. }
    11.  
    12. void SoaRequest::Logout()
    13. {
    14. qDebug() << "### soa Logout ACTION ###################";
    15. QString Stream_0 ="PD94bWwgdm baseencoded xml Vyc2lv";
    16. QString Stream = fromBase64(Stream_0);
    17. Stream = Stream.replace("_SESSION_",WebSessionCurrent);
    18. qDebug() << "### soa logout -> " << WebSessionCurrent;
    19. Send(Stream,_URLSYSTEM_,0);
    20. ResetSession();
    21. }
    22. void SoaRequest::Send( QString streams , QUrl url , const int memid )
    23. {
    24. header.setRequest("POST",url.path(),1,1);
    25. header.setValue("Accept-Charset","ISO-8859-1,utf-8;q=0.7,*;q=0.7");
    26. header.setValue("Accept-Encoding","gzip,deflate,qcompress");
    27. header.setValue("Connection","keep-alive");
    28. header.setValue("Content-Type","text/xml; charset=utf-8");
    29. /* other sets
    30.   read response and finish ...
    31.   */
    32. }
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. qmake sux a lot
    By singermornings in forum Qt Programming
    Replies: 6
    Last Post: 29th January 2009, 08:33
  2. MacOS settings
    By skaiser in forum Installation and Deployment
    Replies: 2
    Last Post: 19th July 2007, 07:47
  3. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  4. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  5. QMake and GSoap
    By srccode in forum Newbie
    Replies: 1
    Last Post: 14th April 2006, 00:19

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.