python - Passing arguments into SUDS client statement -
i using suds (like soap) test wsdl files. methods contain types linked further functions. not sure how access variables stored in types displayed. sample code below:
from suds.client import client client=client('http://eample.wsdl') print client   response is:
 ports (1):       (ptz)          methods (4):             absolutemove(ns4:referencetoken profiletoken, ns4:ptzvector destination, ns4:ptzspeed speed, )          types (303):             ns4:ptzspeed   i able access these functions. cannot find documentation on how test functions in suds. want test see if functions work , checking return values. know how this?
i used command below display child functions.
client.factory.create('absolutemove.ptzspeed.speed.pantilt')   i main problem passing values functions , getting return values.
i have tried pass arguments parameters have attributes stored in attributes. below shows layout structure of parameters i'm trying access.
(absolutemove){     profiletoken = none     destination =        (ptzvector){          pantilt =              (vector2d){                _x = ""                _y = ""                _space = ""             }          zoom =              (vector1d){                _x = ""                _space = ""             }       }    speed =        (ptzspeed){          pantilt =              (vector2d){                _x = ""                _y = ""                _space = ""             }          zoom =              (vector1d){                _x = ""                _space = ""   the parameters more complex entering simple values.
try invoke method on service:
from suds.client import client client=client('http://eample.wsdl') res = client.service.absolutemove(profile_token, destination, speed) print res   you'll need determine values put in arguments absolutemove method.
Comments
Post a Comment