enigma1 - 10:32 am on May 18, 2012 (gmt 0)
The 'https://api.example.com/API.asmx'is effectively what should be in the $req variable above. Otherwise each time you construct the client the code will parse the wsdl.
Now for the specific response to be cached you could use a database or file and store the data. You could use a signature to reference the specific entry based on the request and retrieve it thereafter. For example:
$signature = md5($msg . 'https://api.example.com/API.asmx/CheckAvailability');
which can be used as a db column or filename so you can check if present and if it is retrieve its content without doing the "send"