Lye - a COM to SOAP gateway...
Andrew Dalke
dalke at acm.org
Fri Sep 15 00:46:38 EDT 2000
The newest version of Lye is at http://www.biopython.org/~dalke/lye/ .
I've put in Alex's suggestions, so here's the VB example:
Sub TestSOAP()
Set factory = CreateObject("Lye.Factory")
Set soap = factory("http://localhost:8000")
MsgBox soap.echo("Andrew")
End Sub
Because VB is case-insensitive, and lye forces lowercase, I'm testing
out a way to allow upper case. Suppose the SOAP interface requires
"toFahrenheit" for a function to convert temperature scales, and it
must be in that case.
soap.toFahrenheit(100.0)
would fail because Lye converts the "toFahrenheit" call into "tofahrenheit".
Instead, use
soap("toFahrenheit", 100.0)
I chose this syntax because there's no way to confuse one type of call
with the other. It also allows calls to SOAP methods which aren't legal
VB or Python spellings.
>> Actually, I'm thinking of using the factory object as a simple
>> service locater, so 'factory.Service("xmethods-Temperature")'
>> returns, say, the SOAP interface to the weather lookup service
>> mentioned at http://www.xmethods.com/ . If I knew what it was
>> talking about. :)
>
>A very good idea, it seems to me.
That's down the road when I get some time again. As it is, I've
put the code in the public domain, so feel free to do what you with
with it. Please! (As I've said, I don't know much about SOAP nor
COM nor VB.)
Andrew
dalke at acm.org
More information about the Python-list
mailing list