0

I am working on a application where my requirement is to consume a webservice and capture the xml data by parsing it. I am not sure about how to consume a webservice and capture the xml data. I am not able to decide which Parser to use to parse the XML. My webservice goes this way "xxxxxxxxxxxxxxxxxxxxxx/test/getTestSchema.cfm?sid=10335&course=ALZ_PATIENT&lesson=991&examtype=R&nStartRow=1&nEndRow=25&videoid=5" . Can anyone please help me out on how to consume a webservice and parse it with a sample code? That would be very helpful. Thanks a lot

Pradeep Reddy Kypa
  • 3,992
  • 7
  • 57
  • 75
  • See this http://stackoverflow.com/questions/981700/touchxml-parsing-xml-attributes. You may parse by touch XML Parsing method – HarshIT Mar 02 '12 at 09:01

1 Answers1

1

We once had used sudzc to consume SOAP based web service in one of our apps. Then used TouchXML to parse the XML returned. It was quite easy and worked very well. sudzc takes WSDL and actually generates code to consume the web service! TouchXML tutorials are abundant on the net.

Manali
  • 577
  • 4
  • 11
  • sudzc is asking to enter WSDl type. But i am not sure how a WSDl link looks like. My Webservice URL looks like "http://xxxxxxxx/test/getTestSchema.cfm?sid=10335&course=ALZ_PATIENT&lesson=991&examtype=R&nStartRow=1&nEndRow=25&videoid=5" Can u please explain me how to generate the code for the above mentioned URl? – Pradeep Reddy Kypa Mar 02 '12 at 10:43
  • http://www.codeproject.com/Articles/1166/Layman-s-SOAP and http://www.ibm.com/developerworks/webservices/library/ws-soap/index.html?dwzone=ws could be a good starting point. – Manali Mar 02 '12 at 11:13
  • SOAP uses XML over http to send request to server. If you are not using SOAP, making a plain http request instead you could use ASIHTTPRequest library for communicating with server and then use some other library to parse the XML. Ofcourse there are other libraries that will fetch and parse data, but I might not be able to comment on their merits/demerits. ASIHTTPRequest worked very well for us. There is ample documentation abt it. – Manali Mar 02 '12 at 11:29