in reply to Script to accept/send data as SOAP xml message

Excuse me if I am missing something obvious here, but it seems to me you should investigate SOAP::Lite. I'll not get into the XML, but if you want to create a process which can recieve data, act on it, and transmitt a response, the work of intpreting xml, and encoding a rersponse as xml, has already been done for you.

May the Force be with you