0 Replies - 142 Views - Last Post: 27 September 2013 - 03:31 AM Rate Topic: -----

#1 straygrey  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 04-October 08

Raspberry python connect to webservice on Windows 7 PC/Server

Posted 27 September 2013 - 03:31 AM

In an attempt to interface with a webservice on a Windows 7 server I have started writing the following:-

#!/usr/bin/python
import time
from suds.client import Client
url = "http://192.168.0.10//CISWebService/Mediamanager.asmx?WSDL"
client = Client(url)
print client
result = client.service[1].GetSequenceNo("CIS")
print client




and I execute it via
./DevitSoap2.py > test.txt
on my Ubuntu 13.04 laptop
in return I get
Suds ( https://fedorahosted.org/suds/ ) version: 0.4.1 (beta) build: R703-20101015

Service ( MediaManager ) tns="http://tempuri.org/"
Prefixes (1)
ns0 = "http://tempuri.org/"
Ports (2):
(MediaManagerSoap)
Methods (10):
GetConfig()
GetMediaList(xs:string strTerminalname, )
GetMediaListAll(xs:string strTerminalname, )
GetRouterXml(xs:string xml, ArrayOfString ips, )
GetSequenceNo(xs:string strTerminalname, )
GetSoundList(xs:string strTerminalname, )
GetTerminalDataXML(xs:string strTerminalname, )
GetTerminalSoundXML(xs:string strTerminalname, )
SetSequenceNo(xs:string strTerminalname, )
UpdateClientMediaLogTime(ArrayOfClientMediaLogTime lsLogs, )
Types (4):
ArrayOfClientMediaLogTime
ArrayOfString
ClientMediaLogTime
SequenceNoInfo
(MediaManagerSoap12)
Methods (10):
GetConfig()
GetMediaList(xs:string strTerminalname, )
GetMediaListAll(xs:string strTerminalname, )
GetRouterXml(xs:string xml, ArrayOfString ips, )
GetSequenceNo(xs:string strTerminalname, )
GetSoundList(xs:string strTerminalname, )
GetTerminalDataXML(xs:string strTerminalname, )
GetTerminalSoundXML(xs:string strTerminalname, )
SetSequenceNo(xs:string strTerminalname, )
UpdateClientMediaLogTime(ArrayOfClientMediaLogTime lsLogs, )
Types (4):
ArrayOfClientMediaLogTime
ArrayOfString
ClientMediaLogTime
SequenceNoInfo

Suds ( https://fedorahosted.org/suds/ ) version: 0.4.1 (beta) build: R703-20101015

Service ( MediaManager ) tns="http://tempuri.org/"
Prefixes (1)
ns0 = "http://tempuri.org/"
Ports (2):
(MediaManagerSoap)
Methods (10):
GetConfig()
GetMediaList(xs:string strTerminalname, )
GetMediaListAll(xs:string strTerminalname, )
GetRouterXml(xs:string xml, ArrayOfString ips, )
GetSequenceNo(xs:string strTerminalname, )
GetSoundList(xs:string strTerminalname, )
GetTerminalDataXML(xs:string strTerminalname, )
GetTerminalSoundXML(xs:string strTerminalname, )
SetSequenceNo(xs:string strTerminalname, )
UpdateClientMediaLogTime(ArrayOfClientMediaLogTime lsLogs, )
Types (4):
ArrayOfClientMediaLogTime
ArrayOfString
ClientMediaLogTime
SequenceNoInfo
(MediaManagerSoap12)
Methods (10):
GetConfig()
GetMediaList(xs:string strTerminalname, )
GetMediaListAll(xs:string strTerminalname, )
GetRouterXml(xs:string xml, ArrayOfString ips, )
GetSequenceNo(xs:string strTerminalname, )
GetSoundList(xs:string strTerminalname, )
GetTerminalDataXML(xs:string strTerminalname, )
GetTerminalSoundXML(xs:string strTerminalname, )
SetSequenceNo(xs:string stSuds ( https://fedorahosted.org/suds/ ) version: 0.4.1 (beta) build: R703-20101015

Service ( MediaManager ) tns="http://tempuri.org/"
Prefixes (1)
ns0 = "http://tempuri.org/"
Ports (2):
(MediaManagerSoap)
Methods (10):
GetConfig()
GetMediaList(xs:string strTerminalname, )
GetMediaListAll(xs:string strTerminalname, )
GetRouterXml(xs:string xml, ArrayOfString ips, )
GetSequenceNo(xs:string strTerminalname, )
GetSoundList(xs:string strTerminalname, )
GetTerminalDataXML(xs:string strTerminalname, )
GetTerminalSoundXML(xs:string strTerminalname, )
SetSequenceNo(xs:string strTerminalname, )
UpdateClientMediaLogTime(ArrayOfClientMediaLogTime lsLogs, )
Types (4):
ArrayOfClientMediaLogTime
ArrayOfString
ClientMediaLogTime
SequenceNoInfo
(MediaManagerSoap12)
Methods (10):
GetConfig()
GetMediaList(xs:string strTerminalname, )
GetMediaListAll(xs:string strTerminalname, )
GetRouterXml(xs:string xml, ArrayOfString ips, )
GetSequenceNo(xs:string strTerminalname, )
GetSoundList(xs:string strTerminalname, )
GetTerminalDataXML(xs:string strTerminalname, )
GetTerminalSoundXML(xs:string strTerminalname, )
SetSequenceNo(xs:string strTerminalname, )
UpdateClientMediaLogTime(ArrayOfClientMediaLogTime lsLogs, )
Types (4):
ArrayOfClientMediaLogTime
ArrayOfString
ClientMediaLogTime
SequenceNoInfo


now this is all great but my question is how do I call each of these functions with parameters.
The call I immediately need to make is to GetSequenceNo() which requires a parameter of "CIS" in my current configuration.
How do I do this ?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1