Could you simplify the alternative suggested with a brief example?
Thx
Could you simplify the alternative suggested with a brief example?
Thx
I was fighting with web-services recently and ended (since I am not yet a commercial user and don't have access to qtsoap) just duplicating "post" method with QNetworkManager. I spent quite some time trying, until I installed http sniffer and it showed me exactly where I was wrong. After the sniffer pointed to the difference between request made from the browser and from my Qt code the rest was trivial.
In short, I suggest you to do the same. Install the sniffer, catch the request to the web-service made from the browser and then use QNetworkManager to construct "post" request...
rmagro (18th November 2008)
Someone knows how to translate the following code usign QSoap??
"Anagrafica" is the service and "execute" is the method to be invoked..Qt Code:
String request = " here should be the xml request"; String url = " here is the we service provider url"; Service service = new Service(); Call call = (Call)service.createCall(); call.setTargetEndPointAddress(new URL(url)); call.setOperationName(new QName("Anagrafica", "execute") String response = (String)call.invoke(new Object[] {request});To copy to clipboard, switch view to plain text mode
Thanka a lot for your time,
Roby
With QtSoap it would be something like:
Qt Code:
QtSoapHttpTransport transport; transport.setHost(url.host(), url.port()); connect(&transport, SIGNAL(reponseReady()), this, SLOT(...))); QtSoapMessage msg; msg.setMethod("Anagrafica:execute"); transport.submitRequest(msg, url.path());To copy to clipboard, switch view to plain text mode
many thanks for your suggestion..
I will try and let you know about my progress
THX
Roby
I'm not sure I understand QtSoapMessage is a request. If you mean the actual data to send then you have to form a proper structure using QtSoapStruct or similar.
What I meant is that in the axix example I provided there was an XML request that represented the actual data to send..
Using QtSoap where Should I put my xml request (yeah, the actual data to send or "payload" if you prefer).
Should I use something like QtSoapMessage::setContent or something else?
THX
You have to construct the xml structure using QtSoap, not using external xml mechanisms. You fill objects which are then transformed into a properly formed xml based soap request.
Oh come on! Please read the docs and see the examples. I already told you everything you need to know.
rmagro (24th November 2008)
Bookmarks