Friday 9 September 2011

PHP and web services

I worked in a variety of online services, some people define their own XML using DTDs or schema, some people use the SOAP, WSDL (Web Services Description Language), or both. In all cases, I prefer with the XML directly, and if you work with WSDL, you must find the structure of XML requests / responses. I recently starting using SoapUI-3.5 will help me in this.

What I usually do for XML Web services built on demand and get the answer, then use PHP SimpleXMLElement to work with this response. SimpleXMLElement makes it incredibly easy to work with XML. With WSDL, you may need some time to understand the XML request / response. Fortunately, my teammate, Tri, directed me to SoapUI-3.5. Simply enter the URL of the Web service and generates XML structures for all requests / responses. This has turned into a real time saver.

No comments:

Post a Comment