version 1.2.2.17, 2009/11/17 11:14:53
|
version 1.2.2.18, 2009/11/18 07:26:30
|
|
|
ns = x->getNameSpace_l(len); | ns = x->getNameSpace_l(len); |
// Both internal XML as well as binary always contain a namespace | // Both internal XML as well as binary always contain a namespace |
// don't have to do anything for those two encodings | // don't have to do anything for those two encodings |
|
if ((RESP_ENC_BINARY == (_encoding&RESP_ENC_BINARY)) && (len != 0)) |
|
{ |
|
_defaultNamespace = (char*)malloc(len+1); |
|
if (0==_defaultNamespace) |
|
{ |
|
return; |
|
} |
|
memcpy(_defaultNamespace, ns, len+1); |
|
_defaultNamespaceLen = len; |
|
} |
|
|
|
|
if (RESP_ENC_CIM == (_encoding & RESP_ENC_CIM)) | if (RESP_ENC_CIM == (_encoding & RESP_ENC_CIM)) |
{ | { |
CIMNamespaceName nsName(ns); | CIMNamespaceName nsName(ns); |
|
|
_encoding, | _encoding, |
_dataType)); | _dataType)); |
| |
|
// already existing Internal XML does not need to be encoded further |
|
// binary input is not actually impossible here, but we have an established |
|
// fallback |
|
if (RESP_ENC_BINARY == (_encoding & RESP_ENC_BINARY)) |
|
{ |
|
_resolveBinary(); |
|
} |
|
|
if (RESP_ENC_XML == (_encoding & RESP_ENC_XML)) | if (RESP_ENC_XML == (_encoding & RESP_ENC_XML)) |
{ | { |
switch (_dataType) | switch (_dataType) |
|
|
// not usable by clients | // not usable by clients |
void CIMResponseData::encodeInternalXmlResponse(CIMBuffer& out) | void CIMResponseData::encodeInternalXmlResponse(CIMBuffer& out) |
{ | { |
|
PEG_TRACE((TRC_XML, Tracer::LEVEL3, |
|
"CIMResponseData::encodeInternalXmlResponse(encoding=%X,content=%X)\n", |
|
_encoding, |
|
_dataType)); |
|
|
// already existing Internal XML does not need to be encoded further | // already existing Internal XML does not need to be encoded further |
// binary input is not actually impossible here, but we have an established | // binary input is not actually impossible here, but we have an established |
// fallback | // fallback |
|
|
{ | { |
_resolveBinary(); | _resolveBinary(); |
} | } |
if (RESP_ENC_CIM == (_encoding & RESP_ENC_CIM)) |
if ((0 == _encoding) || |
|
(RESP_ENC_CIM == (_encoding & RESP_ENC_CIM))) |
{ | { |
switch (_dataType) | switch (_dataType) |
{ | { |
|
|
{ | { |
for (Uint32 i=0,n=_instanceNames.size();i<n;i++) | for (Uint32 i=0,n=_instanceNames.size();i<n;i++) |
{ | { |
SCMOInstance addme(_instanceNames[i]); |
SCMOInstance addme( |
|
_instanceNames[i], |
|
_defaultNamespace, |
|
_defaultNamespaceLen); |
_scmoInstances.append(addme); | _scmoInstances.append(addme); |
} | } |
_instanceNames.clear(); | _instanceNames.clear(); |
|
|
{ | { |
if (_instances.size() > 0) | if (_instances.size() > 0) |
{ | { |
SCMOInstance addme(_instances[0]); |
SCMOInstance addme( |
|
_instances[0], |
|
_defaultNamespace, |
|
_defaultNamespaceLen); |
_scmoInstances.clear(); | _scmoInstances.clear(); |
_scmoInstances.append(addme); | _scmoInstances.append(addme); |
_instances.clear(); | _instances.clear(); |
|
|
{ | { |
for (Uint32 i=0,n=_instances.size();i<n;i++) | for (Uint32 i=0,n=_instances.size();i<n;i++) |
{ | { |
SCMOInstance addme(_instances[i]); |
SCMOInstance addme( |
|
_instances[i], |
|
_defaultNamespace, |
|
_defaultNamespaceLen); |
_scmoInstances.append(addme); | _scmoInstances.append(addme); |
} | } |
_instances.clear(); | _instances.clear(); |
|
|
{ | { |
for (Uint32 i=0,n=_objects.size();i<n;i++) | for (Uint32 i=0,n=_objects.size();i<n;i++) |
{ | { |
SCMOInstance addme(_objects[i]); |
SCMOInstance addme( |
|
_objects[i], |
|
_defaultNamespace, |
|
_defaultNamespaceLen); |
_scmoInstances.append(addme); | _scmoInstances.append(addme); |
} | } |
_objects.clear(); | _objects.clear(); |
|
|
{ | { |
for (Uint32 i=0,n=_instanceNames.size();i<n;i++) | for (Uint32 i=0,n=_instanceNames.size();i<n;i++) |
{ | { |
SCMOInstance addme(_instanceNames[i]); |
SCMOInstance addme( |
|
_instanceNames[i], |
|
_defaultNamespace, |
|
_defaultNamespaceLen); |
// TODO: More description about this. | // TODO: More description about this. |
if (0 == _instanceNames[i].getKeyBindings().size()) | if (0 == _instanceNames[i].getKeyBindings().size()) |
{ | { |