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. KDSoap soapAction can not be empty
Forum Updated to NodeBB v4.3 + New Features

KDSoap soapAction can not be empty

Scheduled Pinned Locked Moved Unsolved General and Desktop
soapactiokdsoap
6 Posts 3 Posters 2.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.
  • T Offline
    T Offline
    TheQtFan
    wrote on last edited by TheQtFan
    #1

    Hello,

    I want to try out KDSoap-CodeGen. The Code-Generation works very well, but if I start to call methods via the generated classes , the SOAP-Webservice returns Fault code soap:Server: The given SOAPAction http://webservice/doLogin does not match an operation. Heres an excerpt of the wsdl file:

    ....
    <operation name="doLogin">
    <soap:operation soapAction=" " />
    <input>
    <soap:body use="literal" />
    </input>
    <output>
    <soap:body use="literal" />
    </output>
    </operation>
    ....

    It describes, that the http-Header soapAction should be empty, but if I look at the tcp-Streams the header is not empty. How can I achieve the emptiness of that header? The setHeader method of the KDSoapClientInterface did not do the trick. I could hack the wsdl-file, if I change soapAction="#blank#" to soapAction="#noblank#" (I tried that and it works;-) ), but thats not the way, I want achieve it.

    Maybe someone could help me!

    Thank you

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      I'd recommend contacting the KDAB folks about that matter, they are the more knowledgeable about it.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      T 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        I'd recommend contacting the KDAB folks about that matter, they are the more knowledgeable about it.

        T Offline
        T Offline
        TheQtFan
        wrote on last edited by
        #3

        @SGaist
        Thank you! Ok I did that. I'll post the solution here, if it's solved!

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DavidFaure
          wrote on last edited by
          #4

          The single-space as a soapAction in the WSDL file is rather strange and looks like a bug in that WSDL file. But I assume you have no control over it ;)

          http://www.w3.org/TR/wsdl#_soap:operation and http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383528 don't have much to say about it, they just say the value of soapAction is a URI, and is mandatory when using HTTP.
          Maybe some wrong implementation rejects the empty string, so someone hacked around it by using a single space...

          http://www.ws-i.org/profiles/basicprofile-1.1-2004-08-24.html#SOAPAction_HTTP_Header says it must be quoted. It also says empty is fine ;)

          Anyhow, this is easy to change in the wsdl parser.
          Want to try applying this patch to kdwsdl2cpp/wsdl/soapbinding.cpp?
          http://kdab.com/~dfaure/2015/soapbinding.cpp.diff
          Let me know how it goes.

          Can you confirm that at least one other implementation of SOAP sends an empty SoapAction header, based on this WSDL file? I wouldn't want to commit this if it creates some incompatibility...

          1 Reply Last reply
          1
          • T Offline
            T Offline
            TheQtFan
            wrote on last edited by
            #5

            Thanks!
            I agree completely to your response.
            Your patch solves the problem. No I could not confirm it. Your commit wouldn't create incompatibilities.

            1 Reply Last reply
            0
            • D Offline
              D Offline
              DavidFaure
              wrote on last edited by
              #6

              OK, I pushed the fix.

              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