You really are implementing a UPnP control point from scratch :o . There must be usable UPnP libraries for your platform that would cut the amount of work needed to maybe 1-5%. But I guess you knew that so carry on... I just wanted to make sure you understand that UPnP is not the simplest protocol and implementing it for a single application makes little sense.
I'll just refer you to the same document as I did for SSDP: UDA 1.1 pdf, especially 3.1.1 SOAP Profile
. You could read the actual SOAP spec as well, but I think the UPnP docs are complete enough. The UDA defines the SOAP profile and contains several envelope examples. It also explains what the containing HTTP POST must look like (see especially the required headers).
about your envelope (without having seen the Printer spec): GetPrinterAttributes namespace is wrong as methods are defined in a service, not device. It's also missing the initial <?xml version="1.0">
line.