You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by as...@apache.org on 2013/05/18 18:04:40 UTC

svn commit: r1484133 [1/6] - in /cxf/trunk/services: ./ xkms/ xkms/xkms-client/ xkms/xkms-client/src/ xkms/xkms-client/src/main/ xkms/xkms-client/src/main/java/ xkms/xkms-client/src/main/java/org/ xkms/xkms-client/src/main/java/org/apache/ xkms/xkms-cl...

Author: ashakirin
Date: Sat May 18 16:04:37 2013
New Revision: 1484133

URL: http://svn.apache.org/r1484133
Log:
XKMS contribution - first draft version

Added:
    cxf/trunk/services/xkms/
    cxf/trunk/services/xkms/README.txt
    cxf/trunk/services/xkms/pom.xml
    cxf/trunk/services/xkms/xkms-client/
    cxf/trunk/services/xkms/xkms-client/pom.xml
    cxf/trunk/services/xkms/xkms-client/src/
    cxf/trunk/services/xkms/xkms-client/src/main/
    cxf/trunk/services/xkms/xkms-client/src/main/java/
    cxf/trunk/services/xkms/xkms-client/src/main/java/org/
    cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/
    cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/
    cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/
    cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/
    cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/X509AppId.java
    cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/XKMSInvoker.java
    cxf/trunk/services/xkms/xkms-client/src/main/resources/
    cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-INF/
    cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-INF/blueprint/
    cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-INF/blueprint/beans.xml
    cxf/trunk/services/xkms/xkms-common/
    cxf/trunk/services/xkms/xkms-common/pom.xml
    cxf/trunk/services/xkms/xkms-common/src/
    cxf/trunk/services/xkms/xkms-common/src/main/
    cxf/trunk/services/xkms/xkms-common/src/main/java/
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/ExceptionMapper.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSArgumentNotMatchException.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSCertificateException.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSConfigurationException.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSException.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSLocateException.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSNotFoundException.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSRequestException.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSTooManyResponsesException.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSValidateException.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Applications.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/DnUtils.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/HandlerContext.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/KeyRegisterHandler.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Locator.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Validator.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/XKMSConstants.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/AdditionalClassesFactory.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArrayFactoryBean.java
    cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ResultDetails.java
    cxf/trunk/services/xkms/xkms-common/src/main/model/
    cxf/trunk/services/xkms/xkms-common/src/main/model/binding.xjb
    cxf/trunk/services/xkms/xkms-common/src/main/model/xenc-schema.xsd
    cxf/trunk/services/xkms/xkms-common/src/main/model/xkms.wsdl
    cxf/trunk/services/xkms/xkms-common/src/main/model/xkms.xsd
    cxf/trunk/services/xkms/xkms-common/src/main/model/xmldsig-core-schema.xsd
    cxf/trunk/services/xkms/xkms-features/
    cxf/trunk/services/xkms/xkms-features/pom.xml
    cxf/trunk/services/xkms/xkms-features/src/
    cxf/trunk/services/xkms/xkms-features/src/main/
    cxf/trunk/services/xkms/xkms-features/src/main/resources/
    cxf/trunk/services/xkms/xkms-features/src/main/resources/features.xml
    cxf/trunk/services/xkms/xkms-features/src/main/resources/org.apache.cxf.xkms.cfg
    cxf/trunk/services/xkms/xkms-itests/
    cxf/trunk/services/xkms/xkms-itests/pom.xml
    cxf/trunk/services/xkms/xkms-itests/src/
    cxf/trunk/services/xkms/xkms-itests/src/test/
    cxf/trunk/services/xkms/xkms-itests/src/test/java/
    cxf/trunk/services/xkms/xkms-itests/src/test/java/org/
    cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/
    cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/
    cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/
    cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/
    cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/XkmsServiceTest.java
    cxf/trunk/services/xkms/xkms-itests/src/test/resources/
    cxf/trunk/services/xkms/xkms-itests/src/test/resources/XKMS-soapui-project.xml
    cxf/trunk/services/xkms/xkms-osgi/
    cxf/trunk/services/xkms/xkms-osgi/pom.xml
    cxf/trunk/services/xkms/xkms-osgi/src/
    cxf/trunk/services/xkms/xkms-osgi/src/main/
    cxf/trunk/services/xkms/xkms-osgi/src/main/resources/
    cxf/trunk/services/xkms/xkms-osgi/src/main/resources/OSGI-INF/
    cxf/trunk/services/xkms/xkms-osgi/src/main/resources/OSGI-INF/blueprint/
    cxf/trunk/services/xkms/xkms-osgi/src/main/resources/OSGI-INF/blueprint/cxf-endpoint.xml
    cxf/trunk/services/xkms/xkms-osgi/src/main/resources/OSGI-INF/blueprint/xkms-key-handlers.xml
    cxf/trunk/services/xkms/xkms-osgi/src/main/resources/test-requests/
    cxf/trunk/services/xkms/xkms-osgi/src/main/resources/test-requests/request-locate.xml
    cxf/trunk/services/xkms/xkms-osgi/src/main/resources/test-requests/request-validate.xml
    cxf/trunk/services/xkms/xkms-osgi/src/main/resources/test-requests/response-locate.xml
    cxf/trunk/services/xkms/xkms-osgi/src/main/resources/test-requests/response-validate.xml
    cxf/trunk/services/xkms/xkms-osgi/src/test/
    cxf/trunk/services/xkms/xkms-osgi/src/test/resources/
    cxf/trunk/services/xkms/xkms-osgi/src/test/resources/test-requests/
    cxf/trunk/services/xkms/xkms-osgi/src/test/resources/test-requests/request-locate.xml
    cxf/trunk/services/xkms/xkms-osgi/src/test/resources/test-requests/request-validate.xml
    cxf/trunk/services/xkms/xkms-osgi/src/test/resources/test-requests/response-locate.xml
    cxf/trunk/services/xkms/xkms-osgi/src/test/resources/test-requests/response-validate.xml
    cxf/trunk/services/xkms/xkms-service/
    cxf/trunk/services/xkms/xkms-service/pom.xml
    cxf/trunk/services/xkms/xkms-service/src/
    cxf/trunk/services/xkms/xkms-service/src/main/
    cxf/trunk/services/xkms/xkms-service/src/main/java/
    cxf/trunk/services/xkms/xkms-service/src/main/java/org/
    cxf/trunk/services/xkms/xkms-service/src/main/java/org/apache/
    cxf/trunk/services/xkms/xkms-service/src/main/java/org/apache/cxf/
    cxf/trunk/services/xkms/xkms-service/src/main/java/org/apache/cxf/xkms/
    cxf/trunk/services/xkms/xkms-service/src/main/java/org/apache/cxf/xkms/service/
    cxf/trunk/services/xkms/xkms-service/src/main/java/org/apache/cxf/xkms/service/XKMSResponseFactory.java
    cxf/trunk/services/xkms/xkms-service/src/main/java/org/apache/cxf/xkms/service/XKMSService.java
    cxf/trunk/services/xkms/xkms-war/
    cxf/trunk/services/xkms/xkms-war/pom.xml
    cxf/trunk/services/xkms/xkms-war/src/
    cxf/trunk/services/xkms/xkms-war/src/main/
    cxf/trunk/services/xkms/xkms-war/src/main/resources/
    cxf/trunk/services/xkms/xkms-war/src/main/resources/log4j.properties
    cxf/trunk/services/xkms/xkms-war/src/main/resources/logging.properties
    cxf/trunk/services/xkms/xkms-war/src/main/webapp/
    cxf/trunk/services/xkms/xkms-war/src/main/webapp/WEB-INF/
    cxf/trunk/services/xkms/xkms-war/src/main/webapp/WEB-INF/cxf-servlet.xml
    cxf/trunk/services/xkms/xkms-war/src/main/webapp/WEB-INF/web.xml
    cxf/trunk/services/xkms/xkms-war/src/main/webapp/WEB-INF/xkms-endpoint.xml
    cxf/trunk/services/xkms/xkms-war/src/main/webapp/WEB-INF/xkms-key-handlers.xml
    cxf/trunk/services/xkms/xkms-x509-handlers/
    cxf/trunk/services/xkms/xkms-x509-handlers/pom.xml
    cxf/trunk/services/xkms/xkms-x509-handlers/src/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/AbstractX509RegisterHandler.java
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/FileRegisterHandler.java
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/LDAPSearch.java
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/LdapRegisterHandler.java
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/locator/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/locator/FileLocator.java
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/locator/LdapLocator.java
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/parser/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/parser/LocateRequestParser.java
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/parser/ValidateRequestParser.java
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/utils/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/utils/X509Utils.java
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/validator/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/validator/DateValidator.java
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/file/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/file/persistence/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/file/persistence/FilePersistenceManagerTest.java
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/ldap/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/ldap/persistence/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/ldap/persistence/LDAPPersistenceManagerITest.java
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/ldap/persistence/LDAPPersistenceManagerTest.java
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/ldap/persistence/LDAPSearchTest.java
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/BasicValidationTest.java
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/ValidateDateHandlerTest.java
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/utils/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/utils/X509UtilsTest.java
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/cert1.bas64
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/cert1.cer
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/registerRequest.xml
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/registerRequestWithCertificate.xml
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/registerResult.xml
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/reissueRequest.xml
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/revokeRequest.xml
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/store1/
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/store1/CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer-11688544847478700689-CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer.cer
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/validateRequestCorrupted.xml
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/validateRequestExpired.xml
    cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/validateRequestOK.xml
Modified:
    cxf/trunk/services/pom.xml

Modified: cxf/trunk/services/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/pom.xml?rev=1484133&r1=1484132&r2=1484133&view=diff
==============================================================================
--- cxf/trunk/services/pom.xml (original)
+++ cxf/trunk/services/pom.xml Sat May 18 16:04:37 2013
@@ -36,6 +36,7 @@
         <module>sts</module>
         <module>wsn</module>
         <module>ws-discovery</module>
+        <module>xkms</module>
     </modules>
 
 </project>

Added: cxf/trunk/services/xkms/README.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/README.txt?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/README.txt (added)
+++ cxf/trunk/services/xkms/README.txt Sat May 18 16:04:37 2013
@@ -0,0 +1,14 @@
+
+This folder contains the XKMS (XML key Management Service) implementation of 
+Apache CXF. It contains:
+
+
+xkms-client - The XKMS client and invoker implementations
+xkms--common - Common functionality, XML schemas, generated code
+xkms-service - The XKMS core service implementation
+xkms-x509-handlers - The implementation of pluggable commands for X509 keys.
+xkms-features - Karaf features for XKMS client and service
+xkms-itests - Intergation tests
+xkms-osgi - OSGi blueprint configuration for OSGi deployment
+xkms-war - Web spring configuration for Web depoyment
+

Added: cxf/trunk/services/xkms/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/pom.xml?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/pom.xml (added)
+++ cxf/trunk/services/xkms/pom.xml Sat May 18 16:04:37 2013
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.cxf.services.xkms</groupId>
+    <artifactId>cxf-services-xkms</artifactId>
+    <packaging>pom</packaging>
+    <name>Apache CXF XKMS</name>
+    <description>Apache CXF XKMS service</description>
+    <url>http://cxf.apache.org</url>
+
+    <parent>
+        <groupId>org.apache.cxf.services</groupId>
+        <artifactId>cxf-services</artifactId>
+        <version>2.8.0-SNAPSHOT</version>
+        <relativePath>../pom.xml</relativePath>
+    </parent>
+
+    <modules>
+      <module>xkms-common</module>
+      <module>xkms-x509-handlers</module>
+      <module>xkms-service</module>
+      <module>xkms-client</module>
+      <module>xkms-features</module>
+      <module>xkms-osgi</module>
+      <module>xkms-war</module>
+    </modules>
+
+</project>

Added: cxf/trunk/services/xkms/xkms-client/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-client/pom.xml?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-client/pom.xml (added)
+++ cxf/trunk/services/xkms/xkms-client/pom.xml Sat May 18 16:04:37 2013
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+	license agreements. See the NOTICE file distributed with this work for additional 
+	information regarding copyright ownership. The ASF licenses this file to 
+	you under the Apache License, Version 2.0 (the "License"); you may not use 
+	this file except in compliance with the License. You may obtain a copy of 
+	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+	by applicable law or agreed to in writing, software distributed under the 
+	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+	OF ANY KIND, either express or implied. See the License for the specific 
+	language governing permissions and limitations under the License.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+    	<groupId>org.apache.cxf.services.xkms</groupId>
+	<artifactId>cxf-services-xkms-client</artifactId>
+	<packaging>bundle</packaging>
+	<name>Apache CXF XKMS Client</name>
+	<url>http://cxf.apache.org</url>
+
+	<parent>
+		<groupId>org.apache.cxf</groupId>
+		<artifactId>cxf-parent</artifactId>
+		<version>2.8.0-SNAPSHOT</version>
+		<relativePath>../../../parent/pom.xml</relativePath>
+	</parent>
+
+	<dependencies>
+		<dependency>
+			<groupId>org.apache.cxf.services.xkms</groupId>
+			<artifactId>cxf-services-xkms-common</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+        	<groupId>org.slf4j</groupId>
+        	<artifactId>slf4j-api</artifactId>
+        </dependency>
+	</dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>

Added: cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/X509AppId.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/X509AppId.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/X509AppId.java (added)
+++ cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/X509AppId.java Sat May 18 16:04:37 2013
@@ -0,0 +1,83 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.xkms.client;
+
+import org.apache.cxf.xkms.handlers.Applications;
+
+public class X509AppId {
+    private final Applications application;
+    private final String id;
+
+    public X509AppId(Applications application, String id) {
+        this.id = id;
+        this.application = application;
+    }
+
+    public Applications getApplication() {
+        return application;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    @Override
+    public String toString() {
+        return String.format("application: %s; id: %s", application, id);
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((application == null)
+                ? 0
+                : application.hashCode());
+        result = prime * result + ((id == null)
+                ? 0
+                : id.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj) {
+            return true;
+        }
+        if (obj == null) {
+            return false;
+        }
+        if (!(obj instanceof X509AppId)) {
+            return false;
+        }
+        X509AppId other = (X509AppId) obj;
+        if (application != other.application) {
+            return false;
+        }
+        if (id == null) {
+            if (other.id != null) {
+                return false;
+            }
+        } else if (!id.equals(other.id)) {
+            return false;
+        }
+        return true;
+    }
+
+}

Added: cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/XKMSInvoker.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/XKMSInvoker.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/XKMSInvoker.java (added)
+++ cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/XKMSInvoker.java Sat May 18 16:04:37 2013
@@ -0,0 +1,249 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.xkms.client;
+
+import java.io.ByteArrayInputStream;
+import java.math.BigInteger;
+import java.security.cert.CertificateEncodingException;
+import java.security.cert.CertificateException;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.UUID;
+
+import javax.xml.bind.JAXBElement;
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.xkms.exception.ExceptionMapper;
+import org.apache.cxf.xkms.exception.XKMSException;
+import org.apache.cxf.xkms.exception.XKMSLocateException;
+import org.apache.cxf.xkms.exception.XKMSNotFoundException;
+import org.apache.cxf.xkms.exception.XKMSValidateException;
+import org.apache.cxf.xkms.handlers.Applications;
+import org.apache.cxf.xkms.handlers.XKMSConstants;
+import org.apache.cxf.xkms.model.xkms.KeyBindingEnum;
+import org.apache.cxf.xkms.model.xkms.LocateRequestType;
+import org.apache.cxf.xkms.model.xkms.LocateResultType;
+import org.apache.cxf.xkms.model.xkms.MessageAbstractType;
+import org.apache.cxf.xkms.model.xkms.QueryKeyBindingType;
+import org.apache.cxf.xkms.model.xkms.StatusType;
+import org.apache.cxf.xkms.model.xkms.UseKeyWithType;
+import org.apache.cxf.xkms.model.xkms.ValidateRequestType;
+import org.apache.cxf.xkms.model.xkms.ValidateResultType;
+import org.apache.cxf.xkms.model.xmldsig.KeyInfoType;
+import org.apache.cxf.xkms.model.xmldsig.X509DataType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3._2002._03.xkms_wsdl.XKMSPortType;
+
+public class XKMSInvoker {
+    private static final Logger LOG = LoggerFactory.getLogger(XKMSInvoker.class);
+
+    private static final org.apache.cxf.xkms.model.xmldsig.ObjectFactory DSIG_OF =
+            new org.apache.cxf.xkms.model.xmldsig.ObjectFactory();
+    private static final org.apache.cxf.xkms.model.xkms.ObjectFactory XKMS_OF =
+            new org.apache.cxf.xkms.model.xkms.ObjectFactory();
+
+    private static final String XKMS_LOCATE_INVALID_CERTIFICATE = 
+            "Cannot instantiate X509 certificate from XKMS response";
+    private static final String XKMS_VALIDATE_ERROR = "Certificate [%s] is not valid";
+
+    private final XKMSPortType xkmsConsumer;
+
+    public XKMSInvoker(XKMSPortType xkmsConsumer) {
+        this.xkmsConsumer = xkmsConsumer;
+    }
+
+    public X509Certificate getServiceCertificate(QName serviceName) {
+        return getCertificateForId(Applications.SERVICE_SOAP, serviceName.toString());
+    }
+    
+    public X509Certificate getCertificateForId(Applications application, String id) {
+        List<X509AppId> ids = new ArrayList<X509AppId>();
+        ids.add(new X509AppId(application, id));
+        return getCertificate(ids);
+    }
+    
+    public X509Certificate getCertificateForIssuerSerial(String issuerDN, BigInteger serial) {
+        List<X509AppId> ids = new ArrayList<X509AppId>();
+        ids.add(new X509AppId(Applications.ISSUER, issuerDN));
+        ids.add(new X509AppId(Applications.SERIAL, serial.toString(16)));
+        return getCertificate(ids);
+    }
+
+    public X509Certificate getCertificate(List<X509AppId> ids) {
+        try {
+            LocateRequestType locateRequestType = prepareLocateXKMSRequest(ids);
+            LocateResultType locateResultType = xkmsConsumer.locate(locateRequestType);
+            return parseLocateXKMSResponse(locateResultType, ids);
+        } catch (RuntimeException e) {
+            String msg = String
+                .format("XKMS locate call fails for certificate: %s. Error: %s",
+                        ids,
+                        e.getMessage());
+            LOG.warn(msg, e);
+            throw new XKMSLocateException(msg, e);
+        }
+    }
+
+    public boolean validateCertificate(X509Certificate cert) {
+        try {
+            ValidateRequestType validateRequestType = prepareValidateXKMSRequest(cert);
+            ValidateResultType validateResultType = xkmsConsumer.validate(validateRequestType);
+            String id = cert.getSubjectDN().getName();
+            CertificateValidationResult result = parseValidateXKMSResponse(validateResultType, id);
+            if (!result.isValid()) {
+                LOG.warn(String.format("Certificate %s is not valid: %s",
+                                         cert.getSubjectDN(), result.getDescription()));
+            }
+            return result.isValid();
+        } catch (RuntimeException e) {
+            String msg = String.format("XKMS validate call fails for certificate: %s. Error: %s",
+                                       cert.getSubjectDN(),
+                                       e.getMessage());
+            LOG.warn(msg, e);
+            throw new XKMSValidateException(msg, e);
+        }
+    }
+
+    protected LocateRequestType prepareLocateXKMSRequest(List<X509AppId> ids) {
+        QueryKeyBindingType queryKeyBindingType = XKMS_OF
+            .createQueryKeyBindingType();
+
+        for (X509AppId id : ids) {
+            UseKeyWithType useKeyWithType = XKMS_OF.createUseKeyWithType();
+            useKeyWithType.setIdentifier(id.getId());
+            useKeyWithType.setApplication(id.getApplication().getUri());
+
+            queryKeyBindingType.getUseKeyWith().add(useKeyWithType);
+        }
+
+        LocateRequestType locateRequestType = XKMS_OF.createLocateRequestType();
+        locateRequestType.setQueryKeyBinding(queryKeyBindingType);
+        setGenericRequestParams(locateRequestType);
+        return locateRequestType;
+    }
+
+    @SuppressWarnings("unchecked")
+    protected X509Certificate parseLocateXKMSResponse(LocateResultType locateResultType, List<X509AppId> ids) {
+        
+        XKMSException exception = ExceptionMapper.fromResponse(locateResultType);
+        if (exception != null) {
+            throw exception;
+        }
+
+        if (!locateResultType.getUnverifiedKeyBinding().iterator().hasNext()) {
+            throw new XKMSNotFoundException(
+                 "X509Certificate is not found for id: " + ids);
+        }
+        KeyInfoType keyInfo = locateResultType.getUnverifiedKeyBinding()
+            .iterator().next().getKeyInfo();
+        if (!keyInfo.getContent().iterator().hasNext()) {
+            throw new XKMSNotFoundException(
+                 "X509Certificate is not found for id: " + ids);
+        }
+        JAXBElement<X509DataType> x509Data = (JAXBElement<X509DataType>)keyInfo
+            .getContent().iterator().next();
+        JAXBElement<byte[]> certificate = (JAXBElement<byte[]>)x509Data
+            .getValue().getX509IssuerSerialOrX509SKIOrX509SubjectName()
+            .iterator().next();
+
+        try {
+            CertificateFactory cf = CertificateFactory.getInstance("X.509");
+            X509Certificate cert = (X509Certificate)cf
+                .generateCertificate(new ByteArrayInputStream(certificate
+                    .getValue()));
+            return cert;
+        } catch (CertificateException e) {
+            throw new XKMSLocateException(XKMS_LOCATE_INVALID_CERTIFICATE, e);
+        }
+    }
+
+    protected ValidateRequestType prepareValidateXKMSRequest(
+                                                          X509Certificate cert) {
+        JAXBElement<byte[]> x509Cert;
+        try {
+            x509Cert = DSIG_OF.createX509DataTypeX509Certificate(cert
+                .getEncoded());
+        } catch (CertificateEncodingException e) {
+            throw new IllegalArgumentException(e);
+        }
+        X509DataType x509DataType = DSIG_OF.createX509DataType();
+        x509DataType.getX509IssuerSerialOrX509SKIOrX509SubjectName().add(
+                                                                         x509Cert);
+        JAXBElement<X509DataType> x509Data = DSIG_OF
+            .createX509Data(x509DataType);
+
+        KeyInfoType keyInfoType = DSIG_OF.createKeyInfoType();
+        keyInfoType.getContent().add(x509Data);
+
+        QueryKeyBindingType queryKeyBindingType = XKMS_OF
+            .createQueryKeyBindingType();
+        queryKeyBindingType.setKeyInfo(keyInfoType);
+
+        ValidateRequestType validateRequestType = XKMS_OF
+            .createValidateRequestType();
+        setGenericRequestParams(validateRequestType);
+        validateRequestType.setQueryKeyBinding(queryKeyBindingType);
+        // temporary
+        validateRequestType.setId(cert.getSubjectDN().toString());
+        return validateRequestType;
+    }
+
+    protected CertificateValidationResult parseValidateXKMSResponse(ValidateResultType validateResultType,
+                                                                 String id) {
+        XKMSException exception = ExceptionMapper.fromResponse(validateResultType);
+        if (exception != null) {
+            throw exception;
+        }
+
+        StatusType status = validateResultType.getKeyBinding().iterator()
+            .next().getStatus();
+        if (KeyBindingEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_VALID != status.getStatusValue()) {
+            return new CertificateValidationResult(false, XKMS_VALIDATE_ERROR);
+        }
+        return new CertificateValidationResult(true, null);
+    }
+
+    public static class CertificateValidationResult {
+
+        private final boolean valid;
+        private final String description;
+
+        public CertificateValidationResult(boolean valid, String description) {
+            this.valid = valid;
+            this.description = description;
+        }
+
+        public boolean isValid() {
+            return valid;
+        }
+
+        public String getDescription() {
+            return description;
+        }
+    }
+
+    private void setGenericRequestParams(MessageAbstractType request) {
+        request.setService(XKMSConstants.XKMS_ENDPOINT_NAME);
+        request.setId(UUID.randomUUID().toString());
+    }
+
+}

Added: cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-INF/blueprint/beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-INF/blueprint/beans.xml?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-INF/blueprint/beans.xml (added)
+++ cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-INF/blueprint/beans.xml Sat May 18 16:04:37 2013
@@ -0,0 +1,44 @@
+<!-- #%L ReservationService Client %% Copyright (C) 2011 - 2012 Talend Inc. 
+	%% Licensed under the Apache License, Version 2.0 (the "License"); you may 
+	not use this file except in compliance with the License. You may obtain a 
+	copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless 
+	required by applicable law or agreed to in writing, software distributed 
+	under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES 
+	OR CONDITIONS OF ANY KIND, either express or implied. See the License for 
+	the specific language governing permissions and limitations under the License. 
+	#L% -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://cxf.apache.org/blueprint/core"
+	xmlns:jaxws="http://cxf.apache.org/blueprint/jaxws"
+	xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
+	xmlns:ext="http://www.osgi.org/xmlns/blueprint-ext/v1.1.0"
+	xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
+  						http://www.osgi.org/xmlns/blueprint-ext/v1.1.0 https://svn.apache.org/repos/asf/aries/tags/blueprint-0.3.1/blueprint-core/src/main/resources/org/apache/aries/blueprint/ext/blueprint-ext.xsd  
+  						http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
+  						http://cxf.apache.org/blueprint/jaxws http://cxf.apache.org/schemas/blueprint/jaxws.xsd
+  						http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd
+  	">
+
+	<cm:property-placeholder persistent-id="tesbext.runtime">
+		<cm:default-properties>
+			<cm:property name="xkms.endpoint" value="http://localhost:8040/services/XKMS/" />
+		</cm:default-properties>
+	</cm:property-placeholder>
+	
+	<bean id="additionalClasses" class="org.apache.cxf.xkms.model.extensions.AdditionalClassesFactory"/>
+	
+	<jaxws:client id="XKMSConsumer"
+		xmlns:serviceNamespace="http://www.w3.org/2002/03/xkms#wsdl"
+		serviceClass="org.w3._2002._03.xkms_wsdl.XKMSPortType"
+		serviceName="serviceNamespace:XKMSPortType" endpointName="serviceNamespace:XKMSService"
+		address="${xkms.endpoint}">
+        <jaxws:properties>
+            <entry key="jaxb.additionalContextClasses">
+            	<bean class="java.lang.Object" factory-ref="additionalClasses" factory-method="create"/>
+            </entry>
+        </jaxws:properties>
+	</jaxws:client>
+
+	<service ref="XKMSConsumer" interface="org.w3._2002._03.xkms_wsdl.XKMSPortType" />
+
+</blueprint>

Added: cxf/trunk/services/xkms/xkms-common/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/pom.xml?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/pom.xml (added)
+++ cxf/trunk/services/xkms/xkms-common/pom.xml Sat May 18 16:04:37 2013
@@ -0,0 +1,74 @@
+<?xml version="1.0"?>
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+	license agreements. See the NOTICE file distributed with this work for additional 
+	information regarding copyright ownership. The ASF licenses this file to 
+	you under the Apache License, Version 2.0 (the "License"); you may not use 
+	this file except in compliance with the License. You may obtain a copy of 
+	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+	by applicable law or agreed to in writing, software distributed under the 
+	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+	OF ANY KIND, either express or implied. See the License for the specific 
+	language governing permissions and limitations under the License. 
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.apache.cxf.services.xkms</groupId>
+	<artifactId>cxf-services-xkms-common</artifactId>
+	<packaging>bundle</packaging>
+	<name>Apache CXF XKMS Common</name>
+	<url>http://cxf.apache.org</url>
+
+	<parent>
+		<groupId>org.apache.cxf</groupId>
+		<artifactId>cxf-parent</artifactId>
+		<version>2.8.0-SNAPSHOT</version>
+		<relativePath>../../../parent/pom.xml</relativePath>
+	</parent>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework</groupId>
+            <artifactId>spring-beans</artifactId>
+        </dependency>
+    </dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.cxf</groupId>
+				<artifactId>cxf-codegen-plugin</artifactId>
+				<version>${project.version}</version>
+				<executions>
+					<execution>
+						<id>generate-sources</id>
+						<phase>generate-sources</phase>
+						<goals>
+							<goal>wsdl2java</goal>
+						</goals>
+						<configuration>
+ 							<frontend>jaxws21</frontend>							
+							<wsdlOptions>
+								<wsdlOption>
+									<wsdl>${basedir}/src/main/model/xkms.wsdl</wsdl>
+									<bindingFile>${basedir}/src/main/model/binding.xjb</bindingFile>
+								</wsdlOption>
+							</wsdlOptions>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<extensions>true</extensions>
+				<configuration>
+					<instructions>
+						<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+					</instructions>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/ExceptionMapper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/ExceptionMapper.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/ExceptionMapper.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/ExceptionMapper.java Sat May 18 16:04:37 2013
@@ -0,0 +1,88 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.xkms.exception;
+
+import org.apache.cxf.xkms.model.extensions.ResultDetails;
+import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
+import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
+import org.apache.cxf.xkms.model.xkms.ResultType;
+
+public final class ExceptionMapper {
+
+    private ExceptionMapper() {
+    }
+
+    public static <T extends ResultType> T toResponse(Exception e, T result) {
+        if (e instanceof XKMSException) {
+            XKMSException xkmsEx = (XKMSException)e;
+            result = initResultType(xkmsEx.getMessage(), xkmsEx.getResultMajor(), xkmsEx.getResultMinor(), result);
+        } else if (e instanceof UnsupportedOperationException) {
+            result = initResultType(e.getMessage(),
+                                    ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER,
+                                    ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_MESSAGE_NOT_SUPPORTED,
+                                    result);
+        } else if (e instanceof IllegalArgumentException) {
+            result = initResultType(e.getMessage(),
+                                    ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER,
+                                    ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE,
+                                    result);
+        } else {
+            result = initResultType(e.getMessage(),
+                                    ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
+                                    ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE,
+                                    result);
+        }
+        return result;
+    }
+
+    public static XKMSException fromResponse(ResultType result) {
+        ResultMajorEnum major = null;
+        if ((result.getResultMajor() != null) && !result.getResultMajor().isEmpty()) {
+            major = ResultMajorEnum.fromValue(result.getResultMajor());
+        }
+        if (major == ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SUCCESS) {
+            return null;
+        }
+        ResultMinorEnum minor = null;
+        if ((result.getResultMinor() != null) && !result.getResultMinor().isEmpty()) {
+            minor = ResultMinorEnum.fromValue(result.getResultMinor());
+        }
+
+        String message = null;
+        if (!result.getMessageExtension().isEmpty()) {
+            message = ((ResultDetails) result.getMessageExtension().get(0)).getDetails();
+        }
+        return new XKMSException(major, minor, message);
+    }
+
+    private static <T extends ResultType> T initResultType(String message, ResultMajorEnum majorCode,
+                                             ResultMinorEnum minorCode, T result) {
+        result.setResultMajor((majorCode != null)
+            ? majorCode.value() : ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER.value());
+        result.setResultMinor((minorCode != null)
+            ? minorCode.value() : ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE.value());
+        if (message != null) {
+            ResultDetails resultDetails = new ResultDetails();
+            resultDetails.setDetails(message);
+            result.getMessageExtension().add(resultDetails);
+        }
+        return result;
+    }
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSArgumentNotMatchException.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSArgumentNotMatchException.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSArgumentNotMatchException.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSArgumentNotMatchException.java Sat May 18 16:04:37 2013
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.xkms.exception;
+
+import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
+import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
+
+public class XKMSArgumentNotMatchException extends XKMSException {
+
+    private static final long serialVersionUID = 868729742068991784L;
+
+    public XKMSArgumentNotMatchException() {
+        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
+              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_NO_MATCH);
+    }
+
+    public XKMSArgumentNotMatchException(String arg0) {
+        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
+              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_NO_MATCH, arg0);
+    }
+
+    public XKMSArgumentNotMatchException(String arg0, Throwable arg1) {
+        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
+              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_NO_MATCH, arg0, arg1);
+    }
+
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSCertificateException.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSCertificateException.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSCertificateException.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSCertificateException.java Sat May 18 16:04:37 2013
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.xkms.exception;
+
+import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
+import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
+
+public class XKMSCertificateException extends XKMSException {
+
+    private static final long serialVersionUID = 868729742068991784L;
+
+    public XKMSCertificateException() {
+        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
+              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE);
+    }
+
+    public XKMSCertificateException(String arg0) {
+        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
+              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE, arg0);
+    }
+
+    public XKMSCertificateException(String arg0, Throwable arg1) {
+        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
+              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE, arg0, arg1);
+    }
+
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSConfigurationException.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSConfigurationException.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSConfigurationException.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSConfigurationException.java Sat May 18 16:04:37 2013
@@ -0,0 +1,34 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.xkms.exception;
+
+import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
+import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
+
+
+public class XKMSConfigurationException extends XKMSException {
+
+    private static final long serialVersionUID = 868729742068991786L;
+
+    public XKMSConfigurationException(ResultMajorEnum resultMajor, ResultMinorEnum resultMinor, String msg) {
+        super(resultMajor, resultMinor, msg);
+    }
+
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSException.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSException.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSException.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSException.java Sat May 18 16:04:37 2013
@@ -0,0 +1,68 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.xkms.exception;
+
+import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
+import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
+
+public class XKMSException extends RuntimeException {
+
+    private static final long serialVersionUID = 7247415453067157299L;
+    
+    private ResultMajorEnum resultMajor;
+    private ResultMinorEnum resultMinor;
+
+    public XKMSException(ResultMajorEnum resultMajor, ResultMinorEnum resultMinor) {
+        super(String.format("Result major: %s; result minor: %s", resultMajor.toString(),
+                            resultMinor.toString()));
+        this.resultMajor = resultMajor;
+        this.resultMinor = resultMinor;
+    }
+
+    public XKMSException(ResultMajorEnum resultMajor, ResultMinorEnum resultMinor, String msg) {
+        super((msg != null) ? msg : String.format("Result major: %s; result minor: %s", resultMajor.toString(),
+                            resultMinor.toString()));
+        this.resultMajor = resultMajor;
+        this.resultMinor = resultMinor;
+    }
+
+    public XKMSException(ResultMajorEnum resultMajor, ResultMinorEnum resultMinor, String arg0, Throwable arg1) {
+        super(arg0, arg1);
+        this.resultMajor = resultMajor;
+        this.resultMinor = resultMinor;
+    }
+
+    public XKMSException(String arg0) {
+        super(arg0);
+    }
+
+    public XKMSException(String arg0, Throwable arg1) {
+        super(arg0, arg1);
+    }
+
+    public ResultMajorEnum getResultMajor() {
+        return resultMajor;
+    }
+
+    public ResultMinorEnum getResultMinor() {
+        return resultMinor;
+    }
+
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSLocateException.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSLocateException.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSLocateException.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSLocateException.java Sat May 18 16:04:37 2013
@@ -0,0 +1,35 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.xkms.exception;
+
+
+public class XKMSLocateException extends XKMSException {
+
+    private static final long serialVersionUID = 868729742068991784L;
+
+    public XKMSLocateException(String msg) {
+        super(msg);
+    }
+
+    public XKMSLocateException(String msg, Throwable e) {
+        super(msg, e);
+    }
+
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSNotFoundException.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSNotFoundException.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSNotFoundException.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSNotFoundException.java Sat May 18 16:04:37 2013
@@ -0,0 +1,35 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.xkms.exception;
+
+
+public class XKMSNotFoundException extends XKMSException {
+
+    private static final long serialVersionUID = 868729742068991785L;
+
+    public XKMSNotFoundException(String arg0) {
+        super(arg0);
+    }
+
+    public XKMSNotFoundException(String arg0, Throwable arg1) {
+        super(arg0, arg1);
+    }
+
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSRequestException.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSRequestException.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSRequestException.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSRequestException.java Sat May 18 16:04:37 2013
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.xkms.exception;
+
+import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
+import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
+
+public class XKMSRequestException extends XKMSException {
+
+    private static final long serialVersionUID = 868729742068991783L;
+
+    public XKMSRequestException() {
+        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER,
+              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE);
+    }
+
+    public XKMSRequestException(String arg0) {
+        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER,
+              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE, arg0);
+    }
+
+    public XKMSRequestException(String arg0, Throwable arg1) {
+        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER,
+              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE, arg0, arg1);
+    }
+
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSTooManyResponsesException.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSTooManyResponsesException.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSTooManyResponsesException.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSTooManyResponsesException.java Sat May 18 16:04:37 2013
@@ -0,0 +1,44 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.xkms.exception;
+
+import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
+import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
+
+public class XKMSTooManyResponsesException extends XKMSException {
+
+    private static final long serialVersionUID = 868729742068991783L;
+
+    public XKMSTooManyResponsesException() {
+        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
+              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_TOO_MANY_RESPONSES);
+    }
+
+    public XKMSTooManyResponsesException(String arg0) {
+        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
+              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_TOO_MANY_RESPONSES, arg0);
+    }
+
+    public XKMSTooManyResponsesException(String arg0, Throwable arg1) {
+        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
+              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_TOO_MANY_RESPONSES, arg0, arg1);
+    }
+
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSValidateException.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSValidateException.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSValidateException.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSValidateException.java Sat May 18 16:04:37 2013
@@ -0,0 +1,35 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.xkms.exception;
+
+
+public class XKMSValidateException extends XKMSException {
+
+    private static final long serialVersionUID = 868729742068991785L;
+
+    public XKMSValidateException(String msg) {
+        super(msg);
+    }
+
+    public XKMSValidateException(String msg, Throwable e) {
+        super(msg, e);
+    }
+
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Applications.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Applications.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Applications.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Applications.java Sat May 18 16:04:37 2013
@@ -0,0 +1,57 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.xkms.handlers;
+
+public enum Applications {
+    /**
+     * Certificate Subject Name
+     */
+    PKIX("urn:ietf:rfc:2459"),
+    /**
+     * DNS address of http server
+     */
+    TLS_HTTPS("urn:ietf:rfc:2818"),
+    /**
+     * Service Endpoint Name
+     */
+    SERVICE_SOAP("urn:apache:cxf:service:soap"),
+    /**
+     * Certificate Issuer
+     */
+    ISSUER("urn:x509:issuer"),
+    /**
+     * Certificate Serial Number
+     */
+    SERIAL("urn:x509:serial"),
+    /**
+     * SMTP email address of subject
+     */
+    PGP("urn:ietf:rfc:2440");
+
+    private String uri;
+
+    private Applications(String uri) {
+        this.uri = uri;
+    }
+
+    public String getUri() {
+        return this.uri;
+    }
+
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/DnUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/DnUtils.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/DnUtils.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/DnUtils.java Sat May 18 16:04:37 2013
@@ -0,0 +1,125 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.xkms.handlers;
+
+
+/**
+ * A couple of utility methods for working with X500 Distinguished Names
+ */
+public final class DnUtils {
+    
+    private DnUtils() {
+        
+    }
+
+    public static String extractMostSignificantAttribute(String identifier) {
+        // first find the first comma-delimited value
+        String[] split = identifier.split(",");
+        String msaVal = null;
+        String cnVal = null;
+        String ouVal = null;
+        for (String val : split) {
+            val = normalizeAttribute(val);
+            if (null == msaVal) {
+                msaVal = val;
+            }
+            if ((cnVal == null) && val.startsWith("cn=")) {
+                cnVal = val;
+            }
+            if ((ouVal == null) && val.startsWith("ou=")) {
+                ouVal = val;
+            }
+        }
+        if (cnVal != null) {
+            return cnVal;
+        } else if (ouVal != null) {
+            return ouVal;
+        } else {
+            return msaVal;
+        }
+    }
+
+    public static String extractMostSignificantAttributeValue(String identifier) {
+        String attr = extractMostSignificantAttribute(identifier);
+        String[] split;
+        if (attr != null) {
+            split = attr.split("=");
+            // normalize the prefix if present
+            if (split.length == 2) {
+                return split[1].trim();
+            } else {
+                return attr.trim();
+            }
+        }
+        return attr;
+    }
+    
+    private static String normalizeAttribute(String val) {
+        String[] split;
+        if (null != val) {
+            split = val.split("=");
+            // normalize the prefix if present
+            if (split.length == 2) {
+                String prefix = split[0].toLowerCase().trim();
+                String value = split[1].trim();
+                val = prefix + "=" + value;
+            } else {
+                val = val.trim();
+            }
+        }
+        return val;
+    }
+
+    public static class DnAttribute {
+
+        private String prefix;
+        private String name;
+        private String full;
+
+        public DnAttribute(String attributeDefinition) {
+            full = attributeDefinition;
+            String[] split = attributeDefinition.split("=");
+            if (1 == split.length) {
+                this.name = split[0];
+            } else if (2 == split.length) {
+                this.prefix = split[0];
+                this.name = split[1];
+            }
+        }
+
+        public String prefix() {
+            return prefix;
+        }
+
+        public String name() {
+            return name;
+        }
+
+        public String full() {
+            return full;
+        }
+
+        @Override
+        public String toString() {
+            return this.full;
+        }
+
+    }
+
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/HandlerContext.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/HandlerContext.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/HandlerContext.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/HandlerContext.java Sat May 18 16:04:37 2013
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.xkms.handlers;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class HandlerContext {
+    
+    private Map<Class<?>, Object> contextMap = new HashMap<Class<?>, Object>();
+
+    public HandlerContext() {
+    }
+
+    public <T> void set(Class<T> cClass, T cObject) {
+        contextMap.put(cClass, cObject);
+    }
+
+    @SuppressWarnings("unchecked")
+    public <T> T get(Class<T> cClass) {
+        return (T)(contextMap.get(cClass));
+    }
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/KeyRegisterHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/KeyRegisterHandler.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/KeyRegisterHandler.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/KeyRegisterHandler.java Sat May 18 16:04:37 2013
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.xkms.handlers;
+
+import org.apache.cxf.xkms.model.xkms.RegisterRequestType;
+import org.apache.cxf.xkms.model.xkms.RegisterResultType;
+import org.apache.cxf.xkms.model.xkms.ReissueRequestType;
+import org.apache.cxf.xkms.model.xkms.ReissueResultType;
+import org.apache.cxf.xkms.model.xkms.RequestAbstractType;
+import org.apache.cxf.xkms.model.xkms.RevokeRequestType;
+import org.apache.cxf.xkms.model.xkms.RevokeResultType;
+
+public interface KeyRegisterHandler {
+
+    boolean canProcess(RequestAbstractType request);
+
+    RegisterResultType register(RegisterRequestType request, RegisterResultType response);
+
+    ReissueResultType reissue(ReissueRequestType request, ReissueResultType response);
+
+    RevokeResultType revoke(RevokeRequestType request, RevokeResultType response);
+
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Locator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Locator.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Locator.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Locator.java Sat May 18 16:04:37 2013
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.xkms.handlers;
+
+import org.apache.cxf.xkms.model.xkms.LocateRequestType;
+import org.apache.cxf.xkms.model.xkms.UnverifiedKeyBindingType;
+
+public interface Locator {
+
+    UnverifiedKeyBindingType locate(LocateRequestType request);
+
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Validator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Validator.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Validator.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Validator.java Sat May 18 16:04:37 2013
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.xkms.handlers;
+
+import org.apache.cxf.xkms.model.xkms.StatusType;
+import org.apache.cxf.xkms.model.xkms.ValidateRequestType;
+
+public interface Validator {
+
+    StatusType validate(ValidateRequestType request);
+
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/XKMSConstants.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/XKMSConstants.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/XKMSConstants.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/XKMSConstants.java Sat May 18 16:04:37 2013
@@ -0,0 +1,27 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.xkms.handlers;
+
+public final class XKMSConstants {
+    public static final String XKMS_ENDPOINT_NAME = "http://cxf.apache.org/services/XKMS/";
+
+    private XKMSConstants() {
+    }
+
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/AdditionalClassesFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/AdditionalClassesFactory.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/AdditionalClassesFactory.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/AdditionalClassesFactory.java Sat May 18 16:04:37 2013
@@ -0,0 +1,27 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.xkms.model.extensions;
+
+
+public class AdditionalClassesFactory {
+    public Class<?>[] create() {
+        return new Class[]{ResultDetails.class};
+    }
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArrayFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArrayFactoryBean.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArrayFactoryBean.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArrayFactoryBean.java Sat May 18 16:04:37 2013
@@ -0,0 +1,76 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.xkms.model.extensions;
+
+import java.util.List;
+
+import org.springframework.beans.factory.FactoryBean;
+
+public class ClassArrayFactoryBean implements FactoryBean<Object> {
+
+    private List<String> classNames;
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.springframework.beans.factory.FactoryBean#getObject()
+     */
+    public Object getObject() throws Exception {
+
+        final Class<?>[] classes = new Class<?>[classNames.size()];
+        for (int i = 0; i < classNames.size(); i++) {
+            classes[i] = Class.forName(classNames.get(i));
+        }
+        return classes;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.springframework.beans.factory.FactoryBean#getObjectType()
+     */
+    public Class<?> getObjectType() {
+        return Class[].class;
+    }
+
+    /*
+     * (non-Javadoc)
+     *
+     * @see org.springframework.beans.factory.FactoryBean#isSingleton()
+     */
+    public boolean isSingleton() {
+        return true;
+    }
+
+    /**
+     * @return the classNames
+     */
+    public List<String> getClassNames() {
+        return classNames;
+    }
+
+    /**
+     * @param classNames the classNames to set
+     */
+    public void setClassNames(List<String> classNames) {
+        this.classNames = classNames;
+    }
+
+}

Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ResultDetails.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ResultDetails.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ResultDetails.java (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ResultDetails.java Sat May 18 16:04:37 2013
@@ -0,0 +1,48 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.xkms.model.extensions;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.cxf.xkms.model.xkms.MessageExtensionAbstractType;
+
+@XmlRootElement
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "resultDetails", propOrder = { "details" })
+public class ResultDetails extends MessageExtensionAbstractType {
+    @XmlElement(name = "Details", required = true)
+    protected String details;
+
+    public ResultDetails() {
+    }
+
+    public String getDetails() {
+        return details;
+    }
+
+    public void setDetails(String details) {
+        this.details = details;
+    }
+
+}



RE: Uh oh.... (Re: svn commit: r1484133 [1/6]...)

Posted by Andrei Shakirin <as...@talend.com>.
Hi Glen,

Fixed.

Thanks for spotting this.

Regards,
Andrei.

> -----Original Message-----
> From: Glen Mazza [mailto:glen.mazza@gmail.com]
> Sent: Montag, 20. Mai 2013 17:35
> To: dev@cxf.apache.org; ashakirin@apache.org
> Subject: Uh oh.... (Re: svn commit: r1484133 [1/6]...)
> 
> Andrei, unsure if someone else has mentioned this but your XML
> indentation is all over the place -- it should be space-padded (no tabs)
> with 4 indentation throughout.  If you have that configured in Eclipse
> you can right-click each source file and select the format option for it
> to reformat the XML files for you.  Right now, your code is vetoable.
> 
> Regards,
> Glen
> 
> On 05/18/2013 12:04 PM, ashakirin@apache.org wrote:
> > Author: ashakirin
> > Date: Sat May 18 16:04:37 2013
> > New Revision: 1484133
> >
> > URL: http://svn.apache.org/r1484133
> > Log:
> > XKMS contribution - first draft version
> >
> > Added:
> >      cxf/trunk/services/xkms/
> >      cxf/trunk/services/xkms/README.txt
> >      cxf/trunk/services/xkms/pom.xml
> >      cxf/trunk/services/xkms/xkms-client/
> >      cxf/trunk/services/xkms/xkms-client/pom.xml
> >      cxf/trunk/services/xkms/xkms-client/src/
> >      cxf/trunk/services/xkms/xkms-client/src/main/
> >      cxf/trunk/services/xkms/xkms-client/src/main/java/
> >      cxf/trunk/services/xkms/xkms-client/src/main/java/org/
> >      cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/
> >      cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/
> >      cxf/trunk/services/xkms/xkms-
> client/src/main/java/org/apache/cxf/xkms/
> >      cxf/trunk/services/xkms/xkms-
> client/src/main/java/org/apache/cxf/xkms/client/
> >      cxf/trunk/services/xkms/xkms-
> client/src/main/java/org/apache/cxf/xkms/client/X509AppId.java
> >      cxf/trunk/services/xkms/xkms-
> client/src/main/java/org/apache/cxf/xkms/client/XKMSInvoker.java
> >      cxf/trunk/services/xkms/xkms-client/src/main/resources/
> >      cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-INF/
> >      cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-
> INF/blueprint/
> >      cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-
> INF/blueprint/beans.xml
> >      cxf/trunk/services/xkms/xkms-common/
> >      cxf/trunk/services/xkms/xkms-common/pom.xml
> >      cxf/trunk/services/xkms/xkms-common/src/
> >      cxf/trunk/services/xkms/xkms-common/src/main/
> >      cxf/trunk/services/xkms/xkms-common/src/main/java/
> >      cxf/trunk/services/xkms/xkms-common/src/main/java/org/
> >      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/
> >      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/ExceptionMapper.
> java
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSArgumentN
> otMatchException.java
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSCertificateEx
> ception.java
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSConfiguratio
> nException.java
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSException.ja
> va
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSLocateExcep
> tion.java
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSNotFoundEx
> ception.java
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSRequestExce
> ption.java
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSTooManyRe
> sponsesException.java
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSValidateExce
> ption.java
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/Applications.java
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/DnUtils.java
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/HandlerContext.jav
> a
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/KeyRegisterHandler
> .java
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/Locator.java
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/Validator.java
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/XKMSConstants.jav
> a
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/model/
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/model/extensions/
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/model/extensions/Additional
> ClassesFactory.java
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArray
> FactoryBean.java
> >      cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/model/extensions/ResultDet
> ails.java
> >      cxf/trunk/services/xkms/xkms-common/src/main/model/
> >      cxf/trunk/services/xkms/xkms-common/src/main/model/binding.xjb
> >      cxf/trunk/services/xkms/xkms-common/src/main/model/xenc-
> schema.xsd
> >      cxf/trunk/services/xkms/xkms-common/src/main/model/xkms.wsdl
> >      cxf/trunk/services/xkms/xkms-common/src/main/model/xkms.xsd
> >      cxf/trunk/services/xkms/xkms-common/src/main/model/xmldsig-core-
> schema.xsd
> >      cxf/trunk/services/xkms/xkms-features/
> >      cxf/trunk/services/xkms/xkms-features/pom.xml
> >      cxf/trunk/services/xkms/xkms-features/src/
> >      cxf/trunk/services/xkms/xkms-features/src/main/
> >      cxf/trunk/services/xkms/xkms-features/src/main/resources/
> >      cxf/trunk/services/xkms/xkms-
> features/src/main/resources/features.xml
> >      cxf/trunk/services/xkms/xkms-
> features/src/main/resources/org.apache.cxf.xkms.cfg
> >      cxf/trunk/services/xkms/xkms-itests/
> >      cxf/trunk/services/xkms/xkms-itests/pom.xml
> >      cxf/trunk/services/xkms/xkms-itests/src/
> >      cxf/trunk/services/xkms/xkms-itests/src/test/
> >      cxf/trunk/services/xkms/xkms-itests/src/test/java/
> >      cxf/trunk/services/xkms/xkms-itests/src/test/java/org/
> >      cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/
> >      cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/
> >      cxf/trunk/services/xkms/xkms-
> itests/src/test/java/org/apache/cxf/xkms/
> >      cxf/trunk/services/xkms/xkms-
> itests/src/test/java/org/apache/cxf/xkms/itests/
> >      cxf/trunk/services/xkms/xkms-
> itests/src/test/java/org/apache/cxf/xkms/itests/XkmsServiceTest.java
> >      cxf/trunk/services/xkms/xkms-itests/src/test/resources/
> >      cxf/trunk/services/xkms/xkms-itests/src/test/resources/XKMS-soapui-
> project.xml
> >      cxf/trunk/services/xkms/xkms-osgi/
> >      cxf/trunk/services/xkms/xkms-osgi/pom.xml
> >      cxf/trunk/services/xkms/xkms-osgi/src/
> >      cxf/trunk/services/xkms/xkms-osgi/src/main/
> >      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/
> >      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/OSGI-INF/
> >      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/OSGI-
> INF/blueprint/
> >      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/OSGI-
> INF/blueprint/cxf-endpoint.xml
> >      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/OSGI-
> INF/blueprint/xkms-key-handlers.xml
> >      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/test-requests/
> >      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/test-
> requests/request-locate.xml
> >      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/test-
> requests/request-validate.xml
> >      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/test-
> requests/response-locate.xml
> >      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/test-
> requests/response-validate.xml
> >      cxf/trunk/services/xkms/xkms-osgi/src/test/
> >      cxf/trunk/services/xkms/xkms-osgi/src/test/resources/
> >      cxf/trunk/services/xkms/xkms-osgi/src/test/resources/test-requests/
> >      cxf/trunk/services/xkms/xkms-osgi/src/test/resources/test-
> requests/request-locate.xml
> >      cxf/trunk/services/xkms/xkms-osgi/src/test/resources/test-
> requests/request-validate.xml
> >      cxf/trunk/services/xkms/xkms-osgi/src/test/resources/test-
> requests/response-locate.xml
> >      cxf/trunk/services/xkms/xkms-osgi/src/test/resources/test-
> requests/response-validate.xml
> >      cxf/trunk/services/xkms/xkms-service/
> >      cxf/trunk/services/xkms/xkms-service/pom.xml
> >      cxf/trunk/services/xkms/xkms-service/src/
> >      cxf/trunk/services/xkms/xkms-service/src/main/
> >      cxf/trunk/services/xkms/xkms-service/src/main/java/
> >      cxf/trunk/services/xkms/xkms-service/src/main/java/org/
> >      cxf/trunk/services/xkms/xkms-service/src/main/java/org/apache/
> >      cxf/trunk/services/xkms/xkms-service/src/main/java/org/apache/cxf/
> >      cxf/trunk/services/xkms/xkms-
> service/src/main/java/org/apache/cxf/xkms/
> >      cxf/trunk/services/xkms/xkms-
> service/src/main/java/org/apache/cxf/xkms/service/
> >      cxf/trunk/services/xkms/xkms-
> service/src/main/java/org/apache/cxf/xkms/service/XKMSResponseFactory
> .java
> >      cxf/trunk/services/xkms/xkms-
> service/src/main/java/org/apache/cxf/xkms/service/XKMSService.java
> >      cxf/trunk/services/xkms/xkms-war/
> >      cxf/trunk/services/xkms/xkms-war/pom.xml
> >      cxf/trunk/services/xkms/xkms-war/src/
> >      cxf/trunk/services/xkms/xkms-war/src/main/
> >      cxf/trunk/services/xkms/xkms-war/src/main/resources/
> >      cxf/trunk/services/xkms/xkms-war/src/main/resources/log4j.properties
> >      cxf/trunk/services/xkms/xkms-
> war/src/main/resources/logging.properties
> >      cxf/trunk/services/xkms/xkms-war/src/main/webapp/
> >      cxf/trunk/services/xkms/xkms-war/src/main/webapp/WEB-INF/
> >      cxf/trunk/services/xkms/xkms-war/src/main/webapp/WEB-INF/cxf-
> servlet.xml
> >      cxf/trunk/services/xkms/xkms-war/src/main/webapp/WEB-
> INF/web.xml
> >      cxf/trunk/services/xkms/xkms-war/src/main/webapp/WEB-INF/xkms-
> endpoint.xml
> >      cxf/trunk/services/xkms/xkms-war/src/main/webapp/WEB-INF/xkms-
> key-handlers.xml
> >      cxf/trunk/services/xkms/xkms-x509-handlers/
> >      cxf/trunk/services/xkms/xkms-x509-handlers/pom.xml
> >      cxf/trunk/services/xkms/xkms-x509-handlers/src/
> >      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/
> >      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/
> >      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/xkms/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/xkms/x509/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/AbstractX509R
> egisterHandler.java
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/FileRegisterHa
> ndler.java
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/LDAPSearch.ja
> va
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/LdapRegisterH
> andler.java
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/xkms/x509/locator/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/xkms/x509/locator/FileLocator.java
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/xkms/x509/locator/LdapLocator.jav
> a
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/xkms/x509/parser/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/xkms/x509/parser/LocateRequestP
> arser.java
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/xkms/x509/parser/ValidateRequest
> Parser.java
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/xkms/x509/utils/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/xkms/x509/utils/X509Utils.java
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/xkms/x509/validator/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/main/java/org/apache/cxf/xkms/x509/validator/DateValidator.
> java
> >      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/
> >      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/
> >      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/java/org/apache/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/java/org/apache/cxf/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/java/org/apache/cxf/xkms/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/java/org/apache/cxf/xkms/file/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/java/org/apache/cxf/xkms/file/persistence/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/java/org/apache/cxf/xkms/file/persistence/FilePersistenc
> eManagerTest.java
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/java/org/apache/cxf/xkms/ldap/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/java/org/apache/cxf/xkms/ldap/persistence/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/java/org/apache/cxf/xkms/ldap/persistence/LDAPPersist
> enceManagerITest.java
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/java/org/apache/cxf/xkms/ldap/persistence/LDAPPersist
> enceManagerTest.java
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/java/org/apache/cxf/xkms/ldap/persistence/LDAPSearchT
> est.java
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/java/org/apache/cxf/xkms/x509/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/BasicValidation
> Test.java
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/ValidateDateHa
> ndlerTest.java
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/java/org/apache/cxf/xkms/x509/utils/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/java/org/apache/cxf/xkms/x509/utils/X509UtilsTest.java
> >      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/resources/cert1.bas64
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/resources/cert1.cer
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/resources/registerRequest.xml
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/resources/registerRequestWithCertificate.xml
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/resources/registerResult.xml
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/resources/reissueRequest.xml
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/resources/revokeRequest.xml
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/resources/store1/
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/resources/store1/CN-www.issuer.com_L-CGN_ST-
> NRW_C-DE_O-Issuer-11688544847478700689-CN-www.issuer.com_L-
> CGN_ST-NRW_C-DE_O-Issuer.cer
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/resources/validateRequestCorrupted.xml
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/resources/validateRequestExpired.xml
> >      cxf/trunk/services/xkms/xkms-x509-
> handlers/src/test/resources/validateRequestOK.xml
> > Modified:
> >      cxf/trunk/services/pom.xml
> >
> > Modified: cxf/trunk/services/pom.xml
> > URL:
> http://svn.apache.org/viewvc/cxf/trunk/services/pom.xml?rev=1484133&r1
> =1484132&r2=1484133&view=diff
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/pom.xml (original)
> > +++ cxf/trunk/services/pom.xml Sat May 18 16:04:37 2013
> > @@ -36,6 +36,7 @@
> >           <module>sts</module>
> >           <module>wsn</module>
> >           <module>ws-discovery</module>
> > +        <module>xkms</module>
> >       </modules>
> >
> >   </project>
> >
> > Added: cxf/trunk/services/xkms/README.txt
> > URL:
> http://svn.apache.org/viewvc/cxf/trunk/services/xkms/README.txt?rev=14
> 84133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/README.txt (added)
> > +++ cxf/trunk/services/xkms/README.txt Sat May 18 16:04:37 2013
> > @@ -0,0 +1,14 @@
> > +
> > +This folder contains the XKMS (XML key Management Service)
> implementation of
> > +Apache CXF. It contains:
> > +
> > +
> > +xkms-client - The XKMS client and invoker implementations
> > +xkms--common - Common functionality, XML schemas, generated code
> > +xkms-service - The XKMS core service implementation
> > +xkms-x509-handlers - The implementation of pluggable commands for
> X509 keys.
> > +xkms-features - Karaf features for XKMS client and service
> > +xkms-itests - Intergation tests
> > +xkms-osgi - OSGi blueprint configuration for OSGi deployment
> > +xkms-war - Web spring configuration for Web depoyment
> > +
> >
> > Added: cxf/trunk/services/xkms/pom.xml
> > URL:
> http://svn.apache.org/viewvc/cxf/trunk/services/xkms/pom.xml?rev=14841
> 33&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/pom.xml (added)
> > +++ cxf/trunk/services/xkms/pom.xml Sat May 18 16:04:37 2013
> > @@ -0,0 +1,47 @@
> > +<?xml version="1.0"?>
> > +<!--
> > +  Licensed to the Apache Software Foundation (ASF) under one
> > +  or more contributor license agreements. See the NOTICE file
> > +  distributed with this work for additional information
> > +  regarding copyright ownership. The ASF licenses this file
> > +  to you under the Apache License, Version 2.0 (the
> > +  "License"); you may not use this file except in compliance
> > +  with the License. You may obtain a copy of the License at
> > +
> > +  http://www.apache.org/licenses/LICENSE-2.0
> > +
> > +  Unless required by applicable law or agreed to in writing,
> > +  software distributed under the License is distributed on an
> > +  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > +  KIND, either express or implied. See the License for the
> > +  specific language governing permissions and limitations
> > +  under the License.
> > +-->
> > +<project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
> > +    <modelVersion>4.0.0</modelVersion>
> > +
> > +    <groupId>org.apache.cxf.services.xkms</groupId>
> > +    <artifactId>cxf-services-xkms</artifactId>
> > +    <packaging>pom</packaging>
> > +    <name>Apache CXF XKMS</name>
> > +    <description>Apache CXF XKMS service</description>
> > +    <url>http://cxf.apache.org</url>
> > +
> > +    <parent>
> > +        <groupId>org.apache.cxf.services</groupId>
> > +        <artifactId>cxf-services</artifactId>
> > +        <version>2.8.0-SNAPSHOT</version>
> > +        <relativePath>../pom.xml</relativePath>
> > +    </parent>
> > +
> > +    <modules>
> > +      <module>xkms-common</module>
> > +      <module>xkms-x509-handlers</module>
> > +      <module>xkms-service</module>
> > +      <module>xkms-client</module>
> > +      <module>xkms-features</module>
> > +      <module>xkms-osgi</module>
> > +      <module>xkms-war</module>
> > +    </modules>
> > +
> > +</project>
> >
> > Added: cxf/trunk/services/xkms/xkms-client/pom.xml
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> client/pom.xml?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-client/pom.xml (added)
> > +++ cxf/trunk/services/xkms/xkms-client/pom.xml Sat May 18 16:04:37
> 2013
> > @@ -0,0 +1,61 @@
> > +<?xml version="1.0"?>
> > +<!-- Licensed to the Apache Software Foundation (ASF) under one or
> more contributor
> > +	license agreements. See the NOTICE file distributed with this work
> for additional
> > +	information regarding copyright ownership. The ASF licenses this file
> to
> > +	you under the Apache License, Version 2.0 (the "License"); you may
> not use
> > +	this file except in compliance with the License. You may obtain a copy
> of
> > +	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
> required
> > +	by applicable law or agreed to in writing, software distributed under
> the
> > +	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
> CONDITIONS
> > +	OF ANY KIND, either express or implied. See the License for the
> specific
> > +	language governing permissions and limitations under the License.
> > + -->
> > +<project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > +	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
> > +
> > +	<modelVersion>4.0.0</modelVersion>
> > +    	<groupId>org.apache.cxf.services.xkms</groupId>
> > +	<artifactId>cxf-services-xkms-client</artifactId>
> > +	<packaging>bundle</packaging>
> > +	<name>Apache CXF XKMS Client</name>
> > +	<url>http://cxf.apache.org</url>
> > +
> > +	<parent>
> > +		<groupId>org.apache.cxf</groupId>
> > +		<artifactId>cxf-parent</artifactId>
> > +		<version>2.8.0-SNAPSHOT</version>
> > +		<relativePath>../../../parent/pom.xml</relativePath>
> > +	</parent>
> > +
> > +	<dependencies>
> > +		<dependency>
> > +			<groupId>org.apache.cxf.services.xkms</groupId>
> > +			<artifactId>cxf-services-xkms-common</artifactId>
> > +			<version>${project.version}</version>
> > +		</dependency>
> > +        <dependency>
> > +            <groupId>org.apache.cxf</groupId>
> > +            <artifactId>cxf-api</artifactId>
> > +            <version>${project.version}</version>
> > +        </dependency>
> > +        <dependency>
> > +        	<groupId>org.slf4j</groupId>
> > +        	<artifactId>slf4j-api</artifactId>
> > +        </dependency>
> > +	</dependencies>
> > +
> > +	<build>
> > +		<plugins>
> > +			<plugin>
> > +				<groupId>org.apache.felix</groupId>
> > +				<artifactId>maven-bundle-
> plugin</artifactId>
> > +				<extensions>true</extensions>
> > +				<configuration>
> > +					<instructions>
> > +						<Bundle-
> SymbolicName>${project.artifactId}</Bundle-SymbolicName>
> > +					</instructions>
> > +				</configuration>
> > +			</plugin>
> > +		</plugins>
> > +	</build>
> > +</project>
> >
> > Added: cxf/trunk/services/xkms/xkms-
> client/src/main/java/org/apache/cxf/xkms/client/X509AppId.java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> client/src/main/java/org/apache/cxf/xkms/client/X509AppId.java?rev=1484
> 133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> client/src/main/java/org/apache/cxf/xkms/client/X509AppId.java (added)
> > +++ cxf/trunk/services/xkms/xkms-
> client/src/main/java/org/apache/cxf/xkms/client/X509AppId.java Sat May 18
> 16:04:37 2013
> > @@ -0,0 +1,83 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +package org.apache.cxf.xkms.client;
> > +
> > +import org.apache.cxf.xkms.handlers.Applications;
> > +
> > +public class X509AppId {
> > +    private final Applications application;
> > +    private final String id;
> > +
> > +    public X509AppId(Applications application, String id) {
> > +        this.id = id;
> > +        this.application = application;
> > +    }
> > +
> > +    public Applications getApplication() {
> > +        return application;
> > +    }
> > +
> > +    public String getId() {
> > +        return id;
> > +    }
> > +
> > +    @Override
> > +    public String toString() {
> > +        return String.format("application: %s; id: %s", application, id);
> > +    }
> > +
> > +    @Override
> > +    public int hashCode() {
> > +        final int prime = 31;
> > +        int result = 1;
> > +        result = prime * result + ((application == null)
> > +                ? 0
> > +                : application.hashCode());
> > +        result = prime * result + ((id == null)
> > +                ? 0
> > +                : id.hashCode());
> > +        return result;
> > +    }
> > +
> > +    @Override
> > +    public boolean equals(Object obj) {
> > +        if (this == obj) {
> > +            return true;
> > +        }
> > +        if (obj == null) {
> > +            return false;
> > +        }
> > +        if (!(obj instanceof X509AppId)) {
> > +            return false;
> > +        }
> > +        X509AppId other = (X509AppId) obj;
> > +        if (application != other.application) {
> > +            return false;
> > +        }
> > +        if (id == null) {
> > +            if (other.id != null) {
> > +                return false;
> > +            }
> > +        } else if (!id.equals(other.id)) {
> > +            return false;
> > +        }
> > +        return true;
> > +    }
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> client/src/main/java/org/apache/cxf/xkms/client/XKMSInvoker.java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> client/src/main/java/org/apache/cxf/xkms/client/XKMSInvoker.java?rev=14
> 84133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> client/src/main/java/org/apache/cxf/xkms/client/XKMSInvoker.java (added)
> > +++ cxf/trunk/services/xkms/xkms-
> client/src/main/java/org/apache/cxf/xkms/client/XKMSInvoker.java Sat May
> 18 16:04:37 2013
> > @@ -0,0 +1,249 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +package org.apache.cxf.xkms.client;
> > +
> > +import java.io.ByteArrayInputStream;
> > +import java.math.BigInteger;
> > +import java.security.cert.CertificateEncodingException;
> > +import java.security.cert.CertificateException;
> > +import java.security.cert.CertificateFactory;
> > +import java.security.cert.X509Certificate;
> > +import java.util.ArrayList;
> > +import java.util.List;
> > +import java.util.UUID;
> > +
> > +import javax.xml.bind.JAXBElement;
> > +import javax.xml.namespace.QName;
> > +
> > +import org.apache.cxf.xkms.exception.ExceptionMapper;
> > +import org.apache.cxf.xkms.exception.XKMSException;
> > +import org.apache.cxf.xkms.exception.XKMSLocateException;
> > +import org.apache.cxf.xkms.exception.XKMSNotFoundException;
> > +import org.apache.cxf.xkms.exception.XKMSValidateException;
> > +import org.apache.cxf.xkms.handlers.Applications;
> > +import org.apache.cxf.xkms.handlers.XKMSConstants;
> > +import org.apache.cxf.xkms.model.xkms.KeyBindingEnum;
> > +import org.apache.cxf.xkms.model.xkms.LocateRequestType;
> > +import org.apache.cxf.xkms.model.xkms.LocateResultType;
> > +import org.apache.cxf.xkms.model.xkms.MessageAbstractType;
> > +import org.apache.cxf.xkms.model.xkms.QueryKeyBindingType;
> > +import org.apache.cxf.xkms.model.xkms.StatusType;
> > +import org.apache.cxf.xkms.model.xkms.UseKeyWithType;
> > +import org.apache.cxf.xkms.model.xkms.ValidateRequestType;
> > +import org.apache.cxf.xkms.model.xkms.ValidateResultType;
> > +import org.apache.cxf.xkms.model.xmldsig.KeyInfoType;
> > +import org.apache.cxf.xkms.model.xmldsig.X509DataType;
> > +import org.slf4j.Logger;
> > +import org.slf4j.LoggerFactory;
> > +import org.w3._2002._03.xkms_wsdl.XKMSPortType;
> > +
> > +public class XKMSInvoker {
> > +    private static final Logger LOG =
> LoggerFactory.getLogger(XKMSInvoker.class);
> > +
> > +    private static final org.apache.cxf.xkms.model.xmldsig.ObjectFactory
> DSIG_OF =
> > +            new org.apache.cxf.xkms.model.xmldsig.ObjectFactory();
> > +    private static final org.apache.cxf.xkms.model.xkms.ObjectFactory
> XKMS_OF =
> > +            new org.apache.cxf.xkms.model.xkms.ObjectFactory();
> > +
> > +    private static final String XKMS_LOCATE_INVALID_CERTIFICATE =
> > +            "Cannot instantiate X509 certificate from XKMS response";
> > +    private static final String XKMS_VALIDATE_ERROR = "Certificate [%s] is
> not valid";
> > +
> > +    private final XKMSPortType xkmsConsumer;
> > +
> > +    public XKMSInvoker(XKMSPortType xkmsConsumer) {
> > +        this.xkmsConsumer = xkmsConsumer;
> > +    }
> > +
> > +    public X509Certificate getServiceCertificate(QName serviceName) {
> > +        return getCertificateForId(Applications.SERVICE_SOAP,
> serviceName.toString());
> > +    }
> > +
> > +    public X509Certificate getCertificateForId(Applications application, String
> id) {
> > +        List<X509AppId> ids = new ArrayList<X509AppId>();
> > +        ids.add(new X509AppId(application, id));
> > +        return getCertificate(ids);
> > +    }
> > +
> > +    public X509Certificate getCertificateForIssuerSerial(String issuerDN,
> BigInteger serial) {
> > +        List<X509AppId> ids = new ArrayList<X509AppId>();
> > +        ids.add(new X509AppId(Applications.ISSUER, issuerDN));
> > +        ids.add(new X509AppId(Applications.SERIAL, serial.toString(16)));
> > +        return getCertificate(ids);
> > +    }
> > +
> > +    public X509Certificate getCertificate(List<X509AppId> ids) {
> > +        try {
> > +            LocateRequestType locateRequestType =
> prepareLocateXKMSRequest(ids);
> > +            LocateResultType locateResultType =
> xkmsConsumer.locate(locateRequestType);
> > +            return parseLocateXKMSResponse(locateResultType, ids);
> > +        } catch (RuntimeException e) {
> > +            String msg = String
> > +                .format("XKMS locate call fails for certificate: %s. Error: %s",
> > +                        ids,
> > +                        e.getMessage());
> > +            LOG.warn(msg, e);
> > +            throw new XKMSLocateException(msg, e);
> > +        }
> > +    }
> > +
> > +    public boolean validateCertificate(X509Certificate cert) {
> > +        try {
> > +            ValidateRequestType validateRequestType =
> prepareValidateXKMSRequest(cert);
> > +            ValidateResultType validateResultType =
> xkmsConsumer.validate(validateRequestType);
> > +            String id = cert.getSubjectDN().getName();
> > +            CertificateValidationResult result =
> parseValidateXKMSResponse(validateResultType, id);
> > +            if (!result.isValid()) {
> > +                LOG.warn(String.format("Certificate %s is not valid: %s",
> > +                                         cert.getSubjectDN(), result.getDescription()));
> > +            }
> > +            return result.isValid();
> > +        } catch (RuntimeException e) {
> > +            String msg = String.format("XKMS validate call fails for certificate:
> %s. Error: %s",
> > +                                       cert.getSubjectDN(),
> > +                                       e.getMessage());
> > +            LOG.warn(msg, e);
> > +            throw new XKMSValidateException(msg, e);
> > +        }
> > +    }
> > +
> > +    protected LocateRequestType
> prepareLocateXKMSRequest(List<X509AppId> ids) {
> > +        QueryKeyBindingType queryKeyBindingType = XKMS_OF
> > +            .createQueryKeyBindingType();
> > +
> > +        for (X509AppId id : ids) {
> > +            UseKeyWithType useKeyWithType =
> XKMS_OF.createUseKeyWithType();
> > +            useKeyWithType.setIdentifier(id.getId());
> > +            useKeyWithType.setApplication(id.getApplication().getUri());
> > +
> > +            queryKeyBindingType.getUseKeyWith().add(useKeyWithType);
> > +        }
> > +
> > +        LocateRequestType locateRequestType =
> XKMS_OF.createLocateRequestType();
> > +        locateRequestType.setQueryKeyBinding(queryKeyBindingType);
> > +        setGenericRequestParams(locateRequestType);
> > +        return locateRequestType;
> > +    }
> > +
> > +    @SuppressWarnings("unchecked")
> > +    protected X509Certificate
> parseLocateXKMSResponse(LocateResultType locateResultType,
> List<X509AppId> ids) {
> > +
> > +        XKMSException exception =
> ExceptionMapper.fromResponse(locateResultType);
> > +        if (exception != null) {
> > +            throw exception;
> > +        }
> > +
> > +        if (!locateResultType.getUnverifiedKeyBinding().iterator().hasNext())
> {
> > +            throw new XKMSNotFoundException(
> > +                 "X509Certificate is not found for id: " + ids);
> > +        }
> > +        KeyInfoType keyInfo = locateResultType.getUnverifiedKeyBinding()
> > +            .iterator().next().getKeyInfo();
> > +        if (!keyInfo.getContent().iterator().hasNext()) {
> > +            throw new XKMSNotFoundException(
> > +                 "X509Certificate is not found for id: " + ids);
> > +        }
> > +        JAXBElement<X509DataType> x509Data =
> (JAXBElement<X509DataType>)keyInfo
> > +            .getContent().iterator().next();
> > +        JAXBElement<byte[]> certificate = (JAXBElement<byte[]>)x509Data
> > +            .getValue().getX509IssuerSerialOrX509SKIOrX509SubjectName()
> > +            .iterator().next();
> > +
> > +        try {
> > +            CertificateFactory cf = CertificateFactory.getInstance("X.509");
> > +            X509Certificate cert = (X509Certificate)cf
> > +                .generateCertificate(new ByteArrayInputStream(certificate
> > +                    .getValue()));
> > +            return cert;
> > +        } catch (CertificateException e) {
> > +            throw new
> XKMSLocateException(XKMS_LOCATE_INVALID_CERTIFICATE, e);
> > +        }
> > +    }
> > +
> > +    protected ValidateRequestType prepareValidateXKMSRequest(
> > +                                                          X509Certificate cert) {
> > +        JAXBElement<byte[]> x509Cert;
> > +        try {
> > +            x509Cert = DSIG_OF.createX509DataTypeX509Certificate(cert
> > +                .getEncoded());
> > +        } catch (CertificateEncodingException e) {
> > +            throw new IllegalArgumentException(e);
> > +        }
> > +        X509DataType x509DataType = DSIG_OF.createX509DataType();
> > +
> x509DataType.getX509IssuerSerialOrX509SKIOrX509SubjectName().add(
> > +                                                                         x509Cert);
> > +        JAXBElement<X509DataType> x509Data = DSIG_OF
> > +            .createX509Data(x509DataType);
> > +
> > +        KeyInfoType keyInfoType = DSIG_OF.createKeyInfoType();
> > +        keyInfoType.getContent().add(x509Data);
> > +
> > +        QueryKeyBindingType queryKeyBindingType = XKMS_OF
> > +            .createQueryKeyBindingType();
> > +        queryKeyBindingType.setKeyInfo(keyInfoType);
> > +
> > +        ValidateRequestType validateRequestType = XKMS_OF
> > +            .createValidateRequestType();
> > +        setGenericRequestParams(validateRequestType);
> > +        validateRequestType.setQueryKeyBinding(queryKeyBindingType);
> > +        // temporary
> > +        validateRequestType.setId(cert.getSubjectDN().toString());
> > +        return validateRequestType;
> > +    }
> > +
> > +    protected CertificateValidationResult
> parseValidateXKMSResponse(ValidateResultType validateResultType,
> > +                                                                 String id) {
> > +        XKMSException exception =
> ExceptionMapper.fromResponse(validateResultType);
> > +        if (exception != null) {
> > +            throw exception;
> > +        }
> > +
> > +        StatusType status = validateResultType.getKeyBinding().iterator()
> > +            .next().getStatus();
> > +        if (KeyBindingEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_VALID
> != status.getStatusValue()) {
> > +            return new CertificateValidationResult(false,
> XKMS_VALIDATE_ERROR);
> > +        }
> > +        return new CertificateValidationResult(true, null);
> > +    }
> > +
> > +    public static class CertificateValidationResult {
> > +
> > +        private final boolean valid;
> > +        private final String description;
> > +
> > +        public CertificateValidationResult(boolean valid, String description) {
> > +            this.valid = valid;
> > +            this.description = description;
> > +        }
> > +
> > +        public boolean isValid() {
> > +            return valid;
> > +        }
> > +
> > +        public String getDescription() {
> > +            return description;
> > +        }
> > +    }
> > +
> > +    private void setGenericRequestParams(MessageAbstractType request)
> {
> > +        request.setService(XKMSConstants.XKMS_ENDPOINT_NAME);
> > +        request.setId(UUID.randomUUID().toString());
> > +    }
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-
> INF/blueprint/beans.xml
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> client/src/main/resources/OSGI-
> INF/blueprint/beans.xml?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-
> INF/blueprint/beans.xml (added)
> > +++ cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-
> INF/blueprint/beans.xml Sat May 18 16:04:37 2013
> > @@ -0,0 +1,44 @@
> > +<!-- #%L ReservationService Client %% Copyright (C) 2011 - 2012 Talend
> Inc.
> > +	%% Licensed under the Apache License, Version 2.0 (the "License");
> you may
> > +	not use this file except in compliance with the License. You may
> obtain a
> > +	copy of the License at http://www.apache.org/licenses/LICENSE-2.0
> Unless
> > +	required by applicable law or agreed to in writing, software
> distributed
> > +	under the License is distributed on an "AS IS" BASIS, WITHOUT
> WARRANTIES
> > +	OR CONDITIONS OF ANY KIND, either express or implied. See the
> License for
> > +	the specific language governing permissions and limitations under
> the License.
> > +	#L% -->
> > +<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> > +	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:cxf="http://cxf.apache.org/blueprint/core"
> > +	xmlns:jaxws="http://cxf.apache.org/blueprint/jaxws"
> > +	xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-
> cm/v1.0.0"
> > +	xmlns:ext="http://www.osgi.org/xmlns/blueprint-ext/v1.1.0"
> > +	xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0
> http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> > +
> 	http://www.osgi.org/xmlns/blueprint-ext/v1.1.0
> https://svn.apache.org/repos/asf/aries/tags/blueprint-0.3.1/blueprint-
> core/src/main/resources/org/apache/aries/blueprint/ext/blueprint-ext.xsd
> > +
> 	http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0
> http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
> > +
> 	http://cxf.apache.org/blueprint/jaxws
> http://cxf.apache.org/schemas/blueprint/jaxws.xsd
> > +
> 	http://cxf.apache.org/blueprint/core
> http://cxf.apache.org/schemas/blueprint/core.xsd
> > +  	">
> > +
> > +	<cm:property-placeholder persistent-id="tesbext.runtime">
> > +		<cm:default-properties>
> > +			<cm:property name="xkms.endpoint"
> value="http://localhost:8040/services/XKMS/" />
> > +		</cm:default-properties>
> > +	</cm:property-placeholder>
> > +
> > +	<bean id="additionalClasses"
> class="org.apache.cxf.xkms.model.extensions.AdditionalClassesFactory"/>
> > +
> > +	<jaxws:client id="XKMSConsumer"
> > +
> 	xmlns:serviceNamespace="http://www.w3.org/2002/03/xkms#wsdl
> "
> > +		serviceClass="org.w3._2002._03.xkms_wsdl.XKMSPortType"
> > +		serviceName="serviceNamespace:XKMSPortType"
> endpointName="serviceNamespace:XKMSService"
> > +		address="${xkms.endpoint}">
> > +        <jaxws:properties>
> > +            <entry key="jaxb.additionalContextClasses">
> > +            	<bean class="java.lang.Object" factory-
> ref="additionalClasses" factory-method="create"/>
> > +            </entry>
> > +        </jaxws:properties>
> > +	</jaxws:client>
> > +
> > +	<service ref="XKMSConsumer"
> interface="org.w3._2002._03.xkms_wsdl.XKMSPortType" />
> > +
> > +</blueprint>
> >
> > Added: cxf/trunk/services/xkms/xkms-common/pom.xml
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/pom.xml?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-common/pom.xml (added)
> > +++ cxf/trunk/services/xkms/xkms-common/pom.xml Sat May 18 16:04:37
> 2013
> > @@ -0,0 +1,74 @@
> > +<?xml version="1.0"?>
> > +<!-- Licensed to the Apache Software Foundation (ASF) under one or
> more contributor
> > +	license agreements. See the NOTICE file distributed with this work
> for additional
> > +	information regarding copyright ownership. The ASF licenses this file
> to
> > +	you under the Apache License, Version 2.0 (the "License"); you may
> not use
> > +	this file except in compliance with the License. You may obtain a copy
> of
> > +	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
> required
> > +	by applicable law or agreed to in writing, software distributed under
> the
> > +	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
> CONDITIONS
> > +	OF ANY KIND, either express or implied. See the License for the
> specific
> > +	language governing permissions and limitations under the License.
> > +-->
> > +<project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > +	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
> > +
> > +	<modelVersion>4.0.0</modelVersion>
> > +	<groupId>org.apache.cxf.services.xkms</groupId>
> > +	<artifactId>cxf-services-xkms-common</artifactId>
> > +	<packaging>bundle</packaging>
> > +	<name>Apache CXF XKMS Common</name>
> > +	<url>http://cxf.apache.org</url>
> > +
> > +	<parent>
> > +		<groupId>org.apache.cxf</groupId>
> > +		<artifactId>cxf-parent</artifactId>
> > +		<version>2.8.0-SNAPSHOT</version>
> > +		<relativePath>../../../parent/pom.xml</relativePath>
> > +	</parent>
> > +
> > +    <dependencies>
> > +        <dependency>
> > +            <groupId>org.springframework</groupId>
> > +            <artifactId>spring-beans</artifactId>
> > +        </dependency>
> > +    </dependencies>
> > +
> > +	<build>
> > +		<plugins>
> > +			<plugin>
> > +				<groupId>org.apache.cxf</groupId>
> > +				<artifactId>cxf-codegen-plugin</artifactId>
> > +				<version>${project.version}</version>
> > +				<executions>
> > +					<execution>
> > +						<id>generate-sources</id>
> > +						<phase>generate-
> sources</phase>
> > +						<goals>
> > +
> 	<goal>wsdl2java</goal>
> > +						</goals>
> > +						<configuration>
> > +
> 	<frontend>jaxws21</frontend>
> 
> > +							<wsdlOptions>
> > +								<wsdlOption>
> > +
> 	<wsdl>${basedir}/src/main/model/xkms.wsdl</wsdl>
> > +
> 	<bindingFile>${basedir}/src/main/model/binding.xjb</bindingFile>
> > +
> 	</wsdlOption>
> > +							</wsdlOptions>
> > +						</configuration>
> > +					</execution>
> > +				</executions>
> > +			</plugin>
> > +			<plugin>
> > +				<groupId>org.apache.felix</groupId>
> > +				<artifactId>maven-bundle-
> plugin</artifactId>
> > +				<extensions>true</extensions>
> > +				<configuration>
> > +					<instructions>
> > +						<Bundle-
> SymbolicName>${project.artifactId}</Bundle-SymbolicName>
> > +					</instructions>
> > +				</configuration>
> > +			</plugin>
> > +		</plugins>
> > +	</build>
> > +</project>
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/ExceptionMapper.
> java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/ExceptionMapper.
> java?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/ExceptionMapper.
> java (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/ExceptionMapper.
> java Sat May 18 16:04:37 2013
> > @@ -0,0 +1,88 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package org.apache.cxf.xkms.exception;
> > +
> > +import org.apache.cxf.xkms.model.extensions.ResultDetails;
> > +import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
> > +import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
> > +import org.apache.cxf.xkms.model.xkms.ResultType;
> > +
> > +public final class ExceptionMapper {
> > +
> > +    private ExceptionMapper() {
> > +    }
> > +
> > +    public static <T extends ResultType> T toResponse(Exception e, T
> result) {
> > +        if (e instanceof XKMSException) {
> > +            XKMSException xkmsEx = (XKMSException)e;
> > +            result = initResultType(xkmsEx.getMessage(),
> xkmsEx.getResultMajor(), xkmsEx.getResultMinor(), result);
> > +        } else if (e instanceof UnsupportedOperationException) {
> > +            result = initResultType(e.getMessage(),
> > +
> ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER,
> > +
> ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_MESSAGE_NOT
> _SUPPORTED,
> > +                                    result);
> > +        } else if (e instanceof IllegalArgumentException) {
> > +            result = initResultType(e.getMessage(),
> > +
> ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER,
> > +
> ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE,
> > +                                    result);
> > +        } else {
> > +            result = initResultType(e.getMessage(),
> > +
> ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
> > +
> ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE,
> > +                                    result);
> > +        }
> > +        return result;
> > +    }
> > +
> > +    public static XKMSException fromResponse(ResultType result) {
> > +        ResultMajorEnum major = null;
> > +        if ((result.getResultMajor() != null) &&
> !result.getResultMajor().isEmpty()) {
> > +            major = ResultMajorEnum.fromValue(result.getResultMajor());
> > +        }
> > +        if (major ==
> ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SUCCESS) {
> > +            return null;
> > +        }
> > +        ResultMinorEnum minor = null;
> > +        if ((result.getResultMinor() != null) &&
> !result.getResultMinor().isEmpty()) {
> > +            minor = ResultMinorEnum.fromValue(result.getResultMinor());
> > +        }
> > +
> > +        String message = null;
> > +        if (!result.getMessageExtension().isEmpty()) {
> > +            message = ((ResultDetails)
> result.getMessageExtension().get(0)).getDetails();
> > +        }
> > +        return new XKMSException(major, minor, message);
> > +    }
> > +
> > +    private static <T extends ResultType> T initResultType(String message,
> ResultMajorEnum majorCode,
> > +                                             ResultMinorEnum minorCode, T result) {
> > +        result.setResultMajor((majorCode != null)
> > +            ? majorCode.value() :
> ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER.value
> ());
> > +        result.setResultMinor((minorCode != null)
> > +            ? minorCode.value() :
> ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE.value(
> ));
> > +        if (message != null) {
> > +            ResultDetails resultDetails = new ResultDetails();
> > +            resultDetails.setDetails(message);
> > +            result.getMessageExtension().add(resultDetails);
> > +        }
> > +        return result;
> > +    }
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSArgumentN
> otMatchException.java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSArgumentN
> otMatchException.java?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSArgumentN
> otMatchException.java (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSArgumentN
> otMatchException.java Sat May 18 16:04:37 2013
> > @@ -0,0 +1,44 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package org.apache.cxf.xkms.exception;
> > +
> > +import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
> > +import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
> > +
> > +public class XKMSArgumentNotMatchException extends XKMSException {
> > +
> > +    private static final long serialVersionUID = 868729742068991784L;
> > +
> > +    public XKMSArgumentNotMatchException() {
> > +
> super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVE
> R,
> > +
> ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_NO_MATCH);
> > +    }
> > +
> > +    public XKMSArgumentNotMatchException(String arg0) {
> > +
> super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVE
> R,
> > +
> ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_NO_MATCH,
> arg0);
> > +    }
> > +
> > +    public XKMSArgumentNotMatchException(String arg0, Throwable arg1)
> {
> > +
> super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVE
> R,
> > +
> ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_NO_MATCH,
> arg0, arg1);
> > +    }
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSCertificateEx
> ception.java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSCertificateEx
> ception.java?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSCertificateEx
> ception.java (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSCertificateEx
> ception.java Sat May 18 16:04:37 2013
> > @@ -0,0 +1,44 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package org.apache.cxf.xkms.exception;
> > +
> > +import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
> > +import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
> > +
> > +public class XKMSCertificateException extends XKMSException {
> > +
> > +    private static final long serialVersionUID = 868729742068991784L;
> > +
> > +    public XKMSCertificateException() {
> > +
> super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVE
> R,
> > +
> ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE);
> > +    }
> > +
> > +    public XKMSCertificateException(String arg0) {
> > +
> super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVE
> R,
> > +
> ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE, arg0);
> > +    }
> > +
> > +    public XKMSCertificateException(String arg0, Throwable arg1) {
> > +
> super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVE
> R,
> > +
> ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE, arg0,
> arg1);
> > +    }
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSConfiguratio
> nException.java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSConfiguratio
> nException.java?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSConfiguratio
> nException.java (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSConfiguratio
> nException.java Sat May 18 16:04:37 2013
> > @@ -0,0 +1,34 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package org.apache.cxf.xkms.exception;
> > +
> > +import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
> > +import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
> > +
> > +
> > +public class XKMSConfigurationException extends XKMSException {
> > +
> > +    private static final long serialVersionUID = 868729742068991786L;
> > +
> > +    public XKMSConfigurationException(ResultMajorEnum resultMajor,
> ResultMinorEnum resultMinor, String msg) {
> > +        super(resultMajor, resultMinor, msg);
> > +    }
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSException.ja
> va
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSException.ja
> va?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSException.ja
> va (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSException.ja
> va Sat May 18 16:04:37 2013
> > @@ -0,0 +1,68 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package org.apache.cxf.xkms.exception;
> > +
> > +import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
> > +import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
> > +
> > +public class XKMSException extends RuntimeException {
> > +
> > +    private static final long serialVersionUID = 7247415453067157299L;
> > +
> > +    private ResultMajorEnum resultMajor;
> > +    private ResultMinorEnum resultMinor;
> > +
> > +    public XKMSException(ResultMajorEnum resultMajor,
> ResultMinorEnum resultMinor) {
> > +        super(String.format("Result major: %s; result minor: %s",
> resultMajor.toString(),
> > +                            resultMinor.toString()));
> > +        this.resultMajor = resultMajor;
> > +        this.resultMinor = resultMinor;
> > +    }
> > +
> > +    public XKMSException(ResultMajorEnum resultMajor,
> ResultMinorEnum resultMinor, String msg) {
> > +        super((msg != null) ? msg : String.format("Result major: %s; result
> minor: %s", resultMajor.toString(),
> > +                            resultMinor.toString()));
> > +        this.resultMajor = resultMajor;
> > +        this.resultMinor = resultMinor;
> > +    }
> > +
> > +    public XKMSException(ResultMajorEnum resultMajor,
> ResultMinorEnum resultMinor, String arg0, Throwable arg1) {
> > +        super(arg0, arg1);
> > +        this.resultMajor = resultMajor;
> > +        this.resultMinor = resultMinor;
> > +    }
> > +
> > +    public XKMSException(String arg0) {
> > +        super(arg0);
> > +    }
> > +
> > +    public XKMSException(String arg0, Throwable arg1) {
> > +        super(arg0, arg1);
> > +    }
> > +
> > +    public ResultMajorEnum getResultMajor() {
> > +        return resultMajor;
> > +    }
> > +
> > +    public ResultMinorEnum getResultMinor() {
> > +        return resultMinor;
> > +    }
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSLocateExcep
> tion.java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSLocateExcep
> tion.java?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSLocateExcep
> tion.java (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSLocateExcep
> tion.java Sat May 18 16:04:37 2013
> > @@ -0,0 +1,35 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package org.apache.cxf.xkms.exception;
> > +
> > +
> > +public class XKMSLocateException extends XKMSException {
> > +
> > +    private static final long serialVersionUID = 868729742068991784L;
> > +
> > +    public XKMSLocateException(String msg) {
> > +        super(msg);
> > +    }
> > +
> > +    public XKMSLocateException(String msg, Throwable e) {
> > +        super(msg, e);
> > +    }
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSNotFoundEx
> ception.java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSNotFoundEx
> ception.java?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSNotFoundEx
> ception.java (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSNotFoundEx
> ception.java Sat May 18 16:04:37 2013
> > @@ -0,0 +1,35 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package org.apache.cxf.xkms.exception;
> > +
> > +
> > +public class XKMSNotFoundException extends XKMSException {
> > +
> > +    private static final long serialVersionUID = 868729742068991785L;
> > +
> > +    public XKMSNotFoundException(String arg0) {
> > +        super(arg0);
> > +    }
> > +
> > +    public XKMSNotFoundException(String arg0, Throwable arg1) {
> > +        super(arg0, arg1);
> > +    }
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSRequestExce
> ption.java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSRequestExce
> ption.java?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSRequestExce
> ption.java (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSRequestExce
> ption.java Sat May 18 16:04:37 2013
> > @@ -0,0 +1,44 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package org.apache.cxf.xkms.exception;
> > +
> > +import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
> > +import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
> > +
> > +public class XKMSRequestException extends XKMSException {
> > +
> > +    private static final long serialVersionUID = 868729742068991783L;
> > +
> > +    public XKMSRequestException() {
> > +
> super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER,
> > +
> ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE);
> > +    }
> > +
> > +    public XKMSRequestException(String arg0) {
> > +
> super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER,
> > +
> ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE, arg0);
> > +    }
> > +
> > +    public XKMSRequestException(String arg0, Throwable arg1) {
> > +
> super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER,
> > +
> ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE, arg0,
> arg1);
> > +    }
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSTooManyRe
> sponsesException.java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSTooManyRe
> sponsesException.java?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSTooManyRe
> sponsesException.java (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSTooManyRe
> sponsesException.java Sat May 18 16:04:37 2013
> > @@ -0,0 +1,44 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package org.apache.cxf.xkms.exception;
> > +
> > +import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
> > +import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
> > +
> > +public class XKMSTooManyResponsesException extends XKMSException {
> > +
> > +    private static final long serialVersionUID = 868729742068991783L;
> > +
> > +    public XKMSTooManyResponsesException() {
> > +
> super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVE
> R,
> > +
> ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_TOO_MANY_R
> ESPONSES);
> > +    }
> > +
> > +    public XKMSTooManyResponsesException(String arg0) {
> > +
> super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVE
> R,
> > +
> ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_TOO_MANY_R
> ESPONSES, arg0);
> > +    }
> > +
> > +    public XKMSTooManyResponsesException(String arg0, Throwable arg1)
> {
> > +
> super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVE
> R,
> > +
> ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_TOO_MANY_R
> ESPONSES, arg0, arg1);
> > +    }
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSValidateExce
> ption.java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSValidateExce
> ption.java?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSValidateExce
> ption.java (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/exception/XKMSValidateExce
> ption.java Sat May 18 16:04:37 2013
> > @@ -0,0 +1,35 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package org.apache.cxf.xkms.exception;
> > +
> > +
> > +public class XKMSValidateException extends XKMSException {
> > +
> > +    private static final long serialVersionUID = 868729742068991785L;
> > +
> > +    public XKMSValidateException(String msg) {
> > +        super(msg);
> > +    }
> > +
> > +    public XKMSValidateException(String msg, Throwable e) {
> > +        super(msg, e);
> > +    }
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/Applications.java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/Applications.java?re
> v=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/Applications.java
> (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/Applications.java
> Sat May 18 16:04:37 2013
> > @@ -0,0 +1,57 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +package org.apache.cxf.xkms.handlers;
> > +
> > +public enum Applications {
> > +    /**
> > +     * Certificate Subject Name
> > +     */
> > +    PKIX("urn:ietf:rfc:2459"),
> > +    /**
> > +     * DNS address of http server
> > +     */
> > +    TLS_HTTPS("urn:ietf:rfc:2818"),
> > +    /**
> > +     * Service Endpoint Name
> > +     */
> > +    SERVICE_SOAP("urn:apache:cxf:service:soap"),
> > +    /**
> > +     * Certificate Issuer
> > +     */
> > +    ISSUER("urn:x509:issuer"),
> > +    /**
> > +     * Certificate Serial Number
> > +     */
> > +    SERIAL("urn:x509:serial"),
> > +    /**
> > +     * SMTP email address of subject
> > +     */
> > +    PGP("urn:ietf:rfc:2440");
> > +
> > +    private String uri;
> > +
> > +    private Applications(String uri) {
> > +        this.uri = uri;
> > +    }
> > +
> > +    public String getUri() {
> > +        return this.uri;
> > +    }
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/DnUtils.java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/DnUtils.java?rev=14
> 84133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/DnUtils.java
> (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/DnUtils.java Sat
> May 18 16:04:37 2013
> > @@ -0,0 +1,125 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +package org.apache.cxf.xkms.handlers;
> > +
> > +
> > +/**
> > + * A couple of utility methods for working with X500 Distinguished Names
> > + */
> > +public final class DnUtils {
> > +
> > +    private DnUtils() {
> > +
> > +    }
> > +
> > +    public static String extractMostSignificantAttribute(String identifier) {
> > +        // first find the first comma-delimited value
> > +        String[] split = identifier.split(",");
> > +        String msaVal = null;
> > +        String cnVal = null;
> > +        String ouVal = null;
> > +        for (String val : split) {
> > +            val = normalizeAttribute(val);
> > +            if (null == msaVal) {
> > +                msaVal = val;
> > +            }
> > +            if ((cnVal == null) && val.startsWith("cn=")) {
> > +                cnVal = val;
> > +            }
> > +            if ((ouVal == null) && val.startsWith("ou=")) {
> > +                ouVal = val;
> > +            }
> > +        }
> > +        if (cnVal != null) {
> > +            return cnVal;
> > +        } else if (ouVal != null) {
> > +            return ouVal;
> > +        } else {
> > +            return msaVal;
> > +        }
> > +    }
> > +
> > +    public static String extractMostSignificantAttributeValue(String
> identifier) {
> > +        String attr = extractMostSignificantAttribute(identifier);
> > +        String[] split;
> > +        if (attr != null) {
> > +            split = attr.split("=");
> > +            // normalize the prefix if present
> > +            if (split.length == 2) {
> > +                return split[1].trim();
> > +            } else {
> > +                return attr.trim();
> > +            }
> > +        }
> > +        return attr;
> > +    }
> > +
> > +    private static String normalizeAttribute(String val) {
> > +        String[] split;
> > +        if (null != val) {
> > +            split = val.split("=");
> > +            // normalize the prefix if present
> > +            if (split.length == 2) {
> > +                String prefix = split[0].toLowerCase().trim();
> > +                String value = split[1].trim();
> > +                val = prefix + "=" + value;
> > +            } else {
> > +                val = val.trim();
> > +            }
> > +        }
> > +        return val;
> > +    }
> > +
> > +    public static class DnAttribute {
> > +
> > +        private String prefix;
> > +        private String name;
> > +        private String full;
> > +
> > +        public DnAttribute(String attributeDefinition) {
> > +            full = attributeDefinition;
> > +            String[] split = attributeDefinition.split("=");
> > +            if (1 == split.length) {
> > +                this.name = split[0];
> > +            } else if (2 == split.length) {
> > +                this.prefix = split[0];
> > +                this.name = split[1];
> > +            }
> > +        }
> > +
> > +        public String prefix() {
> > +            return prefix;
> > +        }
> > +
> > +        public String name() {
> > +            return name;
> > +        }
> > +
> > +        public String full() {
> > +            return full;
> > +        }
> > +
> > +        @Override
> > +        public String toString() {
> > +            return this.full;
> > +        }
> > +
> > +    }
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/HandlerContext.jav
> a
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/HandlerContext.jav
> a?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/HandlerContext.jav
> a (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/HandlerContext.jav
> a Sat May 18 16:04:37 2013
> > @@ -0,0 +1,40 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package org.apache.cxf.xkms.handlers;
> > +
> > +import java.util.HashMap;
> > +import java.util.Map;
> > +
> > +public class HandlerContext {
> > +
> > +    private Map<Class<?>, Object> contextMap = new HashMap<Class<?>,
> Object>();
> > +
> > +    public HandlerContext() {
> > +    }
> > +
> > +    public <T> void set(Class<T> cClass, T cObject) {
> > +        contextMap.put(cClass, cObject);
> > +    }
> > +
> > +    @SuppressWarnings("unchecked")
> > +    public <T> T get(Class<T> cClass) {
> > +        return (T)(contextMap.get(cClass));
> > +    }
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/KeyRegisterHandler
> .java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/KeyRegisterHandler
> .java?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/KeyRegisterHandler
> .java (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/KeyRegisterHandler
> .java Sat May 18 16:04:37 2013
> > @@ -0,0 +1,40 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package org.apache.cxf.xkms.handlers;
> > +
> > +import org.apache.cxf.xkms.model.xkms.RegisterRequestType;
> > +import org.apache.cxf.xkms.model.xkms.RegisterResultType;
> > +import org.apache.cxf.xkms.model.xkms.ReissueRequestType;
> > +import org.apache.cxf.xkms.model.xkms.ReissueResultType;
> > +import org.apache.cxf.xkms.model.xkms.RequestAbstractType;
> > +import org.apache.cxf.xkms.model.xkms.RevokeRequestType;
> > +import org.apache.cxf.xkms.model.xkms.RevokeResultType;
> > +
> > +public interface KeyRegisterHandler {
> > +
> > +    boolean canProcess(RequestAbstractType request);
> > +
> > +    RegisterResultType register(RegisterRequestType request,
> RegisterResultType response);
> > +
> > +    ReissueResultType reissue(ReissueRequestType request,
> ReissueResultType response);
> > +
> > +    RevokeResultType revoke(RevokeRequestType request,
> RevokeResultType response);
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/Locator.java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/Locator.java?rev=14
> 84133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/Locator.java
> (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/Locator.java Sat
> May 18 16:04:37 2013
> > @@ -0,0 +1,29 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package org.apache.cxf.xkms.handlers;
> > +
> > +import org.apache.cxf.xkms.model.xkms.LocateRequestType;
> > +import org.apache.cxf.xkms.model.xkms.UnverifiedKeyBindingType;
> > +
> > +public interface Locator {
> > +
> > +    UnverifiedKeyBindingType locate(LocateRequestType request);
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/Validator.java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/Validator.java?rev=
> 1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/Validator.java
> (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/Validator.java Sat
> May 18 16:04:37 2013
> > @@ -0,0 +1,29 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package org.apache.cxf.xkms.handlers;
> > +
> > +import org.apache.cxf.xkms.model.xkms.StatusType;
> > +import org.apache.cxf.xkms.model.xkms.ValidateRequestType;
> > +
> > +public interface Validator {
> > +
> > +    StatusType validate(ValidateRequestType request);
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/XKMSConstants.jav
> a
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/XKMSConstants.jav
> a?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/XKMSConstants.jav
> a (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/handlers/XKMSConstants.jav
> a Sat May 18 16:04:37 2013
> > @@ -0,0 +1,27 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +package org.apache.cxf.xkms.handlers;
> > +
> > +public final class XKMSConstants {
> > +    public static final String XKMS_ENDPOINT_NAME =
> "http://cxf.apache.org/services/XKMS/";
> > +
> > +    private XKMSConstants() {
> > +    }
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/model/extensions/Additional
> ClassesFactory.java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/model/extensions/Additional
> ClassesFactory.java?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/model/extensions/Additional
> ClassesFactory.java (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/model/extensions/Additional
> ClassesFactory.java Sat May 18 16:04:37 2013
> > @@ -0,0 +1,27 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package org.apache.cxf.xkms.model.extensions;
> > +
> > +
> > +public class AdditionalClassesFactory {
> > +    public Class<?>[] create() {
> > +        return new Class[]{ResultDetails.class};
> > +    }
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArray
> FactoryBean.java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArray
> FactoryBean.java?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArray
> FactoryBean.java (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArray
> FactoryBean.java Sat May 18 16:04:37 2013
> > @@ -0,0 +1,76 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package org.apache.cxf.xkms.model.extensions;
> > +
> > +import java.util.List;
> > +
> > +import org.springframework.beans.factory.FactoryBean;
> > +
> > +public class ClassArrayFactoryBean implements FactoryBean<Object> {
> > +
> > +    private List<String> classNames;
> > +
> > +    /*
> > +     * (non-Javadoc)
> > +     *
> > +     * @see org.springframework.beans.factory.FactoryBean#getObject()
> > +     */
> > +    public Object getObject() throws Exception {
> > +
> > +        final Class<?>[] classes = new Class<?>[classNames.size()];
> > +        for (int i = 0; i < classNames.size(); i++) {
> > +            classes[i] = Class.forName(classNames.get(i));
> > +        }
> > +        return classes;
> > +    }
> > +
> > +    /*
> > +     * (non-Javadoc)
> > +     *
> > +     * @see
> org.springframework.beans.factory.FactoryBean#getObjectType()
> > +     */
> > +    public Class<?> getObjectType() {
> > +        return Class[].class;
> > +    }
> > +
> > +    /*
> > +     * (non-Javadoc)
> > +     *
> > +     * @see org.springframework.beans.factory.FactoryBean#isSingleton()
> > +     */
> > +    public boolean isSingleton() {
> > +        return true;
> > +    }
> > +
> > +    /**
> > +     * @return the classNames
> > +     */
> > +    public List<String> getClassNames() {
> > +        return classNames;
> > +    }
> > +
> > +    /**
> > +     * @param classNames the classNames to set
> > +     */
> > +    public void setClassNames(List<String> classNames) {
> > +        this.classNames = classNames;
> > +    }
> > +
> > +}
> >
> > Added: cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/model/extensions/ResultDet
> ails.java
> > URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/model/extensions/ResultDet
> ails.java?rev=1484133&view=auto
> >
> ==========================================================
> ====================
> > --- cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/model/extensions/ResultDet
> ails.java (added)
> > +++ cxf/trunk/services/xkms/xkms-
> common/src/main/java/org/apache/cxf/xkms/model/extensions/ResultDet
> ails.java Sat May 18 16:04:37 2013
> > @@ -0,0 +1,48 @@
> > +/**
> > + * Licensed to the Apache Software Foundation (ASF) under one
> > + * or more contributor license agreements. See the NOTICE file
> > + * distributed with this work for additional information
> > + * regarding copyright ownership. The ASF licenses this file
> > + * to you under the Apache License, Version 2.0 (the
> > + * "License"); you may not use this file except in compliance
> > + * with the License. You may obtain a copy of the License at
> > + *
> > + * http://www.apache.org/licenses/LICENSE-2.0
> > + *
> > + * Unless required by applicable law or agreed to in writing,
> > + * software distributed under the License is distributed on an
> > + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> > + * KIND, either express or implied. See the License for the
> > + * specific language governing permissions and limitations
> > + * under the License.
> > + */
> > +
> > +package org.apache.cxf.xkms.model.extensions;
> > +
> > +import javax.xml.bind.annotation.XmlAccessType;
> > +import javax.xml.bind.annotation.XmlAccessorType;
> > +import javax.xml.bind.annotation.XmlElement;
> > +import javax.xml.bind.annotation.XmlRootElement;
> > +import javax.xml.bind.annotation.XmlType;
> > +
> > +import
> org.apache.cxf.xkms.model.xkms.MessageExtensionAbstractType;
> > +
> > +@XmlRootElement
> > +@XmlAccessorType(XmlAccessType.FIELD)
> > +@XmlType(name = "resultDetails", propOrder = { "details" })
> > +public class ResultDetails extends MessageExtensionAbstractType {
> > +    @XmlElement(name = "Details", required = true)
> > +    protected String details;
> > +
> > +    public ResultDetails() {
> > +    }
> > +
> > +    public String getDetails() {
> > +        return details;
> > +    }
> > +
> > +    public void setDetails(String details) {
> > +        this.details = details;
> > +    }
> > +
> > +}
> >
> >


Uh oh.... (Re: svn commit: r1484133 [1/6]...)

Posted by Glen Mazza <gl...@gmail.com>.
Andrei, unsure if someone else has mentioned this but your XML 
indentation is all over the place -- it should be space-padded (no tabs) 
with 4 indentation throughout.  If you have that configured in Eclipse 
you can right-click each source file and select the format option for it 
to reformat the XML files for you.  Right now, your code is vetoable.

Regards,
Glen

On 05/18/2013 12:04 PM, ashakirin@apache.org wrote:
> Author: ashakirin
> Date: Sat May 18 16:04:37 2013
> New Revision: 1484133
>
> URL: http://svn.apache.org/r1484133
> Log:
> XKMS contribution - first draft version
>
> Added:
>      cxf/trunk/services/xkms/
>      cxf/trunk/services/xkms/README.txt
>      cxf/trunk/services/xkms/pom.xml
>      cxf/trunk/services/xkms/xkms-client/
>      cxf/trunk/services/xkms/xkms-client/pom.xml
>      cxf/trunk/services/xkms/xkms-client/src/
>      cxf/trunk/services/xkms/xkms-client/src/main/
>      cxf/trunk/services/xkms/xkms-client/src/main/java/
>      cxf/trunk/services/xkms/xkms-client/src/main/java/org/
>      cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/
>      cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/
>      cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/
>      cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/
>      cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/X509AppId.java
>      cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/XKMSInvoker.java
>      cxf/trunk/services/xkms/xkms-client/src/main/resources/
>      cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-INF/
>      cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-INF/blueprint/
>      cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-INF/blueprint/beans.xml
>      cxf/trunk/services/xkms/xkms-common/
>      cxf/trunk/services/xkms/xkms-common/pom.xml
>      cxf/trunk/services/xkms/xkms-common/src/
>      cxf/trunk/services/xkms/xkms-common/src/main/
>      cxf/trunk/services/xkms/xkms-common/src/main/java/
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/ExceptionMapper.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSArgumentNotMatchException.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSCertificateException.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSConfigurationException.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSException.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSLocateException.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSNotFoundException.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSRequestException.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSTooManyResponsesException.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSValidateException.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Applications.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/DnUtils.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/HandlerContext.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/KeyRegisterHandler.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Locator.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Validator.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/XKMSConstants.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/AdditionalClassesFactory.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArrayFactoryBean.java
>      cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ResultDetails.java
>      cxf/trunk/services/xkms/xkms-common/src/main/model/
>      cxf/trunk/services/xkms/xkms-common/src/main/model/binding.xjb
>      cxf/trunk/services/xkms/xkms-common/src/main/model/xenc-schema.xsd
>      cxf/trunk/services/xkms/xkms-common/src/main/model/xkms.wsdl
>      cxf/trunk/services/xkms/xkms-common/src/main/model/xkms.xsd
>      cxf/trunk/services/xkms/xkms-common/src/main/model/xmldsig-core-schema.xsd
>      cxf/trunk/services/xkms/xkms-features/
>      cxf/trunk/services/xkms/xkms-features/pom.xml
>      cxf/trunk/services/xkms/xkms-features/src/
>      cxf/trunk/services/xkms/xkms-features/src/main/
>      cxf/trunk/services/xkms/xkms-features/src/main/resources/
>      cxf/trunk/services/xkms/xkms-features/src/main/resources/features.xml
>      cxf/trunk/services/xkms/xkms-features/src/main/resources/org.apache.cxf.xkms.cfg
>      cxf/trunk/services/xkms/xkms-itests/
>      cxf/trunk/services/xkms/xkms-itests/pom.xml
>      cxf/trunk/services/xkms/xkms-itests/src/
>      cxf/trunk/services/xkms/xkms-itests/src/test/
>      cxf/trunk/services/xkms/xkms-itests/src/test/java/
>      cxf/trunk/services/xkms/xkms-itests/src/test/java/org/
>      cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/
>      cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/
>      cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/
>      cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/
>      cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/XkmsServiceTest.java
>      cxf/trunk/services/xkms/xkms-itests/src/test/resources/
>      cxf/trunk/services/xkms/xkms-itests/src/test/resources/XKMS-soapui-project.xml
>      cxf/trunk/services/xkms/xkms-osgi/
>      cxf/trunk/services/xkms/xkms-osgi/pom.xml
>      cxf/trunk/services/xkms/xkms-osgi/src/
>      cxf/trunk/services/xkms/xkms-osgi/src/main/
>      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/
>      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/OSGI-INF/
>      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/OSGI-INF/blueprint/
>      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/OSGI-INF/blueprint/cxf-endpoint.xml
>      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/OSGI-INF/blueprint/xkms-key-handlers.xml
>      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/test-requests/
>      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/test-requests/request-locate.xml
>      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/test-requests/request-validate.xml
>      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/test-requests/response-locate.xml
>      cxf/trunk/services/xkms/xkms-osgi/src/main/resources/test-requests/response-validate.xml
>      cxf/trunk/services/xkms/xkms-osgi/src/test/
>      cxf/trunk/services/xkms/xkms-osgi/src/test/resources/
>      cxf/trunk/services/xkms/xkms-osgi/src/test/resources/test-requests/
>      cxf/trunk/services/xkms/xkms-osgi/src/test/resources/test-requests/request-locate.xml
>      cxf/trunk/services/xkms/xkms-osgi/src/test/resources/test-requests/request-validate.xml
>      cxf/trunk/services/xkms/xkms-osgi/src/test/resources/test-requests/response-locate.xml
>      cxf/trunk/services/xkms/xkms-osgi/src/test/resources/test-requests/response-validate.xml
>      cxf/trunk/services/xkms/xkms-service/
>      cxf/trunk/services/xkms/xkms-service/pom.xml
>      cxf/trunk/services/xkms/xkms-service/src/
>      cxf/trunk/services/xkms/xkms-service/src/main/
>      cxf/trunk/services/xkms/xkms-service/src/main/java/
>      cxf/trunk/services/xkms/xkms-service/src/main/java/org/
>      cxf/trunk/services/xkms/xkms-service/src/main/java/org/apache/
>      cxf/trunk/services/xkms/xkms-service/src/main/java/org/apache/cxf/
>      cxf/trunk/services/xkms/xkms-service/src/main/java/org/apache/cxf/xkms/
>      cxf/trunk/services/xkms/xkms-service/src/main/java/org/apache/cxf/xkms/service/
>      cxf/trunk/services/xkms/xkms-service/src/main/java/org/apache/cxf/xkms/service/XKMSResponseFactory.java
>      cxf/trunk/services/xkms/xkms-service/src/main/java/org/apache/cxf/xkms/service/XKMSService.java
>      cxf/trunk/services/xkms/xkms-war/
>      cxf/trunk/services/xkms/xkms-war/pom.xml
>      cxf/trunk/services/xkms/xkms-war/src/
>      cxf/trunk/services/xkms/xkms-war/src/main/
>      cxf/trunk/services/xkms/xkms-war/src/main/resources/
>      cxf/trunk/services/xkms/xkms-war/src/main/resources/log4j.properties
>      cxf/trunk/services/xkms/xkms-war/src/main/resources/logging.properties
>      cxf/trunk/services/xkms/xkms-war/src/main/webapp/
>      cxf/trunk/services/xkms/xkms-war/src/main/webapp/WEB-INF/
>      cxf/trunk/services/xkms/xkms-war/src/main/webapp/WEB-INF/cxf-servlet.xml
>      cxf/trunk/services/xkms/xkms-war/src/main/webapp/WEB-INF/web.xml
>      cxf/trunk/services/xkms/xkms-war/src/main/webapp/WEB-INF/xkms-endpoint.xml
>      cxf/trunk/services/xkms/xkms-war/src/main/webapp/WEB-INF/xkms-key-handlers.xml
>      cxf/trunk/services/xkms/xkms-x509-handlers/
>      cxf/trunk/services/xkms/xkms-x509-handlers/pom.xml
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/AbstractX509RegisterHandler.java
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/FileRegisterHandler.java
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/LDAPSearch.java
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/handlers/LdapRegisterHandler.java
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/locator/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/locator/FileLocator.java
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/locator/LdapLocator.java
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/parser/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/parser/LocateRequestParser.java
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/parser/ValidateRequestParser.java
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/utils/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/utils/X509Utils.java
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/validator/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/main/java/org/apache/cxf/xkms/x509/validator/DateValidator.java
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/file/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/file/persistence/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/file/persistence/FilePersistenceManagerTest.java
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/ldap/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/ldap/persistence/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/ldap/persistence/LDAPPersistenceManagerITest.java
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/ldap/persistence/LDAPPersistenceManagerTest.java
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/ldap/persistence/LDAPSearchTest.java
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/BasicValidationTest.java
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/handlers/ValidateDateHandlerTest.java
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/utils/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/utils/X509UtilsTest.java
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/cert1.bas64
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/cert1.cer
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/registerRequest.xml
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/registerRequestWithCertificate.xml
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/registerResult.xml
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/reissueRequest.xml
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/revokeRequest.xml
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/store1/
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/store1/CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer-11688544847478700689-CN-www.issuer.com_L-CGN_ST-NRW_C-DE_O-Issuer.cer
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/validateRequestCorrupted.xml
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/validateRequestExpired.xml
>      cxf/trunk/services/xkms/xkms-x509-handlers/src/test/resources/validateRequestOK.xml
> Modified:
>      cxf/trunk/services/pom.xml
>
> Modified: cxf/trunk/services/pom.xml
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/pom.xml?rev=1484133&r1=1484132&r2=1484133&view=diff
> ==============================================================================
> --- cxf/trunk/services/pom.xml (original)
> +++ cxf/trunk/services/pom.xml Sat May 18 16:04:37 2013
> @@ -36,6 +36,7 @@
>           <module>sts</module>
>           <module>wsn</module>
>           <module>ws-discovery</module>
> +        <module>xkms</module>
>       </modules>
>   
>   </project>
>
> Added: cxf/trunk/services/xkms/README.txt
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/README.txt?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/README.txt (added)
> +++ cxf/trunk/services/xkms/README.txt Sat May 18 16:04:37 2013
> @@ -0,0 +1,14 @@
> +
> +This folder contains the XKMS (XML key Management Service) implementation of
> +Apache CXF. It contains:
> +
> +
> +xkms-client - The XKMS client and invoker implementations
> +xkms--common - Common functionality, XML schemas, generated code
> +xkms-service - The XKMS core service implementation
> +xkms-x509-handlers - The implementation of pluggable commands for X509 keys.
> +xkms-features - Karaf features for XKMS client and service
> +xkms-itests - Intergation tests
> +xkms-osgi - OSGi blueprint configuration for OSGi deployment
> +xkms-war - Web spring configuration for Web depoyment
> +
>
> Added: cxf/trunk/services/xkms/pom.xml
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/pom.xml?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/pom.xml (added)
> +++ cxf/trunk/services/xkms/pom.xml Sat May 18 16:04:37 2013
> @@ -0,0 +1,47 @@
> +<?xml version="1.0"?>
> +<!--
> +  Licensed to the Apache Software Foundation (ASF) under one
> +  or more contributor license agreements. See the NOTICE file
> +  distributed with this work for additional information
> +  regarding copyright ownership. The ASF licenses this file
> +  to you under the Apache License, Version 2.0 (the
> +  "License"); you may not use this file except in compliance
> +  with the License. You may obtain a copy of the License at
> +
> +  http://www.apache.org/licenses/LICENSE-2.0
> +
> +  Unless required by applicable law or agreed to in writing,
> +  software distributed under the License is distributed on an
> +  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> +  KIND, either express or implied. See the License for the
> +  specific language governing permissions and limitations
> +  under the License.
> +-->
> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
> +    <modelVersion>4.0.0</modelVersion>
> +
> +    <groupId>org.apache.cxf.services.xkms</groupId>
> +    <artifactId>cxf-services-xkms</artifactId>
> +    <packaging>pom</packaging>
> +    <name>Apache CXF XKMS</name>
> +    <description>Apache CXF XKMS service</description>
> +    <url>http://cxf.apache.org</url>
> +
> +    <parent>
> +        <groupId>org.apache.cxf.services</groupId>
> +        <artifactId>cxf-services</artifactId>
> +        <version>2.8.0-SNAPSHOT</version>
> +        <relativePath>../pom.xml</relativePath>
> +    </parent>
> +
> +    <modules>
> +      <module>xkms-common</module>
> +      <module>xkms-x509-handlers</module>
> +      <module>xkms-service</module>
> +      <module>xkms-client</module>
> +      <module>xkms-features</module>
> +      <module>xkms-osgi</module>
> +      <module>xkms-war</module>
> +    </modules>
> +
> +</project>
>
> Added: cxf/trunk/services/xkms/xkms-client/pom.xml
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-client/pom.xml?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-client/pom.xml (added)
> +++ cxf/trunk/services/xkms/xkms-client/pom.xml Sat May 18 16:04:37 2013
> @@ -0,0 +1,61 @@
> +<?xml version="1.0"?>
> +<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
> +	license agreements. See the NOTICE file distributed with this work for additional
> +	information regarding copyright ownership. The ASF licenses this file to
> +	you under the Apache License, Version 2.0 (the "License"); you may not use
> +	this file except in compliance with the License. You may obtain a copy of
> +	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
> +	by applicable law or agreed to in writing, software distributed under the
> +	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
> +	OF ANY KIND, either express or implied. See the License for the specific
> +	language governing permissions and limitations under the License.
> + -->
> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> +	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
> +
> +	<modelVersion>4.0.0</modelVersion>
> +    	<groupId>org.apache.cxf.services.xkms</groupId>
> +	<artifactId>cxf-services-xkms-client</artifactId>
> +	<packaging>bundle</packaging>
> +	<name>Apache CXF XKMS Client</name>
> +	<url>http://cxf.apache.org</url>
> +
> +	<parent>
> +		<groupId>org.apache.cxf</groupId>
> +		<artifactId>cxf-parent</artifactId>
> +		<version>2.8.0-SNAPSHOT</version>
> +		<relativePath>../../../parent/pom.xml</relativePath>
> +	</parent>
> +
> +	<dependencies>
> +		<dependency>
> +			<groupId>org.apache.cxf.services.xkms</groupId>
> +			<artifactId>cxf-services-xkms-common</artifactId>
> +			<version>${project.version}</version>
> +		</dependency>
> +        <dependency>
> +            <groupId>org.apache.cxf</groupId>
> +            <artifactId>cxf-api</artifactId>
> +            <version>${project.version}</version>
> +        </dependency>
> +        <dependency>
> +        	<groupId>org.slf4j</groupId>
> +        	<artifactId>slf4j-api</artifactId>
> +        </dependency>
> +	</dependencies>
> +
> +	<build>
> +		<plugins>
> +			<plugin>
> +				<groupId>org.apache.felix</groupId>
> +				<artifactId>maven-bundle-plugin</artifactId>
> +				<extensions>true</extensions>
> +				<configuration>
> +					<instructions>
> +						<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
> +					</instructions>
> +				</configuration>
> +			</plugin>
> +		</plugins>
> +	</build>
> +</project>
>
> Added: cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/X509AppId.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/X509AppId.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/X509AppId.java (added)
> +++ cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/X509AppId.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,83 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +package org.apache.cxf.xkms.client;
> +
> +import org.apache.cxf.xkms.handlers.Applications;
> +
> +public class X509AppId {
> +    private final Applications application;
> +    private final String id;
> +
> +    public X509AppId(Applications application, String id) {
> +        this.id = id;
> +        this.application = application;
> +    }
> +
> +    public Applications getApplication() {
> +        return application;
> +    }
> +
> +    public String getId() {
> +        return id;
> +    }
> +
> +    @Override
> +    public String toString() {
> +        return String.format("application: %s; id: %s", application, id);
> +    }
> +
> +    @Override
> +    public int hashCode() {
> +        final int prime = 31;
> +        int result = 1;
> +        result = prime * result + ((application == null)
> +                ? 0
> +                : application.hashCode());
> +        result = prime * result + ((id == null)
> +                ? 0
> +                : id.hashCode());
> +        return result;
> +    }
> +
> +    @Override
> +    public boolean equals(Object obj) {
> +        if (this == obj) {
> +            return true;
> +        }
> +        if (obj == null) {
> +            return false;
> +        }
> +        if (!(obj instanceof X509AppId)) {
> +            return false;
> +        }
> +        X509AppId other = (X509AppId) obj;
> +        if (application != other.application) {
> +            return false;
> +        }
> +        if (id == null) {
> +            if (other.id != null) {
> +                return false;
> +            }
> +        } else if (!id.equals(other.id)) {
> +            return false;
> +        }
> +        return true;
> +    }
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/XKMSInvoker.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/XKMSInvoker.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/XKMSInvoker.java (added)
> +++ cxf/trunk/services/xkms/xkms-client/src/main/java/org/apache/cxf/xkms/client/XKMSInvoker.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,249 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +package org.apache.cxf.xkms.client;
> +
> +import java.io.ByteArrayInputStream;
> +import java.math.BigInteger;
> +import java.security.cert.CertificateEncodingException;
> +import java.security.cert.CertificateException;
> +import java.security.cert.CertificateFactory;
> +import java.security.cert.X509Certificate;
> +import java.util.ArrayList;
> +import java.util.List;
> +import java.util.UUID;
> +
> +import javax.xml.bind.JAXBElement;
> +import javax.xml.namespace.QName;
> +
> +import org.apache.cxf.xkms.exception.ExceptionMapper;
> +import org.apache.cxf.xkms.exception.XKMSException;
> +import org.apache.cxf.xkms.exception.XKMSLocateException;
> +import org.apache.cxf.xkms.exception.XKMSNotFoundException;
> +import org.apache.cxf.xkms.exception.XKMSValidateException;
> +import org.apache.cxf.xkms.handlers.Applications;
> +import org.apache.cxf.xkms.handlers.XKMSConstants;
> +import org.apache.cxf.xkms.model.xkms.KeyBindingEnum;
> +import org.apache.cxf.xkms.model.xkms.LocateRequestType;
> +import org.apache.cxf.xkms.model.xkms.LocateResultType;
> +import org.apache.cxf.xkms.model.xkms.MessageAbstractType;
> +import org.apache.cxf.xkms.model.xkms.QueryKeyBindingType;
> +import org.apache.cxf.xkms.model.xkms.StatusType;
> +import org.apache.cxf.xkms.model.xkms.UseKeyWithType;
> +import org.apache.cxf.xkms.model.xkms.ValidateRequestType;
> +import org.apache.cxf.xkms.model.xkms.ValidateResultType;
> +import org.apache.cxf.xkms.model.xmldsig.KeyInfoType;
> +import org.apache.cxf.xkms.model.xmldsig.X509DataType;
> +import org.slf4j.Logger;
> +import org.slf4j.LoggerFactory;
> +import org.w3._2002._03.xkms_wsdl.XKMSPortType;
> +
> +public class XKMSInvoker {
> +    private static final Logger LOG = LoggerFactory.getLogger(XKMSInvoker.class);
> +
> +    private static final org.apache.cxf.xkms.model.xmldsig.ObjectFactory DSIG_OF =
> +            new org.apache.cxf.xkms.model.xmldsig.ObjectFactory();
> +    private static final org.apache.cxf.xkms.model.xkms.ObjectFactory XKMS_OF =
> +            new org.apache.cxf.xkms.model.xkms.ObjectFactory();
> +
> +    private static final String XKMS_LOCATE_INVALID_CERTIFICATE =
> +            "Cannot instantiate X509 certificate from XKMS response";
> +    private static final String XKMS_VALIDATE_ERROR = "Certificate [%s] is not valid";
> +
> +    private final XKMSPortType xkmsConsumer;
> +
> +    public XKMSInvoker(XKMSPortType xkmsConsumer) {
> +        this.xkmsConsumer = xkmsConsumer;
> +    }
> +
> +    public X509Certificate getServiceCertificate(QName serviceName) {
> +        return getCertificateForId(Applications.SERVICE_SOAP, serviceName.toString());
> +    }
> +
> +    public X509Certificate getCertificateForId(Applications application, String id) {
> +        List<X509AppId> ids = new ArrayList<X509AppId>();
> +        ids.add(new X509AppId(application, id));
> +        return getCertificate(ids);
> +    }
> +
> +    public X509Certificate getCertificateForIssuerSerial(String issuerDN, BigInteger serial) {
> +        List<X509AppId> ids = new ArrayList<X509AppId>();
> +        ids.add(new X509AppId(Applications.ISSUER, issuerDN));
> +        ids.add(new X509AppId(Applications.SERIAL, serial.toString(16)));
> +        return getCertificate(ids);
> +    }
> +
> +    public X509Certificate getCertificate(List<X509AppId> ids) {
> +        try {
> +            LocateRequestType locateRequestType = prepareLocateXKMSRequest(ids);
> +            LocateResultType locateResultType = xkmsConsumer.locate(locateRequestType);
> +            return parseLocateXKMSResponse(locateResultType, ids);
> +        } catch (RuntimeException e) {
> +            String msg = String
> +                .format("XKMS locate call fails for certificate: %s. Error: %s",
> +                        ids,
> +                        e.getMessage());
> +            LOG.warn(msg, e);
> +            throw new XKMSLocateException(msg, e);
> +        }
> +    }
> +
> +    public boolean validateCertificate(X509Certificate cert) {
> +        try {
> +            ValidateRequestType validateRequestType = prepareValidateXKMSRequest(cert);
> +            ValidateResultType validateResultType = xkmsConsumer.validate(validateRequestType);
> +            String id = cert.getSubjectDN().getName();
> +            CertificateValidationResult result = parseValidateXKMSResponse(validateResultType, id);
> +            if (!result.isValid()) {
> +                LOG.warn(String.format("Certificate %s is not valid: %s",
> +                                         cert.getSubjectDN(), result.getDescription()));
> +            }
> +            return result.isValid();
> +        } catch (RuntimeException e) {
> +            String msg = String.format("XKMS validate call fails for certificate: %s. Error: %s",
> +                                       cert.getSubjectDN(),
> +                                       e.getMessage());
> +            LOG.warn(msg, e);
> +            throw new XKMSValidateException(msg, e);
> +        }
> +    }
> +
> +    protected LocateRequestType prepareLocateXKMSRequest(List<X509AppId> ids) {
> +        QueryKeyBindingType queryKeyBindingType = XKMS_OF
> +            .createQueryKeyBindingType();
> +
> +        for (X509AppId id : ids) {
> +            UseKeyWithType useKeyWithType = XKMS_OF.createUseKeyWithType();
> +            useKeyWithType.setIdentifier(id.getId());
> +            useKeyWithType.setApplication(id.getApplication().getUri());
> +
> +            queryKeyBindingType.getUseKeyWith().add(useKeyWithType);
> +        }
> +
> +        LocateRequestType locateRequestType = XKMS_OF.createLocateRequestType();
> +        locateRequestType.setQueryKeyBinding(queryKeyBindingType);
> +        setGenericRequestParams(locateRequestType);
> +        return locateRequestType;
> +    }
> +
> +    @SuppressWarnings("unchecked")
> +    protected X509Certificate parseLocateXKMSResponse(LocateResultType locateResultType, List<X509AppId> ids) {
> +
> +        XKMSException exception = ExceptionMapper.fromResponse(locateResultType);
> +        if (exception != null) {
> +            throw exception;
> +        }
> +
> +        if (!locateResultType.getUnverifiedKeyBinding().iterator().hasNext()) {
> +            throw new XKMSNotFoundException(
> +                 "X509Certificate is not found for id: " + ids);
> +        }
> +        KeyInfoType keyInfo = locateResultType.getUnverifiedKeyBinding()
> +            .iterator().next().getKeyInfo();
> +        if (!keyInfo.getContent().iterator().hasNext()) {
> +            throw new XKMSNotFoundException(
> +                 "X509Certificate is not found for id: " + ids);
> +        }
> +        JAXBElement<X509DataType> x509Data = (JAXBElement<X509DataType>)keyInfo
> +            .getContent().iterator().next();
> +        JAXBElement<byte[]> certificate = (JAXBElement<byte[]>)x509Data
> +            .getValue().getX509IssuerSerialOrX509SKIOrX509SubjectName()
> +            .iterator().next();
> +
> +        try {
> +            CertificateFactory cf = CertificateFactory.getInstance("X.509");
> +            X509Certificate cert = (X509Certificate)cf
> +                .generateCertificate(new ByteArrayInputStream(certificate
> +                    .getValue()));
> +            return cert;
> +        } catch (CertificateException e) {
> +            throw new XKMSLocateException(XKMS_LOCATE_INVALID_CERTIFICATE, e);
> +        }
> +    }
> +
> +    protected ValidateRequestType prepareValidateXKMSRequest(
> +                                                          X509Certificate cert) {
> +        JAXBElement<byte[]> x509Cert;
> +        try {
> +            x509Cert = DSIG_OF.createX509DataTypeX509Certificate(cert
> +                .getEncoded());
> +        } catch (CertificateEncodingException e) {
> +            throw new IllegalArgumentException(e);
> +        }
> +        X509DataType x509DataType = DSIG_OF.createX509DataType();
> +        x509DataType.getX509IssuerSerialOrX509SKIOrX509SubjectName().add(
> +                                                                         x509Cert);
> +        JAXBElement<X509DataType> x509Data = DSIG_OF
> +            .createX509Data(x509DataType);
> +
> +        KeyInfoType keyInfoType = DSIG_OF.createKeyInfoType();
> +        keyInfoType.getContent().add(x509Data);
> +
> +        QueryKeyBindingType queryKeyBindingType = XKMS_OF
> +            .createQueryKeyBindingType();
> +        queryKeyBindingType.setKeyInfo(keyInfoType);
> +
> +        ValidateRequestType validateRequestType = XKMS_OF
> +            .createValidateRequestType();
> +        setGenericRequestParams(validateRequestType);
> +        validateRequestType.setQueryKeyBinding(queryKeyBindingType);
> +        // temporary
> +        validateRequestType.setId(cert.getSubjectDN().toString());
> +        return validateRequestType;
> +    }
> +
> +    protected CertificateValidationResult parseValidateXKMSResponse(ValidateResultType validateResultType,
> +                                                                 String id) {
> +        XKMSException exception = ExceptionMapper.fromResponse(validateResultType);
> +        if (exception != null) {
> +            throw exception;
> +        }
> +
> +        StatusType status = validateResultType.getKeyBinding().iterator()
> +            .next().getStatus();
> +        if (KeyBindingEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_VALID != status.getStatusValue()) {
> +            return new CertificateValidationResult(false, XKMS_VALIDATE_ERROR);
> +        }
> +        return new CertificateValidationResult(true, null);
> +    }
> +
> +    public static class CertificateValidationResult {
> +
> +        private final boolean valid;
> +        private final String description;
> +
> +        public CertificateValidationResult(boolean valid, String description) {
> +            this.valid = valid;
> +            this.description = description;
> +        }
> +
> +        public boolean isValid() {
> +            return valid;
> +        }
> +
> +        public String getDescription() {
> +            return description;
> +        }
> +    }
> +
> +    private void setGenericRequestParams(MessageAbstractType request) {
> +        request.setService(XKMSConstants.XKMS_ENDPOINT_NAME);
> +        request.setId(UUID.randomUUID().toString());
> +    }
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-INF/blueprint/beans.xml
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-INF/blueprint/beans.xml?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-INF/blueprint/beans.xml (added)
> +++ cxf/trunk/services/xkms/xkms-client/src/main/resources/OSGI-INF/blueprint/beans.xml Sat May 18 16:04:37 2013
> @@ -0,0 +1,44 @@
> +<!-- #%L ReservationService Client %% Copyright (C) 2011 - 2012 Talend Inc.
> +	%% Licensed under the Apache License, Version 2.0 (the "License"); you may
> +	not use this file except in compliance with the License. You may obtain a
> +	copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless
> +	required by applicable law or agreed to in writing, software distributed
> +	under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
> +	OR CONDITIONS OF ANY KIND, either express or implied. See the License for
> +	the specific language governing permissions and limitations under the License.
> +	#L% -->
> +<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
> +	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://cxf.apache.org/blueprint/core"
> +	xmlns:jaxws="http://cxf.apache.org/blueprint/jaxws"
> +	xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0"
> +	xmlns:ext="http://www.osgi.org/xmlns/blueprint-ext/v1.1.0"
> +	xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
> +  						http://www.osgi.org/xmlns/blueprint-ext/v1.1.0 https://svn.apache.org/repos/asf/aries/tags/blueprint-0.3.1/blueprint-core/src/main/resources/org/apache/aries/blueprint/ext/blueprint-ext.xsd
> +  						http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.0.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.0.0.xsd
> +  						http://cxf.apache.org/blueprint/jaxws http://cxf.apache.org/schemas/blueprint/jaxws.xsd
> +  						http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd
> +  	">
> +
> +	<cm:property-placeholder persistent-id="tesbext.runtime">
> +		<cm:default-properties>
> +			<cm:property name="xkms.endpoint" value="http://localhost:8040/services/XKMS/" />
> +		</cm:default-properties>
> +	</cm:property-placeholder>
> +	
> +	<bean id="additionalClasses" class="org.apache.cxf.xkms.model.extensions.AdditionalClassesFactory"/>
> +	
> +	<jaxws:client id="XKMSConsumer"
> +		xmlns:serviceNamespace="http://www.w3.org/2002/03/xkms#wsdl"
> +		serviceClass="org.w3._2002._03.xkms_wsdl.XKMSPortType"
> +		serviceName="serviceNamespace:XKMSPortType" endpointName="serviceNamespace:XKMSService"
> +		address="${xkms.endpoint}">
> +        <jaxws:properties>
> +            <entry key="jaxb.additionalContextClasses">
> +            	<bean class="java.lang.Object" factory-ref="additionalClasses" factory-method="create"/>
> +            </entry>
> +        </jaxws:properties>
> +	</jaxws:client>
> +
> +	<service ref="XKMSConsumer" interface="org.w3._2002._03.xkms_wsdl.XKMSPortType" />
> +
> +</blueprint>
>
> Added: cxf/trunk/services/xkms/xkms-common/pom.xml
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/pom.xml?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/pom.xml (added)
> +++ cxf/trunk/services/xkms/xkms-common/pom.xml Sat May 18 16:04:37 2013
> @@ -0,0 +1,74 @@
> +<?xml version="1.0"?>
> +<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
> +	license agreements. See the NOTICE file distributed with this work for additional
> +	information regarding copyright ownership. The ASF licenses this file to
> +	you under the Apache License, Version 2.0 (the "License"); you may not use
> +	this file except in compliance with the License. You may obtain a copy of
> +	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
> +	by applicable law or agreed to in writing, software distributed under the
> +	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
> +	OF ANY KIND, either express or implied. See the License for the specific
> +	language governing permissions and limitations under the License.
> +-->
> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> +	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
> +
> +	<modelVersion>4.0.0</modelVersion>
> +	<groupId>org.apache.cxf.services.xkms</groupId>
> +	<artifactId>cxf-services-xkms-common</artifactId>
> +	<packaging>bundle</packaging>
> +	<name>Apache CXF XKMS Common</name>
> +	<url>http://cxf.apache.org</url>
> +
> +	<parent>
> +		<groupId>org.apache.cxf</groupId>
> +		<artifactId>cxf-parent</artifactId>
> +		<version>2.8.0-SNAPSHOT</version>
> +		<relativePath>../../../parent/pom.xml</relativePath>
> +	</parent>
> +
> +    <dependencies>
> +        <dependency>
> +            <groupId>org.springframework</groupId>
> +            <artifactId>spring-beans</artifactId>
> +        </dependency>
> +    </dependencies>
> +
> +	<build>
> +		<plugins>
> +			<plugin>
> +				<groupId>org.apache.cxf</groupId>
> +				<artifactId>cxf-codegen-plugin</artifactId>
> +				<version>${project.version}</version>
> +				<executions>
> +					<execution>
> +						<id>generate-sources</id>
> +						<phase>generate-sources</phase>
> +						<goals>
> +							<goal>wsdl2java</goal>
> +						</goals>
> +						<configuration>
> + 							<frontend>jaxws21</frontend>							
> +							<wsdlOptions>
> +								<wsdlOption>
> +									<wsdl>${basedir}/src/main/model/xkms.wsdl</wsdl>
> +									<bindingFile>${basedir}/src/main/model/binding.xjb</bindingFile>
> +								</wsdlOption>
> +							</wsdlOptions>
> +						</configuration>
> +					</execution>
> +				</executions>
> +			</plugin>
> +			<plugin>
> +				<groupId>org.apache.felix</groupId>
> +				<artifactId>maven-bundle-plugin</artifactId>
> +				<extensions>true</extensions>
> +				<configuration>
> +					<instructions>
> +						<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
> +					</instructions>
> +				</configuration>
> +			</plugin>
> +		</plugins>
> +	</build>
> +</project>
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/ExceptionMapper.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/ExceptionMapper.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/ExceptionMapper.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/ExceptionMapper.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,88 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package org.apache.cxf.xkms.exception;
> +
> +import org.apache.cxf.xkms.model.extensions.ResultDetails;
> +import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
> +import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
> +import org.apache.cxf.xkms.model.xkms.ResultType;
> +
> +public final class ExceptionMapper {
> +
> +    private ExceptionMapper() {
> +    }
> +
> +    public static <T extends ResultType> T toResponse(Exception e, T result) {
> +        if (e instanceof XKMSException) {
> +            XKMSException xkmsEx = (XKMSException)e;
> +            result = initResultType(xkmsEx.getMessage(), xkmsEx.getResultMajor(), xkmsEx.getResultMinor(), result);
> +        } else if (e instanceof UnsupportedOperationException) {
> +            result = initResultType(e.getMessage(),
> +                                    ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER,
> +                                    ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_MESSAGE_NOT_SUPPORTED,
> +                                    result);
> +        } else if (e instanceof IllegalArgumentException) {
> +            result = initResultType(e.getMessage(),
> +                                    ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER,
> +                                    ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE,
> +                                    result);
> +        } else {
> +            result = initResultType(e.getMessage(),
> +                                    ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
> +                                    ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE,
> +                                    result);
> +        }
> +        return result;
> +    }
> +
> +    public static XKMSException fromResponse(ResultType result) {
> +        ResultMajorEnum major = null;
> +        if ((result.getResultMajor() != null) && !result.getResultMajor().isEmpty()) {
> +            major = ResultMajorEnum.fromValue(result.getResultMajor());
> +        }
> +        if (major == ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SUCCESS) {
> +            return null;
> +        }
> +        ResultMinorEnum minor = null;
> +        if ((result.getResultMinor() != null) && !result.getResultMinor().isEmpty()) {
> +            minor = ResultMinorEnum.fromValue(result.getResultMinor());
> +        }
> +
> +        String message = null;
> +        if (!result.getMessageExtension().isEmpty()) {
> +            message = ((ResultDetails) result.getMessageExtension().get(0)).getDetails();
> +        }
> +        return new XKMSException(major, minor, message);
> +    }
> +
> +    private static <T extends ResultType> T initResultType(String message, ResultMajorEnum majorCode,
> +                                             ResultMinorEnum minorCode, T result) {
> +        result.setResultMajor((majorCode != null)
> +            ? majorCode.value() : ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER.value());
> +        result.setResultMinor((minorCode != null)
> +            ? minorCode.value() : ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE.value());
> +        if (message != null) {
> +            ResultDetails resultDetails = new ResultDetails();
> +            resultDetails.setDetails(message);
> +            result.getMessageExtension().add(resultDetails);
> +        }
> +        return result;
> +    }
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSArgumentNotMatchException.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSArgumentNotMatchException.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSArgumentNotMatchException.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSArgumentNotMatchException.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,44 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package org.apache.cxf.xkms.exception;
> +
> +import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
> +import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
> +
> +public class XKMSArgumentNotMatchException extends XKMSException {
> +
> +    private static final long serialVersionUID = 868729742068991784L;
> +
> +    public XKMSArgumentNotMatchException() {
> +        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
> +              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_NO_MATCH);
> +    }
> +
> +    public XKMSArgumentNotMatchException(String arg0) {
> +        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
> +              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_NO_MATCH, arg0);
> +    }
> +
> +    public XKMSArgumentNotMatchException(String arg0, Throwable arg1) {
> +        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
> +              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_NO_MATCH, arg0, arg1);
> +    }
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSCertificateException.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSCertificateException.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSCertificateException.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSCertificateException.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,44 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package org.apache.cxf.xkms.exception;
> +
> +import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
> +import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
> +
> +public class XKMSCertificateException extends XKMSException {
> +
> +    private static final long serialVersionUID = 868729742068991784L;
> +
> +    public XKMSCertificateException() {
> +        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
> +              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE);
> +    }
> +
> +    public XKMSCertificateException(String arg0) {
> +        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
> +              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE, arg0);
> +    }
> +
> +    public XKMSCertificateException(String arg0, Throwable arg1) {
> +        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
> +              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE, arg0, arg1);
> +    }
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSConfigurationException.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSConfigurationException.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSConfigurationException.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSConfigurationException.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,34 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package org.apache.cxf.xkms.exception;
> +
> +import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
> +import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
> +
> +
> +public class XKMSConfigurationException extends XKMSException {
> +
> +    private static final long serialVersionUID = 868729742068991786L;
> +
> +    public XKMSConfigurationException(ResultMajorEnum resultMajor, ResultMinorEnum resultMinor, String msg) {
> +        super(resultMajor, resultMinor, msg);
> +    }
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSException.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSException.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSException.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSException.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,68 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package org.apache.cxf.xkms.exception;
> +
> +import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
> +import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
> +
> +public class XKMSException extends RuntimeException {
> +
> +    private static final long serialVersionUID = 7247415453067157299L;
> +
> +    private ResultMajorEnum resultMajor;
> +    private ResultMinorEnum resultMinor;
> +
> +    public XKMSException(ResultMajorEnum resultMajor, ResultMinorEnum resultMinor) {
> +        super(String.format("Result major: %s; result minor: %s", resultMajor.toString(),
> +                            resultMinor.toString()));
> +        this.resultMajor = resultMajor;
> +        this.resultMinor = resultMinor;
> +    }
> +
> +    public XKMSException(ResultMajorEnum resultMajor, ResultMinorEnum resultMinor, String msg) {
> +        super((msg != null) ? msg : String.format("Result major: %s; result minor: %s", resultMajor.toString(),
> +                            resultMinor.toString()));
> +        this.resultMajor = resultMajor;
> +        this.resultMinor = resultMinor;
> +    }
> +
> +    public XKMSException(ResultMajorEnum resultMajor, ResultMinorEnum resultMinor, String arg0, Throwable arg1) {
> +        super(arg0, arg1);
> +        this.resultMajor = resultMajor;
> +        this.resultMinor = resultMinor;
> +    }
> +
> +    public XKMSException(String arg0) {
> +        super(arg0);
> +    }
> +
> +    public XKMSException(String arg0, Throwable arg1) {
> +        super(arg0, arg1);
> +    }
> +
> +    public ResultMajorEnum getResultMajor() {
> +        return resultMajor;
> +    }
> +
> +    public ResultMinorEnum getResultMinor() {
> +        return resultMinor;
> +    }
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSLocateException.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSLocateException.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSLocateException.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSLocateException.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,35 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package org.apache.cxf.xkms.exception;
> +
> +
> +public class XKMSLocateException extends XKMSException {
> +
> +    private static final long serialVersionUID = 868729742068991784L;
> +
> +    public XKMSLocateException(String msg) {
> +        super(msg);
> +    }
> +
> +    public XKMSLocateException(String msg, Throwable e) {
> +        super(msg, e);
> +    }
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSNotFoundException.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSNotFoundException.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSNotFoundException.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSNotFoundException.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,35 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package org.apache.cxf.xkms.exception;
> +
> +
> +public class XKMSNotFoundException extends XKMSException {
> +
> +    private static final long serialVersionUID = 868729742068991785L;
> +
> +    public XKMSNotFoundException(String arg0) {
> +        super(arg0);
> +    }
> +
> +    public XKMSNotFoundException(String arg0, Throwable arg1) {
> +        super(arg0, arg1);
> +    }
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSRequestException.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSRequestException.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSRequestException.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSRequestException.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,44 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package org.apache.cxf.xkms.exception;
> +
> +import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
> +import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
> +
> +public class XKMSRequestException extends XKMSException {
> +
> +    private static final long serialVersionUID = 868729742068991783L;
> +
> +    public XKMSRequestException() {
> +        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER,
> +              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE);
> +    }
> +
> +    public XKMSRequestException(String arg0) {
> +        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER,
> +              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE, arg0);
> +    }
> +
> +    public XKMSRequestException(String arg0, Throwable arg1) {
> +        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER,
> +              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE, arg0, arg1);
> +    }
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSTooManyResponsesException.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSTooManyResponsesException.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSTooManyResponsesException.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSTooManyResponsesException.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,44 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package org.apache.cxf.xkms.exception;
> +
> +import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
> +import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
> +
> +public class XKMSTooManyResponsesException extends XKMSException {
> +
> +    private static final long serialVersionUID = 868729742068991783L;
> +
> +    public XKMSTooManyResponsesException() {
> +        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
> +              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_TOO_MANY_RESPONSES);
> +    }
> +
> +    public XKMSTooManyResponsesException(String arg0) {
> +        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
> +              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_TOO_MANY_RESPONSES, arg0);
> +    }
> +
> +    public XKMSTooManyResponsesException(String arg0, Throwable arg1) {
> +        super(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_RECEIVER,
> +              ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_TOO_MANY_RESPONSES, arg0, arg1);
> +    }
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSValidateException.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSValidateException.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSValidateException.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/exception/XKMSValidateException.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,35 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package org.apache.cxf.xkms.exception;
> +
> +
> +public class XKMSValidateException extends XKMSException {
> +
> +    private static final long serialVersionUID = 868729742068991785L;
> +
> +    public XKMSValidateException(String msg) {
> +        super(msg);
> +    }
> +
> +    public XKMSValidateException(String msg, Throwable e) {
> +        super(msg, e);
> +    }
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Applications.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Applications.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Applications.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Applications.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,57 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +package org.apache.cxf.xkms.handlers;
> +
> +public enum Applications {
> +    /**
> +     * Certificate Subject Name
> +     */
> +    PKIX("urn:ietf:rfc:2459"),
> +    /**
> +     * DNS address of http server
> +     */
> +    TLS_HTTPS("urn:ietf:rfc:2818"),
> +    /**
> +     * Service Endpoint Name
> +     */
> +    SERVICE_SOAP("urn:apache:cxf:service:soap"),
> +    /**
> +     * Certificate Issuer
> +     */
> +    ISSUER("urn:x509:issuer"),
> +    /**
> +     * Certificate Serial Number
> +     */
> +    SERIAL("urn:x509:serial"),
> +    /**
> +     * SMTP email address of subject
> +     */
> +    PGP("urn:ietf:rfc:2440");
> +
> +    private String uri;
> +
> +    private Applications(String uri) {
> +        this.uri = uri;
> +    }
> +
> +    public String getUri() {
> +        return this.uri;
> +    }
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/DnUtils.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/DnUtils.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/DnUtils.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/DnUtils.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,125 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +package org.apache.cxf.xkms.handlers;
> +
> +
> +/**
> + * A couple of utility methods for working with X500 Distinguished Names
> + */
> +public final class DnUtils {
> +
> +    private DnUtils() {
> +
> +    }
> +
> +    public static String extractMostSignificantAttribute(String identifier) {
> +        // first find the first comma-delimited value
> +        String[] split = identifier.split(",");
> +        String msaVal = null;
> +        String cnVal = null;
> +        String ouVal = null;
> +        for (String val : split) {
> +            val = normalizeAttribute(val);
> +            if (null == msaVal) {
> +                msaVal = val;
> +            }
> +            if ((cnVal == null) && val.startsWith("cn=")) {
> +                cnVal = val;
> +            }
> +            if ((ouVal == null) && val.startsWith("ou=")) {
> +                ouVal = val;
> +            }
> +        }
> +        if (cnVal != null) {
> +            return cnVal;
> +        } else if (ouVal != null) {
> +            return ouVal;
> +        } else {
> +            return msaVal;
> +        }
> +    }
> +
> +    public static String extractMostSignificantAttributeValue(String identifier) {
> +        String attr = extractMostSignificantAttribute(identifier);
> +        String[] split;
> +        if (attr != null) {
> +            split = attr.split("=");
> +            // normalize the prefix if present
> +            if (split.length == 2) {
> +                return split[1].trim();
> +            } else {
> +                return attr.trim();
> +            }
> +        }
> +        return attr;
> +    }
> +
> +    private static String normalizeAttribute(String val) {
> +        String[] split;
> +        if (null != val) {
> +            split = val.split("=");
> +            // normalize the prefix if present
> +            if (split.length == 2) {
> +                String prefix = split[0].toLowerCase().trim();
> +                String value = split[1].trim();
> +                val = prefix + "=" + value;
> +            } else {
> +                val = val.trim();
> +            }
> +        }
> +        return val;
> +    }
> +
> +    public static class DnAttribute {
> +
> +        private String prefix;
> +        private String name;
> +        private String full;
> +
> +        public DnAttribute(String attributeDefinition) {
> +            full = attributeDefinition;
> +            String[] split = attributeDefinition.split("=");
> +            if (1 == split.length) {
> +                this.name = split[0];
> +            } else if (2 == split.length) {
> +                this.prefix = split[0];
> +                this.name = split[1];
> +            }
> +        }
> +
> +        public String prefix() {
> +            return prefix;
> +        }
> +
> +        public String name() {
> +            return name;
> +        }
> +
> +        public String full() {
> +            return full;
> +        }
> +
> +        @Override
> +        public String toString() {
> +            return this.full;
> +        }
> +
> +    }
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/HandlerContext.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/HandlerContext.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/HandlerContext.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/HandlerContext.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,40 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package org.apache.cxf.xkms.handlers;
> +
> +import java.util.HashMap;
> +import java.util.Map;
> +
> +public class HandlerContext {
> +
> +    private Map<Class<?>, Object> contextMap = new HashMap<Class<?>, Object>();
> +
> +    public HandlerContext() {
> +    }
> +
> +    public <T> void set(Class<T> cClass, T cObject) {
> +        contextMap.put(cClass, cObject);
> +    }
> +
> +    @SuppressWarnings("unchecked")
> +    public <T> T get(Class<T> cClass) {
> +        return (T)(contextMap.get(cClass));
> +    }
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/KeyRegisterHandler.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/KeyRegisterHandler.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/KeyRegisterHandler.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/KeyRegisterHandler.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,40 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package org.apache.cxf.xkms.handlers;
> +
> +import org.apache.cxf.xkms.model.xkms.RegisterRequestType;
> +import org.apache.cxf.xkms.model.xkms.RegisterResultType;
> +import org.apache.cxf.xkms.model.xkms.ReissueRequestType;
> +import org.apache.cxf.xkms.model.xkms.ReissueResultType;
> +import org.apache.cxf.xkms.model.xkms.RequestAbstractType;
> +import org.apache.cxf.xkms.model.xkms.RevokeRequestType;
> +import org.apache.cxf.xkms.model.xkms.RevokeResultType;
> +
> +public interface KeyRegisterHandler {
> +
> +    boolean canProcess(RequestAbstractType request);
> +
> +    RegisterResultType register(RegisterRequestType request, RegisterResultType response);
> +
> +    ReissueResultType reissue(ReissueRequestType request, ReissueResultType response);
> +
> +    RevokeResultType revoke(RevokeRequestType request, RevokeResultType response);
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Locator.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Locator.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Locator.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Locator.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,29 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package org.apache.cxf.xkms.handlers;
> +
> +import org.apache.cxf.xkms.model.xkms.LocateRequestType;
> +import org.apache.cxf.xkms.model.xkms.UnverifiedKeyBindingType;
> +
> +public interface Locator {
> +
> +    UnverifiedKeyBindingType locate(LocateRequestType request);
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Validator.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Validator.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Validator.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/Validator.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,29 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package org.apache.cxf.xkms.handlers;
> +
> +import org.apache.cxf.xkms.model.xkms.StatusType;
> +import org.apache.cxf.xkms.model.xkms.ValidateRequestType;
> +
> +public interface Validator {
> +
> +    StatusType validate(ValidateRequestType request);
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/XKMSConstants.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/XKMSConstants.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/XKMSConstants.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/handlers/XKMSConstants.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,27 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +package org.apache.cxf.xkms.handlers;
> +
> +public final class XKMSConstants {
> +    public static final String XKMS_ENDPOINT_NAME = "http://cxf.apache.org/services/XKMS/";
> +
> +    private XKMSConstants() {
> +    }
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/AdditionalClassesFactory.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/AdditionalClassesFactory.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/AdditionalClassesFactory.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/AdditionalClassesFactory.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,27 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package org.apache.cxf.xkms.model.extensions;
> +
> +
> +public class AdditionalClassesFactory {
> +    public Class<?>[] create() {
> +        return new Class[]{ResultDetails.class};
> +    }
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArrayFactoryBean.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArrayFactoryBean.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArrayFactoryBean.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ClassArrayFactoryBean.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,76 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package org.apache.cxf.xkms.model.extensions;
> +
> +import java.util.List;
> +
> +import org.springframework.beans.factory.FactoryBean;
> +
> +public class ClassArrayFactoryBean implements FactoryBean<Object> {
> +
> +    private List<String> classNames;
> +
> +    /*
> +     * (non-Javadoc)
> +     *
> +     * @see org.springframework.beans.factory.FactoryBean#getObject()
> +     */
> +    public Object getObject() throws Exception {
> +
> +        final Class<?>[] classes = new Class<?>[classNames.size()];
> +        for (int i = 0; i < classNames.size(); i++) {
> +            classes[i] = Class.forName(classNames.get(i));
> +        }
> +        return classes;
> +    }
> +
> +    /*
> +     * (non-Javadoc)
> +     *
> +     * @see org.springframework.beans.factory.FactoryBean#getObjectType()
> +     */
> +    public Class<?> getObjectType() {
> +        return Class[].class;
> +    }
> +
> +    /*
> +     * (non-Javadoc)
> +     *
> +     * @see org.springframework.beans.factory.FactoryBean#isSingleton()
> +     */
> +    public boolean isSingleton() {
> +        return true;
> +    }
> +
> +    /**
> +     * @return the classNames
> +     */
> +    public List<String> getClassNames() {
> +        return classNames;
> +    }
> +
> +    /**
> +     * @param classNames the classNames to set
> +     */
> +    public void setClassNames(List<String> classNames) {
> +        this.classNames = classNames;
> +    }
> +
> +}
>
> Added: cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ResultDetails.java
> URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ResultDetails.java?rev=1484133&view=auto
> ==============================================================================
> --- cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ResultDetails.java (added)
> +++ cxf/trunk/services/xkms/xkms-common/src/main/java/org/apache/cxf/xkms/model/extensions/ResultDetails.java Sat May 18 16:04:37 2013
> @@ -0,0 +1,48 @@
> +/**
> + * Licensed to the Apache Software Foundation (ASF) under one
> + * or more contributor license agreements. See the NOTICE file
> + * distributed with this work for additional information
> + * regarding copyright ownership. The ASF licenses this file
> + * to you under the Apache License, Version 2.0 (the
> + * "License"); you may not use this file except in compliance
> + * with the License. You may obtain a copy of the License at
> + *
> + * http://www.apache.org/licenses/LICENSE-2.0
> + *
> + * Unless required by applicable law or agreed to in writing,
> + * software distributed under the License is distributed on an
> + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> + * KIND, either express or implied. See the License for the
> + * specific language governing permissions and limitations
> + * under the License.
> + */
> +
> +package org.apache.cxf.xkms.model.extensions;
> +
> +import javax.xml.bind.annotation.XmlAccessType;
> +import javax.xml.bind.annotation.XmlAccessorType;
> +import javax.xml.bind.annotation.XmlElement;
> +import javax.xml.bind.annotation.XmlRootElement;
> +import javax.xml.bind.annotation.XmlType;
> +
> +import org.apache.cxf.xkms.model.xkms.MessageExtensionAbstractType;
> +
> +@XmlRootElement
> +@XmlAccessorType(XmlAccessType.FIELD)
> +@XmlType(name = "resultDetails", propOrder = { "details" })
> +public class ResultDetails extends MessageExtensionAbstractType {
> +    @XmlElement(name = "Details", required = true)
> +    protected String details;
> +
> +    public ResultDetails() {
> +    }
> +
> +    public String getDetails() {
> +        return details;
> +    }
> +
> +    public void setDetails(String details) {
> +        this.details = details;
> +    }
> +
> +}
>
>