Sending a SOAP message over a home network

I’m toying round with a home automation app. The main controlling app with be written in Xojo and run constantly as a console app. I’m planning on interfacing with this through a PHP web app running on the same machine. The web app will probably communicate with the console app with an IPC socket.

The first thing I want to implement is the ability to control my Sonos system from the console app. Sonos has an open API that uses SOAP messages.

I’m currently reading about the SOAP message format and there are examples in other languages out there to do this.

How would I send a SOAP message across my home network from a Xojo console app? What sort of socket do I need to subclass?

SOAP operates over HTTP. There are built-in SOAP classes, but they are somewhat limited. I use HTTPSocket/HTTPSecureSocket as a property of a custom class that formats the messages and uses the socket for communication. Try the built-in classes first, of course.

Hadn’t realised there were SOAP methods (note to self - check documentation!).

Out of interest, what have you found limiting about them?

There is a SOAP example included in the Xojo example projects.

This blog post might also be helpful:

Thanks Paul.

I have not tested them recently (note to self: test them again) but they did not handle complex data types and authorization.