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.7k 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.GogsL Offline
    L.GogsL Offline
    L.Gogs
    wrote on 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
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on 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.GogsL Taz742T 2 Replies Last reply
      0
      • sierdzioS sierdzio

        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.GogsL Offline
        L.GogsL Offline
        L.Gogs
        wrote on last edited by L.Gogs
        #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.

        jsulmJ 2 Replies Last reply
        0
        • L.GogsL L.Gogs

          @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.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on 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
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on 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.GogsL L.Gogs

              @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.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on 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
              • sierdzioS sierdzio

                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.

                Taz742T Offline
                Taz742T Offline
                Taz742
                wrote on 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.

                jsulmJ 1 Reply Last reply
                0
                • Taz742T Taz742

                  @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?

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @Taz742 What is "Json server"?

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

                  Taz742T 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @Taz742 What is "Json server"?

                    Taz742T Offline
                    Taz742T Offline
                    Taz742
                    wrote on last edited by
                    #9

                    @jsulm sorry.
                    We need a web server?

                    Do what you want.

                    jsulmJ 1 Reply Last reply
                    0
                    • Taz742T Taz742

                      @jsulm sorry.
                      We need a web server?

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on 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

                      Taz742T 1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @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?

                        Taz742T Offline
                        Taz742T Offline
                        Taz742
                        wrote on 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.

                        jsulmJ 1 Reply Last reply
                        0
                        • Taz742T Taz742

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

                          How is it related to JSON + Qt?

                          Yes, I'm interested in it.

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on 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

                          Taz742T 1 Reply Last reply
                          0
                          • jsulmJ jsulm

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

                            Taz742T Offline
                            Taz742T Offline
                            Taz742
                            wrote on last edited by
                            #13

                            @jsulm Where to continue reading?

                            Do what you want.

                            jsulmJ 1 Reply Last reply
                            0
                            • Taz742T Taz742

                              @jsulm Where to continue reading?

                              jsulmJ Offline
                              jsulmJ Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on 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