cancel
Showing results for 
Search instead for 
Did you mean: 

how to call a method in SAP Web Service using Python

former_member592880
Participant
0 Kudos

hello,

i am trying to call a web service using python. I'm able to call the service but im not able to call the method in it. how do i call the method?

python:

from suds.client import Client
import json
wsdl_url = "http://192.168.1.10:8000/sap/bc/srt/wsdl/flv_10002A111AD1/srvc_url/sap/bc/srt/rfc/sap/ziot_service/900/ziot_service1/ziot_service1?sap-client=900"
client = Client(url=wsdl_url,username="<username>",password="<password>")
# print(client)
x = client.service[0].Methods[1].ZIOT_SERVICE1()
print(x)

error:

  File "webservice0.py", line 6, in <module>
    x = client.service[0].Methods[1].ZIOT_SERVICE1()
  File "C:\Users\Sid-PC\AppData\Local\Programs\Python\Python37\lib\site-packages\suds\client.py", line 511, in __getattr__
    return self[name]
  File "C:\Users\Sid-PC\AppData\Local\Programs\Python\Python37\lib\site-packages\suds\client.py", line 524, in __getitem__
    raise MethodNotFound(qn)
suds.MethodNotFound: Method not found: 'ziot_service1.ziot_service1.Methods'

regards

Siddharth Shaligram

Accepted Solutions (0)

Answers (0)