View Single Post
mece's Avatar
Posts: 1,111 | Thanked: 1,985 times | Joined on Aug 2009 @ Åbo, Finland
#2
Originally Posted by zolakt View Post
Hi,

I'm having a lot of problem making a SAOP client in Python.
I have tried various methods, but non of them seems to work for me.

I have a .Net web service, available from an IIS server on another machine.
I can access it trough browser, and everything works fine.

The function I need to call is .RunTranslate.
It takes one string argument inText, and 2 custom enumeration arguments, inLang and outLang (I suppose they are serialized/deserialized as string), a returns one string value as translation.

Now, what I have tried:

1. SOAPy library
import soap
server = soap.get_proxy('http://192.168.1.72/sts/TranslatorService.asmx?wsdl','wsdl')
translation = server.RunTranslate(inText="translate this", inLang="English", outLang="German")

I get the following error:
File "/usr/lib/python2.5/site-packages/soap.py", line 263, in __init__
sys.exit(1)
NameError: global name 'sys' is not defined
[...]
perhaps some bug in the soap library there?
missing an import sys?
__________________
Class .. : Meddler, Thread watcher, Developer, Helper
Humor .. : [********--] Alignment: Pacifist
Patience : [*****-----] Weapon(s): N900, N950, Metal music
Agro ... : [----------] Relic(s) : N95, NGage, Tamyia Wild One

Try Tweed Suit for your hardcore twittering needs
http://twitter.com/mece66
I like my coffee black, like my metal.