Desktop SOAP Help

I am totally lost with web stuff… I need to get data out of a SOAP Service… So I looked at the docs for the Xojo SOAP classes and got totally confused… The Docs assume you know what all the parameters mean …

I was hoping one kind soul could help me get started …

These are the docs for the call says it can be dome in SOAP 1.1 or 1.2. Here are the 1.1 docs that I used.

[code]POST /Search.asmx HTTP/1.1
Host: www.chemspider.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: “http://www.chemspider.com/SimpleSearch

<?xml version="1.0" encoding="utf-8"?>

<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/”>
soap:Body

string
string

</soap:Body>
</soap:Envelope>[/code]

Here is the code I tried:

[code] Dim sm As New SoapMethod

Sm.methodNamespace = “www.chemspider.com
SM.action = “http://www.chemspider.com/SimpleSearch
SM.Parameter(“query”) = “85-44-9”
SM.Parameter(“token”) = “My Security Token” ’ not the real value obviously
SM.url = “www.chemspider.com/Search.asmx

Dim Sr As SOAPResult = Sm.Invoke(“SimpleSearch”)

Break
[/code]

In the debugger Sr.Error is true and the message is “Empty Query”

Can anybody tell me what is wrong here?
Thanks,

  • Karen

Karen,

Based on this page, it looks like you can submit simple GET requests and get back XML responses. That might help you to avoid the SOAP service entirely.

  • Tim

I would download paw from luckymarmot.com

once you get the call working
it generates xojo code for you

it made my life so much easier.

I am not going to use SOAP, and will use HTTPsocket.Get with a time putt (I need this to be synchronous )… I will need to do up to 600 or 1000 or more Gets isn a loop …

My question is what would be a good timeout (efficient but should work(? if it times out should I retry once? I need reliability but I don’t want the user to weight too long!

Thanks

  • Karen