version 1.49, 2002/04/22 12:07:48
|
version 1.50, 2002/04/23 16:41:55
|
|
|
| |
void XmlWriter::appendEMethodRequestHeader( | void XmlWriter::appendEMethodRequestHeader( |
Array<Sint8>& out, | Array<Sint8>& out, |
|
const char* requestUri, |
const char* host, | const char* host, |
const char* cimMethod, | const char* cimMethod, |
const String& authenticationHeader, | const String& authenticationHeader, |
|
|
{ | { |
char nn[] = { '0' + (rand() % 10), '0' + (rand() % 10), '\0' }; | char nn[] = { '0' + (rand() % 10), '0' + (rand() % 10), '\0' }; |
| |
out << "M-POST /cimom HTTP/1.1\r\n"; |
out << "M-POST " << requestUri << " HTTP/1.1\r\n"; |
out << "HOST: " << host << "\r\n"; | out << "HOST: " << host << "\r\n"; |
out << "Content-Type: application/xml; charset=\"utf-8\"\r\n"; | out << "Content-Type: application/xml; charset=\"utf-8\"\r\n"; |
out << "Content-Length: " << contentLength << "\r\n"; | out << "Content-Length: " << contentLength << "\r\n"; |
|
|
//------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ |
| |
Array<Sint8> XmlWriter::formatSimpleEMethodReqMessage( | Array<Sint8> XmlWriter::formatSimpleEMethodReqMessage( |
|
const char* requestUri, |
const char* host, | const char* host, |
const char* eMethodName, | const char* eMethodName, |
const String& messageId, | const String& messageId, |
|
|
| |
appendEMethodRequestHeader( | appendEMethodRequestHeader( |
tmp, | tmp, |
|
requestUri, |
host, | host, |
eMethodName, | eMethodName, |
authenticationHeader, | authenticationHeader, |
out.size()); | out.size()); |
tmp << out; | tmp << out; |
| |
return out; |
return tmp; |
} | } |
| |
//------------------------------------------------------------------------------ | //------------------------------------------------------------------------------ |