Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. how to use gSOAP with 2 different wsdl files
Forum Updated to NodeBB v4.3 + New Features

how to use gSOAP with 2 different wsdl files

Scheduled Pinned Locked Moved Solved Mobile and Embedded
7 Posts 4 Posters 1.2k Views 1 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.
  • G Offline
    G Offline
    Gulsah
    wrote on last edited by
    #1

    hello first of all sorry for my bad english. I need to use two separate web services in my project. Can I create both together and I get an error when I create them separately and add them to the project. Can you help me what should I do to add the two services together?

    jsulmJ 1 Reply Last reply
    0
    • G Gulsah

      hello first of all sorry for my bad english. I need to use two separate web services in my project. Can I create both together and I get an error when I create them separately and add them to the project. Can you help me what should I do to add the two services together?

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

      @Gulsah How is your question related to Qt?

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

      G 1 Reply Last reply
      0
      • jsulmJ jsulm

        @Gulsah How is your question related to Qt?

        G Offline
        G Offline
        Gulsah
        wrote on last edited by
        #3

        @jsulm said in how to use gSOAP with 2 different wsdl files:

        How is your question related to Qt?

        I asked here because I was trying to use web services in a Qt project, but did I add it to the wrong title?

        JonBJ JoeCFDJ 2 Replies Last reply
        0
        • G Gulsah

          @jsulm said in how to use gSOAP with 2 different wsdl files:

          How is your question related to Qt?

          I asked here because I was trying to use web services in a Qt project, but did I add it to the wrong title?

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by
          #4

          @Gulsah
          No, that's fine, it's just that the question/answer has nothing to do with Qt. If nobody answers here you might want to Google for wsdl/soap or where to find a suitable forum.

          G 1 Reply Last reply
          0
          • G Gulsah

            @jsulm said in how to use gSOAP with 2 different wsdl files:

            How is your question related to Qt?

            I asked here because I was trying to use web services in a Qt project, but did I add it to the wrong title?

            JoeCFDJ Offline
            JoeCFDJ Offline
            JoeCFD
            wrote on last edited by JoeCFD
            #5

            @Gulsah Answers from ChatGPT:

             gSOAP is a toolkit for developing SOAP-based web services in C and C++, which can handle multiple WSDL files in the same project.
            
             To use gSOAP with two WSDL files, you would typically follow these steps:
            
            Generate stubs: Use the gSOAP command-line tool soapcpp2 to generate stubs from each of your WSDL files. This will generate C or C++ code that can be used to call the web services described in the WSDLs.
            
            Incorporate the stubs: Include the generated C or C++ files into your project, along with any necessary header files. Depending on your project structure, you may need to modify the generated files to match your naming conventions or build system.
            
            Call the web services: Use the generated code to call the web services described in the WSDL files. You will typically create a client object or use a pre-generated client object to call the web services. The gSOAP toolkit provides many utility functions to simplify this process.
            
            Handle errors: Handle any errors that occur during the web service calls. The gSOAP toolkit provides error-handling functions and macros to simplify this process.
            
            Build and test: Build your project and test the web service calls to ensure that they are working correctly.
            

            Overall, working with two WSDL files in gSOAP is similar to working with a single WSDL file. You just need to generate stubs from both files and incorporate them into your project. Once you have done this, you can call the web services described in either WSDL file using the same gSOAP APIs.

            G 1 Reply Last reply
            0
            • JonBJ JonB

              @Gulsah
              No, that's fine, it's just that the question/answer has nothing to do with Qt. If nobody answers here you might want to Google for wsdl/soap or where to find a suitable forum.

              G Offline
              G Offline
              Gulsah
              wrote on last edited by
              #6

              @JonB Thank you very much, I wrote earlier that Qt may be using two different web services. I did a detailed search on google before but couldn't find what I was looking for. Thank you for your guidance, I will continue to google again.

              1 Reply Last reply
              0
              • JoeCFDJ JoeCFD

                @Gulsah Answers from ChatGPT:

                 gSOAP is a toolkit for developing SOAP-based web services in C and C++, which can handle multiple WSDL files in the same project.
                
                 To use gSOAP with two WSDL files, you would typically follow these steps:
                
                Generate stubs: Use the gSOAP command-line tool soapcpp2 to generate stubs from each of your WSDL files. This will generate C or C++ code that can be used to call the web services described in the WSDLs.
                
                Incorporate the stubs: Include the generated C or C++ files into your project, along with any necessary header files. Depending on your project structure, you may need to modify the generated files to match your naming conventions or build system.
                
                Call the web services: Use the generated code to call the web services described in the WSDL files. You will typically create a client object or use a pre-generated client object to call the web services. The gSOAP toolkit provides many utility functions to simplify this process.
                
                Handle errors: Handle any errors that occur during the web service calls. The gSOAP toolkit provides error-handling functions and macros to simplify this process.
                
                Build and test: Build your project and test the web service calls to ensure that they are working correctly.
                

                Overall, working with two WSDL files in gSOAP is similar to working with a single WSDL file. You just need to generate stubs from both files and incorporate them into your project. Once you have done this, you can call the web services described in either WSDL file using the same gSOAP APIs.

                G Offline
                G Offline
                Gulsah
                wrote on last edited by
                #7

                @JoeCFD
                Thank you very much for your answer, I solved my problem with your guidance and detailed research. Here's what I did in gsoap to help those looking for a solution to the same problem as me:

                wsdl2h -o header.h webservice1.wsdl webservice2.wsdl
                soap2.exe -i -j -n -pheader -ID:\gsoap\import header.h

                1 Reply Last reply
                0
                • G Gulsah has marked this topic as solved on

                • Login

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