Knowing the intricacies of SOAP, WSDL, and XSD is very helpful. However, coding every little detail is a headache. For requests, we’d have to extensively manipulate and parse an XML document. Quite frankly, SOAP comes with a lot of overhead. We’d have to create the Envelope
and Header
by hand, and manually create the message body. When data is returned, we’d have to create our own parser to loop through an XML-based SOAP document. We also haven’t even mentioned creating our own sockets to talk to the server. That’s a lot of things that can go wrong. Fortunately, PHP 5 has a great interface for talking with SOAP. Much of the dirty details are hidden away and completed by the client. We don’t have to manually touch the request and response at all. In fact, we really don’t need to do anything in XML. Further, the ugly networking connections are executed for us automatically.
PHP 5’s SOAP interface is a built-in extension called SOAP. This extension actually comprises six classes...