Define the SOAP message
define MY_SOAP_MESSAGE \
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" \
"<v:Envelope xmlns:v=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:c=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:d=\"http://www.w3.org/2001/XMLSchema\" xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\">" \
"<v:Header />" \
"<v:Body>" \
"<%s xmlns=\"%s\" id=\"o0\" c:root=\"1\">" \
"<%s i:type=\"d:string\">" \
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" \
"<request name=\"%s\">" \
"<UserName>%s</UserName>" \
"<UserTag>%s</UserTag>" \
"</request>" \
"</%s>" \
"</%s>" \
"</v:Body>" \
"</v:Envelope>"
Set the values within the message
char buf[1024];
if (snprintf(buf, 1024, SOAP_MSG_TMPL, my_method, my_urn, my_elem, my_devid, my_user, uid, my_elem, my_method) < 0)
return NULL;
