#include "internal.h"
#include "exceptions.h"
#include "XMLToolingConfig.h"
-#include "encryption/Encryption.h"
+#include "encryption/Encrypter.h"
#include "impl/UnknownElement.h"
#include "security/TrustEngine.h"
#include "security/OpenSSLCryptoX509CRL.h"
using namespace log4cpp;
using namespace std;
-DECL_EXCEPTION_FACTORY(XMLParserException,xmltooling);
-DECL_EXCEPTION_FACTORY(XMLObjectException,xmltooling);
-DECL_EXCEPTION_FACTORY(MarshallingException,xmltooling);
-DECL_EXCEPTION_FACTORY(UnmarshallingException,xmltooling);
-DECL_EXCEPTION_FACTORY(UnknownElementException,xmltooling);
-DECL_EXCEPTION_FACTORY(UnknownAttributeException,xmltooling);
-DECL_EXCEPTION_FACTORY(UnknownExtensionException,xmltooling);
-DECL_EXCEPTION_FACTORY(ValidationException,xmltooling);
-DECL_EXCEPTION_FACTORY(XMLSecurityException,xmltooling);
-DECL_EXCEPTION_FACTORY(IOException,xmltooling);
+DECL_XMLTOOLING_EXCEPTION_FACTORY(XMLParserException,xmltooling);
+DECL_XMLTOOLING_EXCEPTION_FACTORY(XMLObjectException,xmltooling);
+DECL_XMLTOOLING_EXCEPTION_FACTORY(MarshallingException,xmltooling);
+DECL_XMLTOOLING_EXCEPTION_FACTORY(UnmarshallingException,xmltooling);
+DECL_XMLTOOLING_EXCEPTION_FACTORY(UnknownElementException,xmltooling);
+DECL_XMLTOOLING_EXCEPTION_FACTORY(UnknownAttributeException,xmltooling);
+DECL_XMLTOOLING_EXCEPTION_FACTORY(UnknownExtensionException,xmltooling);
+DECL_XMLTOOLING_EXCEPTION_FACTORY(ValidationException,xmltooling);
+DECL_XMLTOOLING_EXCEPTION_FACTORY(IOException,xmltooling);
#ifndef XMLTOOLING_NO_XMLSEC
- DECL_EXCEPTION_FACTORY(SignatureException,xmlsignature);
+ DECL_XMLTOOLING_EXCEPTION_FACTORY(XMLSecurityException,xmltooling);
+ DECL_XMLTOOLING_EXCEPTION_FACTORY(SignatureException,xmlsignature);
+ DECL_XMLTOOLING_EXCEPTION_FACTORY(EncryptionException,xmlencryption);
#endif
namespace xmltooling {
registerEncryptionClasses();
registerSOAPClasses();
- REGISTER_EXCEPTION_FACTORY(XMLParserException,xmltooling);
- REGISTER_EXCEPTION_FACTORY(XMLObjectException,xmltooling);
- REGISTER_EXCEPTION_FACTORY(MarshallingException,xmltooling);
- REGISTER_EXCEPTION_FACTORY(UnmarshallingException,xmltooling);
- REGISTER_EXCEPTION_FACTORY(UnknownElementException,xmltooling);
- REGISTER_EXCEPTION_FACTORY(UnknownAttributeException,xmltooling);
- REGISTER_EXCEPTION_FACTORY(ValidationException,xmltooling);
- REGISTER_EXCEPTION_FACTORY(XMLSecurityException,xmltooling);
- REGISTER_EXCEPTION_FACTORY(IOException,xmltooling);
+ REGISTER_XMLTOOLING_EXCEPTION_FACTORY(XMLParserException,xmltooling);
+ REGISTER_XMLTOOLING_EXCEPTION_FACTORY(XMLObjectException,xmltooling);
+ REGISTER_XMLTOOLING_EXCEPTION_FACTORY(MarshallingException,xmltooling);
+ REGISTER_XMLTOOLING_EXCEPTION_FACTORY(UnmarshallingException,xmltooling);
+ REGISTER_XMLTOOLING_EXCEPTION_FACTORY(UnknownElementException,xmltooling);
+ REGISTER_XMLTOOLING_EXCEPTION_FACTORY(UnknownAttributeException,xmltooling);
+ REGISTER_XMLTOOLING_EXCEPTION_FACTORY(ValidationException,xmltooling);
+ REGISTER_XMLTOOLING_EXCEPTION_FACTORY(IOException,xmltooling);
#ifndef XMLTOOLING_NO_XMLSEC
XMLObjectBuilder::registerBuilder(QName(xmlconstants::XMLSIG_NS,Signature::LOCAL_NAME),new SignatureBuilder());
- REGISTER_EXCEPTION_FACTORY(SignatureException,xmlsignature);
+ REGISTER_XMLTOOLING_EXCEPTION_FACTORY(XMLSecurityException,xmltooling);
+ REGISTER_XMLTOOLING_EXCEPTION_FACTORY(SignatureException,xmlsignature);
+ REGISTER_XMLTOOLING_EXCEPTION_FACTORY(EncryptionException,xmlencryption);
registerKeyResolvers();
registerCredentialResolvers();
registerTrustEngines();
* @param name the exception class name
* @param ns the exception class C++ namespace
*/
-#define DECL_EXCEPTION_FACTORY(name,ns) \
+#define DECL_XMLTOOLING_EXCEPTION_FACTORY(name,ns) \
xmltooling::XMLToolingException* name##Factory() \
{ \
return new ns::name(); \
* @param name the exception class name
* @param ns the exception class C++ namespace
*/
-#define REGISTER_EXCEPTION_FACTORY(name,ns) XMLToolingException::registerFactory(#ns"::"#name,name##Factory)
+#define REGISTER_XMLTOOLING_EXCEPTION_FACTORY(name,ns) XMLToolingException::registerFactory(#ns"::"#name,name##Factory)
#if defined (_MSC_VER)
#pragma warning( push )
DECL_XMLTOOLING_EXCEPTION(UnknownAttributeException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmltooling,XMLToolingException,Exceptions due to processing of unknown attributes);
DECL_XMLTOOLING_EXCEPTION(UnknownExtensionException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmltooling,XMLToolingException,Exceptions from use of an unrecognized extension/plugin);
DECL_XMLTOOLING_EXCEPTION(ValidationException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmltooling,XMLToolingException,Exceptions during object validation);
- DECL_XMLTOOLING_EXCEPTION(XMLSecurityException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmltooling,XMLToolingException,Exceptions related to the XML security layer);
DECL_XMLTOOLING_EXCEPTION(IOException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmltooling,XMLToolingException,Exceptions related to physical input/output errors);
+#ifndef XMLTOOLING_NO_XMLSEC
+ DECL_XMLTOOLING_EXCEPTION(XMLSecurityException,XMLTOOL_EXCEPTIONAPI(XMLTOOL_API),xmltooling,XMLToolingException,Exceptions related to the XML security layer);
+#endif
};
#if defined (_MSC_VER)