Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to call WCF from python
#5
(Dec-20-2018, 04:00 AM)nilamo Wrote: Oh I get it now, thanks for clarifying. As long as the service you're connecting to is available to the network, then yes that should be what you need to use.
Thanks nilamo for helping
from suds.client import Client

print ('Connecting to Service...')
wsdl = "http://serviceurl.com/services/message.asmx"
client = Client(wsdl)
result = client.service.Push_Notification(0, 1, 1, TestingPython)

print (result)
what's the Error and how to remove it
Error:
Connecting to Service... Traceback (most recent call last): File "/usr/lib/python3.5/xml/sax/expatreader.py", line 210, in feed self._parser.Parse(data, isFinal) xml.parsers.expat.ExpatError: mismatched tag: line 61, column 16 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/pi/ST/DB/test4.py", line 5, in <module> client = Client(wsdl) File "/usr/local/lib/python3.5/dist-packages/suds/client.py", line 115, in __init__ self.wsdl = reader.open(url) File "/usr/local/lib/python3.5/dist-packages/suds/reader.py", line 150, in open d = self.fn(url, self.options) File "/usr/local/lib/python3.5/dist-packages/suds/wsdl.py", line 136, in __init__ d = reader.open(url) File "/usr/local/lib/python3.5/dist-packages/suds/reader.py", line 74, in open d = self.download(url) File "/usr/local/lib/python3.5/dist-packages/suds/reader.py", line 100, in download return sax.parse(string=content) File "/usr/local/lib/python3.5/dist-packages/suds/sax/parser.py", line 133, in parse sax.parse(source) File "/usr/lib/python3.5/xml/sax/expatreader.py", line 110, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib/python3.5/xml/sax/xmlreader.py", line 125, in parse self.feed(buffer) File "/usr/lib/python3.5/xml/sax/expatreader.py", line 214, in feed self._err_handler.fatalError(exc) File "/usr/lib/python3.5/xml/sax/handler.py", line 38, in fatalError raise exception xml.sax._exceptions.SAXParseException: <unknown>:61:16: mismatched tag
Reply


Messages In This Thread
how to call WCF from python - by Rehan11 - Dec-19-2018, 06:52 PM
RE: how to call WCF from python - by nilamo - Dec-19-2018, 07:06 PM
RE: how to call WCF from python - by Rehan11 - Dec-20-2018, 03:33 AM
RE: how to call WCF from python - by nilamo - Dec-20-2018, 04:00 AM
RE: how to call WCF from python - by Rehan11 - Dec-20-2018, 08:15 AM
RE: how to call WCF from python - by nilamo - Dec-20-2018, 04:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Call pip3 from python folder build by me call pip3 from the /usr/bin Suryavarman 3 3,751 Oct-07-2019, 10:23 PM
Last Post: Suryavarman

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020