About Me

My photo
Web person at the Imperial War Museum, just completed PhD about digital sustainability in museums (the original motivation for this blog was as my research diary). Posting occasionally, and usually museum tech stuff but prone to stray. I welcome comments if you want to take anything further. These are my opinions and should not be attributed to my employer or anyone else (unless they thought of them too). Twitter: @jottevanger

Friday, October 21, 2011

SOAPhar, so good

All of a sudden video and sound on our new beta site, streamed from our DAMS, stopped working this week. We embed these using a (currently) private oEmbed service which gets its data from a SOAP service on the DAMS to construct the streaming URL for a given media item, with which it then assembles the embedding code. The SOAP call was timing out and giving the following error:

Fatal error: Uncaught SoapFault exception:

[WSDL] SOAP-ERROR: Parsing Schema: can't import schema from 'http://schemas.xmlsoap.org/soap/encoding/' in C:\[myfile]:20
Stack trace: #0 C:\[myfile](20): SoapClient->SoapClient('http://[DAMS WSDL URL]', Array)

That schema file is being imported at a namespace declaration in the DAMS SOAP service's WSDL file. It could be accessed just fine with a browser but the PHP soapclient call which loads the WSDL file had no such luck and would just time out.
I have no idea why a service that had been running fine for 8 months or so suddenly went freaky, but I did suspect another unheralded proxy change, since these tend to play havoc with our dev environment and at the moment the oEmbed service is running there. Other people have experienced problems with this encoding schema at xmlsoap.org, but since it's going to be present in all proper SOAP calls that doesn't really tell us whether it's indicative of a problem with the URL and xmlsoap.org, or of network issues. All the same, what worked for this guy worked for me. Well actually, whilst he simply removed the namespace import element, whereas, I saved the WSDL for the SOAP service that my oEmbed script called and edited it to point at a local copy of the encoding schema at xmlsoap.org. Happily my SOAP call seemed to work just as well with a local copy of the WSDL and everything started working again. Hooray! I had wondered whether I would be scuppered because I couldn't edit the original WSDL file, but since the WSDL doesn't actually do anything, it just lays out the instructions for a SOAP consumer to use, it was aboslutely fine to edit and run it locally.
Perhaps this will help others suffering the same grief.

No comments: