When I access the web service using soapUI I get the correctly formatted text. But when I use the python code, I get a dictionary with all rows in a single allBusType key.
from pysimplesoap.client import SoapClient
url = 'http://180.92.171.93:8080/UPSRTCServices/UPSRTCService?wsdl'
namespace = 'http://service.upsrtc.trimax.com/'
client = SoapClient(wsdl=url, namespace=namespace, trace=True)
print client.GetBusTypes()
The above code returns the following:
{'return': {'allBusType': [{'busName': u'AC SLEEPER'}, {'busType': u'ACS'}, {'ischildconcession': u'N'}, {'isseatlayout': u'N'}, {'isseatnumber': u'N'}, {'busName': u'AC-JANRATH'}, {'busType': u'JNR'}, {'ischildconcession': u'N'}, {'isseatlayout': u'Y'}, {'isseatnumber': u'Y'},....
As per the following screen, soapUI is returning all the bus stops as separate tag. (And not all stops in a single tag as above)
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns3:GetBusTypesResponse xmlns:ns2="com.trimax.upsrtc.xml.jaxb.model" xmlns:ns3="http://service.upsrtc.trimax.com/">
<return>
<allBusType>
<busName>AC SLEEPER</busName>
<busType>ACS</busType>
<ischildconcession>N</ischildconcession>
<isseatlayout>N</isseatlayout>
<isseatnumber>N</isseatnumber>
</allBusType>
<allBusType>
<busName>AC-JANRATH</busName>
<busType>JNR</busType>
<ischildconcession>N</ischildconcession>
<isseatlayout>Y</isseatlayout>
<isseatnumber>Y</isseatnumber>
</allBusType>
I will like to know if this is python issue or the server issue.
For each entry there is opening and closing tag called "allBusType" in the soapUI response that is missing in python response. Python output is returning a single row for all entries.