Results 1 to 12 of 12

Thread: qtsoap with .net webservice

  1. #1
    Join Date
    Sep 2007
    Posts
    5
    Qt products
    Qt3
    Platforms
    Unix/X11

    Question qtsoap with .net webservice

    Hallo.
    I downloaded the enterprise qtsoap library from trolltech's website, and got the call to webservices working, only to a point.

    I am trying to talk to a asp.net 2.0 webservice from a Qt application. The webservice talks SOAP 1.1, and so does my library.

    The problem that I am getting is that the webservce does not seem to return any info. It sends the method call. Hangs, and then disconnects me from the host, after a few minuets.

    I added some debug output in the qtsoap code, to try and see what is going on. The first thing that caught my attention wat the returned soap message:
    Qt Code:
    1. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >
    2. <SOAP-ENV:Body xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    3. <SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    4. <Faultcode xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" >SOAP-ENV:VersionMismatch</Faultcode>
    5. <Faultstring xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" >XML parse error</Faultstring>
    6. <SOAP-ENV:Faultdetail xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    7. <ParseError xsi:type="xsd:string" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" >unexpected end of file at line 1, column 1</ParseError>
    8. </SOAP-ENV:Faultdetail>
    9. </SOAP-ENV:Fault>
    10. </SOAP-ENV:Body>
    11. </SOAP-ENV:Envelope>
    To copy to clipboard, switch view to plain text mode 

    It seems that a version mismatch is occurring. Could it be that the server does not talk my version (Schema) of SOAP?

    The ASP.net definition of the webservice is as follows. This is what it wants to see.

    Qt Code:
    1. <?xml version="1.0" encoding="utf-8"?>
    2. <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    3. <soap:Body>
    4. <GetTestSite xmlns="http://www.emss.co.za/VodacomComplianceServices">
    5. <id>int</id>
    6. </GetTestSite>
    7. </soap:Body>
    8. </soap:Envelope>
    To copy to clipboard, switch view to plain text mode 

    Another thing that was more disconcerting is that the QHttp::request method returns an id of 1 the first (and only) time i call it. Then when the QHttp::requestFinished signal is received, the ID that it gets is 2. Strange.

    Any help in this regard will be helpful!

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qtsoap with .net webservice

    First, the SOAP versions are different: http://www.w3.org/1999/XMLSchema-instance vs http://www.w3.org/2001/XMLSchema-instance.

    Regarding the QHttp::request, do you have any firewall on the server with the ASP webservice?
    Anyway, the "1" is the http request ID, used to identify which request finished when you get requestFinished.

    If you get 2, it means it is for another http operation you start.
    You will get 1 only when the request is finished, and since you don't get it, I assume the request didn't finish yet.
    Last edited by marcel; 19th September 2007 at 14:54.

  3. #3
    Join Date
    Sep 2007
    Posts
    5
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: qtsoap with .net webservice

    The fire wall can't be the problem. the webservice server is also a webservice, so the https (443) port is open. This is the port that I am connecting with.

    The soap version thing: if it is not configurable on server side, then I am going to have to rewrite qtsoap for the new version?

  4. #4
    Join Date
    Sep 2007
    Posts
    5
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: qtsoap with .net webservice

    It seems that the problem is that the webservice is on a Sequre port. A valid message is sent to the server, but because it is not encrypted, the message is not seen as valid.

    Any tips on getting Qtsslsocket working with qsoap?

  5. #5
    Join Date
    Sep 2007
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qtsoap with .net webservice

    I encoutered the same problem and I tried to modify the QtSoap source code for using with Https.

    Without success

  6. #6
    Join Date
    Sep 2007
    Posts
    5
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: qtsoap with .net webservice

    I think the only clean solution is to move to qt 4.
    They have (apparently) HTTPS support built into there QHttp class.

  7. #7
    Join Date
    Sep 2007
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qtsoap with .net webservice

    I'm already using Qt4 and I tried to modify the Qt Soap source code without success
    The web Service was made with nuSoap library and works fine with the proxy generated by visual studio...

  8. #8
    Join Date
    Sep 2007
    Posts
    5
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: qtsoap with .net webservice

    Are you using the QT4 qsoap library?
    If you are, and it still does not work, then perhaps a Qt support person should answer for this.

  9. #9
    Join Date
    Dec 2007
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qtsoap with .net webservice

    Quote Originally Posted by All Jinx View Post
    I'm already using Qt4 and I tried to modify the Qt Soap source code without success
    The web Service was made with nuSoap library and works fine with the proxy generated by visual studio...
    Hi,

    you might also want to take a look at this:
    http://www.clausmark.com/feast_en.phtml

    FEAST can also be used in a pure client role. The advantage over Qt SOAP is that is supports generating the client (and server) code based on the WSDL description (that you should get from nuSoap)

    /Niklas

  10. #10
    Join Date
    Jul 2007
    Posts
    121
    Thanks
    38
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: qtsoap with .net webservice

    This issue is of importance to me as well, because shortly I will have to do the same thing - interacting with .net webservice from qt client. Per suggesion I looked at FEAST website and, besides general description of what it is, did not find any downloads of the product or an option to purchase it. Another vaporware?

  11. #11
    Join Date
    Dec 2007
    Posts
    6
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: qtsoap with .net webservice

    FEAST ships right now. Pls. contact Clausmark for a quotation.

    There is also a demo under
    http://www.clausmark.com/feast_demo_en.phtml

    and a solution brief under

    http://dist.trolltech.com/pdf/Clausm...nBrief_web.pdf

    /Niklas

  12. #12
    Join Date
    Feb 2009
    Posts
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: qtsoap with .net webservice

    I was getting the exactly same error message. Here how I resolved it.

    I was using asp.net developement server i.e. I have started the service in debug mode,so it was launched at port 1408 not the web port 80.
    So I used

    QtSoapHttpTransport::setHost(const QString &host, QHttp::ConnectionMode mode, int port)
    & gave 1408 as port.

Similar Threads

  1. Qt configure with msvc.net
    By jivanr in forum Installation and Deployment
    Replies: 1
    Last Post: 11th June 2007, 08:17
  2. Qt Cryptographic Architecture
    By vermarajeev in forum Qt Programming
    Replies: 6
    Last Post: 9th February 2007, 13:15
  3. problem with linking
    By mickey in forum Qt Programming
    Replies: 49
    Last Post: 12th August 2006, 21:41

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.