Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to make server using gSOAP?
Forum Updated to NodeBB v4.3 + New Features

How to make server using gSOAP?

Scheduled Pinned Locked Moved Unsolved General and Desktop
14 Posts 5 Posters 3.5k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    L.Gogs
    wrote on 7 Nov 2017, 11:41 last edited by
    #1

    I'm making server side which will be written in c++ using gSOAP. I wrote some simple "sum" function in "Server.h" file.

    //gsoap ns service name: Server
    //gsoap ns service namespace: urn:Server
    //gsoap ns service style: rpc
    //gsoap ns service encoding: encoded

    int ns__sum(int a, int b, int *res);
    Then I generated "Server.h" using this command soapcpp2 -i -s C:/Users/pc/Desktop/Server.h and I got these files:

    soapServerService.h
    soapServerService.cpp
    soapServerProxy.h
    soapServerProxy.cpp
    Server.nsmap
    soapStub.h
    soapH.h
    soapC.cpp
    Then I tried this code:

    #include "Server.nsmap"
    #include "soapServerService.h"

    int main()
    {
    ServerService *server;
    server->serve();

    return 0;   
    

    }

    int ServerService::sum(int a, int b, int *res)
    {
    *res = a + b;
    return SOAP_OK;
    }

    my program is crashed after execute, I know that I have to write server = new ServerService() but when I write like this, I have another error

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 7 Nov 2017, 13:26 last edited by
      #2

      This has nothing to do with Qt. You're more likely to get help on some forum or mailing list of gSOAP users.

      You may get a bit more luck here with KD Soap.

      When it comes to the technology in general, I'd strongly recommend (if possible) to switch to JSON. Much simpler, much easier.

      (Z(:^

      L T 2 Replies Last reply 7 Nov 2017, 13:45
      0
      • S sierdzio
        7 Nov 2017, 13:26

        This has nothing to do with Qt. You're more likely to get help on some forum or mailing list of gSOAP users.

        You may get a bit more luck here with KD Soap.

        When it comes to the technology in general, I'd strongly recommend (if possible) to switch to JSON. Much simpler, much easier.

        L Offline
        L Offline
        L.Gogs
        wrote on 7 Nov 2017, 13:45 last edited by L.Gogs 11 Jul 2017, 13:46
        #3

        @sierdzio Firs of all thank you for your advise but I want to use only gSOAP, Also I agree with you that this has nothing to do with Qt, although I want to write this program in Qt but I can not write even in native c++ yet.

        J 2 Replies Last reply 7 Nov 2017, 14:09
        0
        • L L.Gogs
          7 Nov 2017, 13:45

          @sierdzio Firs of all thank you for your advise but I want to use only gSOAP, Also I agree with you that this has nothing to do with Qt, although I want to write this program in Qt but I can not write even in native c++ yet.

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 7 Nov 2017, 14:09 last edited by
          #4

          @L.Gogs If you can't write it without Qt then you should really ask on the gSOAP mailing list. Why do you think Qt forum is the right place to ask about gSOAP? If you're lucky somebody reading here will be able to help you but it is much more likely to get help in the right place...

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mrjj
            Lifetime Qt Champion
            wrote on 7 Nov 2017, 15:03 last edited by
            #5

            @L.Gogs said in How to make server using gSOAP?:

            ServerService *server;
            server->serve();

            I know you say you know you have to new it so
            even its 100% sure it crashes
            at server->serve();

            But what is then the question ?

            1 Reply Last reply
            0
            • L L.Gogs
              7 Nov 2017, 13:45

              @sierdzio Firs of all thank you for your advise but I want to use only gSOAP, Also I agree with you that this has nothing to do with Qt, although I want to write this program in Qt but I can not write even in native c++ yet.

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 8 Nov 2017, 06:07 last edited by
              #6

              @L.Gogs "but when I write like this, I have another error" - don't you think it could help others to help you if you would actually say what error it is? "another error" can mean anything...

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              2
              • S sierdzio
                7 Nov 2017, 13:26

                This has nothing to do with Qt. You're more likely to get help on some forum or mailing list of gSOAP users.

                You may get a bit more luck here with KD Soap.

                When it comes to the technology in general, I'd strongly recommend (if possible) to switch to JSON. Much simpler, much easier.

                T Offline
                T Offline
                Taz742
                wrote on 24 Nov 2017, 09:50 last edited by
                #7

                @sierdzio said in How to make server using gSOAP?:

                When it comes to the technology in general, I'd strongly recommend (if possible) to switch to JSON. Much simpler, much easier.

                Can you write examples how to do Json server?

                Do what you want.

                J 1 Reply Last reply 24 Nov 2017, 10:03
                0
                • T Taz742
                  24 Nov 2017, 09:50

                  @sierdzio said in How to make server using gSOAP?:

                  When it comes to the technology in general, I'd strongly recommend (if possible) to switch to JSON. Much simpler, much easier.

                  Can you write examples how to do Json server?

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 24 Nov 2017, 10:03 last edited by
                  #8

                  @Taz742 What is "Json server"?

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  T 1 Reply Last reply 24 Nov 2017, 10:11
                  0
                  • J jsulm
                    24 Nov 2017, 10:03

                    @Taz742 What is "Json server"?

                    T Offline
                    T Offline
                    Taz742
                    wrote on 24 Nov 2017, 10:11 last edited by
                    #9

                    @jsulm sorry.
                    We need a web server?

                    Do what you want.

                    J 1 Reply Last reply 24 Nov 2017, 10:12
                    0
                    • T Taz742
                      24 Nov 2017, 10:11

                      @jsulm sorry.
                      We need a web server?

                      J Offline
                      J Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 24 Nov 2017, 10:12 last edited by jsulm
                      #10

                      @Taz742 I still don't understand: if you need a web server install one? How is it related to JSON + Qt? What exactly is the question?

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      T 1 Reply Last reply 24 Nov 2017, 10:15
                      0
                      • J jsulm
                        24 Nov 2017, 10:12

                        @Taz742 I still don't understand: if you need a web server install one? How is it related to JSON + Qt? What exactly is the question?

                        T Offline
                        T Offline
                        Taz742
                        wrote on 24 Nov 2017, 10:15 last edited by Taz742
                        #11

                        @jsulm said in How to make server using gSOAP?:

                        How is it related to JSON + Qt?

                        Yes, I'm interested in it.

                        Do what you want.

                        J 1 Reply Last reply 24 Nov 2017, 10:16
                        0
                        • T Taz742
                          24 Nov 2017, 10:15

                          @jsulm said in How to make server using gSOAP?:

                          How is it related to JSON + Qt?

                          Yes, I'm interested in it.

                          J Offline
                          J Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on 24 Nov 2017, 10:16 last edited by
                          #12

                          @Taz742 Start here http://doc.qt.io/qt-5/json.html

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          T 1 Reply Last reply 24 Nov 2017, 10:34
                          0
                          • J jsulm
                            24 Nov 2017, 10:16

                            @Taz742 Start here http://doc.qt.io/qt-5/json.html

                            T Offline
                            T Offline
                            Taz742
                            wrote on 24 Nov 2017, 10:34 last edited by
                            #13

                            @jsulm Where to continue reading?

                            Do what you want.

                            J 1 Reply Last reply 24 Nov 2017, 11:05
                            0
                            • T Taz742
                              24 Nov 2017, 10:34

                              @jsulm Where to continue reading?

                              J Offline
                              J Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on 24 Nov 2017, 11:05 last edited by
                              #14

                              @Taz742 There are links to an example and to all the JSON related classes...

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              0

                              • Login

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Users
                              • Groups
                              • Search
                              • Get Qt Extensions
                              • Unsolved