Results 1 to 2 of 2

Thread: QtSoap problems

  1. #1
    Join Date
    Nov 2009
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QtSoap problems

    Hi

    I am attempting to use qtsoap to talk to a MFC SOAP service...

    The lack of WSDL support is a pain (anyone know what happened to http://www.clausmark.com/feast_en.phtml?), so I am packet sniffing a working client to see what I should be sending.

    To create the soap message I am building a DOM document, and then using request.setContent(xmlDocument) to add the document to the SOAP message.

    This works fine with a simple request like:

    Qt Code:
    1. <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
    2. <SOAP-ENV:Body xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    3. <MyProc xmlns="http://tempuri.org/">
    4. <Index>0</Index>
    5. <Duration>0</Duration>
    6. <MediaId>test</MediaId>
    7. </MyProc >
    8. </SOAP-ENV:Body>
    9. </SOAP-ENV:Envelope>
    To copy to clipboard, switch view to plain text mode 


    But I have run into difficulty with a more complicated example.

    When I packet sniff the data, the test client uses a namespace in the middle of the XML, however, the "Configuration" element itself doesn't have a prefix:

    Qt Code:
    1. <InitialiseMyStuff xmlns="http://tempuri.org/">
    2. <Index>0</Index>
    3. <Configuration xmlns:a="http://schemas.datacontract.org/2004/07/MyTest.MyTestApp" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
    4. <a:TestA>0</a:TestA>
    5. <a:TestB>1</a:TestB>
    6. <a:TestC>2</a:TestC>
    To copy to clipboard, switch view to plain text mode 

    I can't work out how to create the "Configuration" element as above,
    xmlDocument.createElementNS("http://schemas.datacontract.org/2004/07/MyTest.MyTestAppt", "a:Configuration") gives me:

    Qt Code:
    1. <a:Configuration xmlns:a="http://schemas.datacontract.org/2004/07/MyTest.MyTestApp">
    To copy to clipboard, switch view to plain text mode 

    And when I try this with setContent, the a: are stripped from the child nodes.

    Any ideas?

  2. #2
    Join Date
    Apr 2011
    Posts
    195
    Thanks
    49
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QtSoap problems

    Hi voodig,

    I am warming up your thread...
    Do you solved the problem?

    greets

Similar Threads

  1. Replies: 3
    Last Post: 4th December 2009, 08:52
  2. Mac OSX OpenGL problems
    By tksharpless in forum Qt Programming
    Replies: 0
    Last Post: 23rd March 2009, 17:27
  3. qtsoap with .net webservice
    By drbergie in forum Qt Programming
    Replies: 11
    Last Post: 12th February 2009, 08:46
  4. problems creating toolbar...(do see the attachment)!
    By sumit in forum Qt Programming
    Replies: 15
    Last Post: 10th September 2008, 11:23
  5. Problems with scope and C header functions
    By waldowoc in forum Newbie
    Replies: 5
    Last Post: 5th August 2008, 11:29

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.