I though it’s be easier if I just build it as an xml, forgetting all the soap hassle (which I never done either)… But I am not getting it right…
Any help, guidance or tips will be very much apreciatted…
Hey Tim…
Yes, I DO need to make other communications.
Actually as a long term strategy I would like to learn how to create the XML.
I thought about just replacing the [fields] but then I should create a constant for every message I need to send and deal with the '"'quotes, etc. It’s not a very elegant solution, is it?
No and you should not do that. What I meant by “kill it with fire” was it’s a bad idea, highly inefficient, but it should work.
If you’re going to make more than one communication you should find out the best means to do so. Unfortunately, I do not have any insight into that matter as I haven’t needed to communicate by SOAP in my experience yet.
With anything that has a regular form such as XML, create helper methods that take most of the drudgery out of it. I find the Xojo xml class rather cumbersome when it comes to creating a document piece by piece. It’s great for working with an existing document, but no so much when creating one. I personally wrote methods that put the document together using strings and arrays, but you could just as easily automate creation of xml using the Xojo XMLNode as storage. It would certainly be more “proper”. I posted my code somewhere on the forum. I could dig it out if need be.
Hey Tim… I’d be very interested in looking/using your methods, I am sure they would be of great use and I’ll probably learn a lot.
If you can find easily where you post that code, and share a link I’d appreciate. I can also lookup in the forum myself but Im not sure where where to start…
b:/ XML inside XML often needs to be ‘wrapped’ inside a [[CODE section
c/ some characters may need to be ‘escaped’ such as & , £ and even carriage returns in text
You can send the message as an HTTP POST message
The response … you could use INSTR to look for <HOTELXYZ or whatever, and parse from there
But better too pop it into an XMLDocument and use XQL to find a node and check the value.
That’s what I do, too. I create the xml to send “by hand”, send it with a POST message, then put the response into an XMLDocument and use XQL to pull out the pieces I’m interested in. Works great.