version 1.42, 2006/11/14 18:34:52
|
version 1.43, 2007/01/11 16:54:48
|
|
|
CIMName ("destination")); | CIMName ("destination")); |
if (pos == PEG_NOT_FOUND) | if (pos == PEG_NOT_FOUND) |
{ | { |
String msg = _getMalformedExceptionMsg(); |
MessageLoaderParms param( |
|
"Handler.CIMxmlIndicationHandler.CIMxmlIndicationHandler." |
|
"MALFORMED_HANDLER_INSTANCE", |
|
"Malformed CIM-XML handler instance, " |
|
"\'Destination\' property is not found."); |
|
|
|
String msg = String(MessageLoader::getMessage(param)); |
| |
PEG_TRACE_STRING(TRC_IND_HANDLER, Tracer::LEVEL4, msg); | PEG_TRACE_STRING(TRC_IND_HANDLER, Tracer::LEVEL4, msg); |
| |
|
|
catch (TypeMismatchException& e) | catch (TypeMismatchException& e) |
{ | { |
MessageLoaderParms param( | MessageLoaderParms param( |
"Handler.CIMxmlIndicationHandler.CIMxmlIndicationHandler.ERROR", |
"Handler.CIMxmlIndicationHandler.CIMxmlIndicationHandler." |
"CIMxmlIndicationHandler Error: "); |
"DESTINATION_TYPE_MISMATCH", |
|
"Malformed CIM-XML handler instance, " |
|
"\'Destination\' property type mismatch."); |
| |
String msg = MessageLoader::getMessage(param) + e.getMessage(); |
String msg = MessageLoader::getMessage(param); |
| |
PEG_TRACE_STRING(TRC_IND_HANDLER, Tracer::LEVEL4, msg); | PEG_TRACE_STRING(TRC_IND_HANDLER, Tracer::LEVEL4, msg); |
| |
|
|
} | } |
else | else |
{ | { |
String msg = _getMalformedExceptionMsg(); |
String msg = _getMalformedExceptionMsg(dest); |
| |
PEG_TRACE_STRING(TRC_IND_HANDLER, Tracer::LEVEL4, msg+dest); | PEG_TRACE_STRING(TRC_IND_HANDLER, Tracer::LEVEL4, msg+dest); |
PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2, | PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2, |
|
|
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, | throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, |
msg + dest); |
msg); |
} | } |
} | } |
else | else |
{ | { |
String msg = _getMalformedExceptionMsg(); |
String msg = _getMalformedExceptionMsg(dest); |
| |
PEG_TRACE_STRING(TRC_IND_HANDLER, Tracer::LEVEL4, msg + dest); | PEG_TRACE_STRING(TRC_IND_HANDLER, Tracer::LEVEL4, msg + dest); |
| |
|
|
"in Destination " + dest); | "in Destination " + dest); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, msg + dest); |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, msg); |
} | } |
| |
String doubleSlash = dest.subString(colon + 1, 2); | String doubleSlash = dest.subString(colon + 1, 2); |
|
|
} | } |
else | else |
{ | { |
String msg = _getMalformedExceptionMsg(); |
String msg = _getMalformedExceptionMsg(dest); |
| |
PEG_TRACE_STRING(TRC_IND_HANDLER, Tracer::LEVEL4, msg + dest); | PEG_TRACE_STRING(TRC_IND_HANDLER, Tracer::LEVEL4, msg + dest); |
| |
|
|
"in Destination " + dest); | "in Destination " + dest); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, msg + dest); |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, msg); |
} | } |
| |
bool parseError = false; | bool parseError = false; |
|
|
| |
if (parseError) | if (parseError) |
{ | { |
String msg = _getMalformedExceptionMsg(); |
String msg = _getMalformedExceptionMsg(dest); |
| |
PEG_TRACE_STRING(TRC_IND_HANDLER, Tracer::LEVEL4, msg + dest); | PEG_TRACE_STRING(TRC_IND_HANDLER, Tracer::LEVEL4, msg + dest); |
| |
|
|
"in Destination " + dest); | "in Destination " + dest); |
| |
PEG_METHOD_EXIT(); | PEG_METHOD_EXIT(); |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, msg + dest); |
throw PEGASUS_CIM_EXCEPTION(CIM_ERR_NOT_SUPPORTED, msg); |
} | } |
| |
#ifndef PEGASUS_OS_ZOS | #ifndef PEGASUS_OS_ZOS |
|
|
exportclient.connect (hostName, portNumber, sslcontext); | exportclient.connect (hostName, portNumber, sslcontext); |
#else | #else |
MessageLoaderParms param( | MessageLoaderParms param( |
"Handler.CIMxmlIndicationHandler." |
"Handler.CIMxmlIndicationHandler.CIMxmlIndicationHandler." |
"CIMxmlIndicationHandler.ERROR", |
"CANNOT_DO_HTTPS_CONNECTION", |
"CIMxmlIndicationHandler Error: "); |
"SSL is not available. " |
MessageLoaderParms param1( |
"Cannot support an HTTPS connection."); |
"Handler.CIMxmlIndicationHandler." |
|
"CIMxmlIndicationHandler.CANNOT_DO_HTTPS_CONNECTION", |
|
"Cannot do https connection."); |
|
| |
PEG_TRACE_STRING(TRC_IND_HANDLER, Tracer::LEVEL3, | PEG_TRACE_STRING(TRC_IND_HANDLER, Tracer::LEVEL3, |
MessageLoader::getMessage(param) + |
MessageLoader::getMessage(param)); |
MessageLoader::getMessage(param1)); |
|
| |
String msg = MessageLoader::getMessage(param) + |
String msg = MessageLoader::getMessage(param); |
MessageLoader::getMessage(param1); |
|
| |
PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2, | PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2, |
"CIMxmlIndicationHandler::handleIndication failed to " | "CIMxmlIndicationHandler::handleIndication failed to " |
|
|
{ | { |
//ATTN: Catch specific exceptions and log the error message | //ATTN: Catch specific exceptions and log the error message |
// as Indication delivery failed. | // as Indication delivery failed. |
MessageLoaderParms param( |
String msg = e.getMessage(); |
"Handler.CIMxmlIndicationHandler.CIMxmlIndicationHandler.ERROR", |
|
"CIMxmlIndicationHandler Error: "); |
|
|
|
String msg = MessageLoader::getMessage(param) + e.getMessage(); |
|
| |
PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2, | PEG_TRACE_STRING(TRC_DISCARDED_DATA, Tracer::LEVEL2, |
"CIMxmlIndicationHandler::handleIndication failed to deliver " | "CIMxmlIndicationHandler::handleIndication failed to deliver " |
|
|
} | } |
| |
private: | private: |
String _getMalformedExceptionMsg() |
String _getMalformedExceptionMsg( |
|
String destinationValue) |
{ | { |
MessageLoaderParms param( | MessageLoaderParms param( |
"Handler.CIMxmlIndicationHandler.CIMxmlIndicationHandler.ERROR", |
"Handler.CIMxmlIndicationHandler.CIMxmlIndicationHandler." |
"CIMxmlIndicationHandler Error: "); |
"DESTINATION_NOT_VALID", |
|
"Malformed CIM-XML handler instance, " |
MessageLoaderParms param1( |
"\'Destination\' property \"$0\" is not valid.", |
"Handler.CIMxmlIndicationHandler." |
destinationValue); |
"CIMxmlIndicationHandler.MALFORMED_HANDLER_INSTANCE", |
return (String(MessageLoader::getMessage(param))); |
"Malformed handler instance."); |
|
|
|
return MessageLoader::getMessage(param) + |
|
MessageLoader::getMessage(param1); |
|
} | } |
| |
}; | }; |