You are on page 1of 2

Python 2.6.

4 (r264:75706, Apr 1 2010, 02:56:02)


[GCC 4.4.3 20100226 (Red Hat 4.4.3-8)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from SOAPpy import WSDL
>>> wsdlFile = 'http://chennaiemergency.co.in/sree/s2.php?wsdl'
>>> server = WSDL.Proxy(wsdlFile)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "SOAPpy/WSDL.py", line 67, in __init__
self.wsdl = reader.loadFromString(str(wsdlsource))
File "SOAPpy/wstools/WSDLTools.py", line 47, in loadFromString
return self.loadFromStream(StringIO(data))
File "SOAPpy/wstools/WSDLTools.py", line 28, in loadFromStream
document = DOM.loadDocument(stream)
File "SOAPpy/wstools/Utility.py", line 602, in loadDocument
return xml.dom.minidom.parse(data)
File "/usr/lib/python2.6/site-packages/_xmlplus/dom/minidom.py", line 1915, in
parse
return expatbuilder.parse(file)
File "/usr/lib/python2.6/site-packages/_xmlplus/dom/expatbuilder.py", line 930
, in parse
result = builder.parseFile(file)
File "/usr/lib/python2.6/site-packages/_xmlplus/dom/expatbuilder.py", line 207
, in parseFile
parser.Parse(buffer, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 5
>>> server = WSDL.Proxy(wsdlFile)
>>> server.hospital('13.12','80.1')
'13.123805~80.144904~Sir Evans Steadford Hospital~Private~Ambattur Chennai~Ambat
tur~600053'
>>> server.soapproxy.config.dumpSOAPOut = 1
>>> server.soapproxy.config.dumpSOAPIn = 1
>>> abhi = server.hospital('13.12','80.1')
*** Outgoing SOAP ******************************************************
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
>
<SOAP-ENV:Body>
<ns1:hospital xmlns:ns1="urn:ChnEmergency" SOAP-ENC:root="1">
<v1 xsi:type="xsd:string">13.12</v1>
<v2 xsi:type="xsd:string">80.1</v2>
</ns1:hospital>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
************************************************************************
*** Incoming SOAP ******************************************************
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="ht
tp://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSc
hema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http
://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:hospitalResponse xmln
s:ns1="urn:ChnEmergency"><return xsi:type="xsd:string">13.123805~80.144904~Sir E
vans Steadford Hospital~Private~Ambattur Chennai~Ambattur~600053</return></ns1:h
ospitalResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
************************************************************************
>>> abhi
'13.123805~80.144904~Sir Evans Steadford Hospital~Private~Ambattur Chennai~Ambat
tur~600053'
>>>

You might also like