Quickshiftin - Clever Crazy Code

SoapClient with Attachments for PHP

September 1st, 2013

Have you ever needed to upload or download a file over SOAP? There’s a really easy way to handle it, packaging a base-64 encoded string representing the file as a simple string type. Simple, but what if you’re working on a SOAP client, and the server is using the SOAP with Attachments (SwA) paradigm to send and receive files?  I recently had this experience with a PortaOne integration, which uses SOAP::Lite for Perl to provide SOAP services to the switch.
More »

PHP Soap Services Part 2, Generic Service Providers

May 3rd, 2011


If you read our article a couple weeks back about dynamically changing the WSDL URL via SoapServer you may have thought, there’s little value here, since I use Zend Framework or NuSoap to publish Soap Services with PHP. This article explores a more prevalent issue with the design of SoapServer and the problem can’t be solved with a subclass of SoapServer. The problem we explore in this article is the design of the classes you would use to handle Soap actions. These classes and objects are designated by the SoapServer setClass and setObject methods. We’ll refer to them as Provider Classes in this article.

More »

Authoring Non-Blocking Web Services in PHP

April 14th, 2011

Asynchronous Message Exchange Patterns

Asynchronous MEP’s bring many concepts from asynchronous OS development to the Internet. One aspect that’s interesting is the perceived speed up clients feel from asynchronous operations. This where the terminology non-blocking comes from, the idea being the client says, “contact me when its finished” as it submits a request. It’s like dropping clothes off at the cleaners; the request is going to take a few days to complete. The service provider says ‘no problem’ and the client is off to focus on other things while the long running request is handled by the provider.

More »