cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ashaki...@apache.org
Subject svn commit: r1484133 [2/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...
Date Sat, 18 May 2013 16:04:40 GMT
Added: cxf/trunk/services/xkms/xkms-common/src/main/model/binding.xjb
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/model/binding.xjb?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/model/binding.xjb (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/model/binding.xjb Sat May 18 16:04:37 2013
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  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.
+-->
+<jaxb:bindings version="2.1"
+  xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+  xmlns:xs="http://www.w3.org/2001/XMLSchema"
+  xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
+  xmlns:wsa="http://www.w3.org/2005/08/addressing"
+  xmlns:annox="http://annox.dev.java.net"
+  jaxb:extensionBindingPrefixes="xjc">
+
+    <jaxb:globalBindings
+        typesafeEnumBase="xs:anyURI"
+        typesafeEnumMemberName="generateError"/> 
+
+    <jaxb:bindings schemaLocation="xmldsig-core-schema.xsd" node="/xs:schema">
+        <jaxb:schemaBindings>
+            <jaxb:package name="org.apache.cxf.xkms.model.xmldsig"/>
+        </jaxb:schemaBindings>
+    </jaxb:bindings>
+
+    <jaxb:bindings schemaLocation="xenc-schema.xsd" node="/xs:schema">
+        <jaxb:schemaBindings>
+            <jaxb:package name="org.apache.cxf.xkms.model.xmlenc"/>
+        </jaxb:schemaBindings>
+    </jaxb:bindings>
+
+    <jaxb:bindings schemaLocation="xkms.xsd" node="/xs:schema">
+        <jaxb:schemaBindings>
+            <jaxb:package name="org.apache.cxf.xkms.model.xkms"/>
+       </jaxb:schemaBindings>
+       <!--jaxb:bindings node="xs:complexType[@name='MessageExtensionAbstractType']">
+            <annox:annotate target="class">
+                <annox:annotate annox:class="javax.xml.bind.annotation.XmlSeeAlso" value="org.apache.cxf.xkms.model.extensions.ResultDetails.class" />
+            </annox:annotate>           
+       </jaxb:bindings-->
+    </jaxb:bindings>
+
+</jaxb:bindings>

Added: cxf/trunk/services/xkms/xkms-common/src/main/model/xenc-schema.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/model/xenc-schema.xsd?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/model/xenc-schema.xsd (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/model/xenc-schema.xsd Sat May 18 16:04:37 2013
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+#
+# Copyright ©[2011] World Wide Web Consortium 
+# (Massachusetts Institute of Technology,  
+#  European Research Consortium for Informatics and Mathematics, 
+#  Keio University). All Rights Reserved.  
+# This work is distributed under the W3C® Software License [1] in the
+# hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+# PURPOSE. 
+# [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+#
+-->
+
+<!DOCTYPE schema  PUBLIC "-//W3C//DTD XMLSchema 200102//EN"
+ "http://www.w3.org/2001/XMLSchema.dtd"
+ [
+   <!ATTLIST schema
+     xmlns:xenc CDATA #FIXED 'http://www.w3.org/2001/04/xmlenc#'
+     xmlns:ds CDATA #FIXED 'http://www.w3.org/2000/09/xmldsig#'>
+   <!ENTITY xenc 'http://www.w3.org/2001/04/xmlenc#'>
+   <!ENTITY % p ''>
+   <!ENTITY % s ''>
+  ]>
+
+<schema xmlns='http://www.w3.org/2001/XMLSchema' version='1.0'
+        xmlns:xenc='http://www.w3.org/2001/04/xmlenc#'
+        xmlns:ds='http://www.w3.org/2000/09/xmldsig#'
+        targetNamespace='http://www.w3.org/2001/04/xmlenc#'
+        elementFormDefault='qualified'>
+
+  <import namespace='http://www.w3.org/2000/09/xmldsig#'
+          schemaLocation='./xmldsig-core-schema.xsd'/>
+
+  <complexType name='EncryptedType' abstract='true'>
+    <sequence>
+      <element name='EncryptionMethod' type='xenc:EncryptionMethodType'
+       minOccurs='0'/>
+      <element ref='ds:KeyInfo' minOccurs='0'/>
+      <element ref='xenc:CipherData'/>
+      <element ref='xenc:EncryptionProperties' minOccurs='0'/>
+    </sequence>
+    <attribute name='Id' type='ID' use='optional'/>
+    <attribute name='Type' type='anyURI' use='optional'/>
+    <attribute name='MimeType' type='string' use='optional'/>
+    <attribute name='Encoding' type='anyURI' use='optional'/>
+  </complexType>
+  
+  <complexType name='EncryptionMethodType' mixed='true'>
+    <sequence>
+      <element name='KeySize' minOccurs='0' type='xenc:KeySizeType'/>
+      <element name='OAEPparams' minOccurs='0' type='base64Binary'/>
+      <!-- note that optional xenc11:MGF element may be used here for
+           RSA-OAEP, when appropriate -->
+      <any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
+    </sequence>
+    <attribute name='Algorithm' type='anyURI' use='required'/>
+  </complexType>
+
+    <simpleType name='KeySizeType'>
+      <restriction base="integer"/>
+    </simpleType>
+
+  <element name='CipherData' type='xenc:CipherDataType'/>
+  <complexType name='CipherDataType'>
+     <choice>
+       <element name='CipherValue' type='base64Binary'/>
+       <element ref='xenc:CipherReference'/>
+     </choice>
+    </complexType>
+
+   <element name='CipherReference' type='xenc:CipherReferenceType'/>
+   <complexType name='CipherReferenceType'>
+       <choice>
+         <element name='Transforms' type='xenc:TransformsType' minOccurs='0'/>
+       </choice>
+       <attribute name='URI' type='anyURI' use='required'/>
+   </complexType>
+
+     <complexType name='TransformsType'>
+       <sequence>
+         <element ref='ds:Transform' maxOccurs='unbounded'/>
+       </sequence>
+     </complexType>
+
+
+  <element name='EncryptedData' type='xenc:EncryptedDataType'/>
+  <complexType name='EncryptedDataType'>
+    <complexContent>
+      <extension base='xenc:EncryptedType'>
+       </extension>
+    </complexContent>
+  </complexType>
+
+  <!-- Children of ds:KeyInfo -->
+
+  <element name='EncryptedKey' type='xenc:EncryptedKeyType'/>
+  <complexType name='EncryptedKeyType'>
+    <complexContent>
+      <extension base='xenc:EncryptedType'>
+        <sequence>
+          <element ref='xenc:ReferenceList' minOccurs='0'/>
+          <element name='CarriedKeyName' type='string' minOccurs='0'/>
+        </sequence>
+        <attribute name='Recipient' type='string'
+         use='optional'/>
+      </extension>
+    </complexContent>
+  </complexType>
+
+    <element name="AgreementMethod" type="xenc:AgreementMethodType"/>
+    <complexType name="AgreementMethodType" mixed="true">
+      <sequence>
+        <element name="KA-Nonce" minOccurs="0" type="base64Binary"/>
+        <!-- <element ref="ds:DigestMethod" minOccurs="0"/> -->
+        <any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+        <element name="OriginatorKeyInfo" minOccurs="0" type="ds:KeyInfoType"/>
+        <element name="RecipientKeyInfo" minOccurs="0" type="ds:KeyInfoType"/>
+      </sequence>
+      <attribute name="Algorithm" type="anyURI" use="required"/>
+    </complexType>
+
+  <!-- End Children of ds:KeyInfo -->
+
+  <element name='ReferenceList'>
+    <complexType>
+      <choice minOccurs='1' maxOccurs='unbounded'>
+        <element name='DataReference' type='xenc:ReferenceType'/>
+        <element name='KeyReference' type='xenc:ReferenceType'/>
+      </choice>
+    </complexType>
+  </element>
+
+  <complexType name='ReferenceType'>
+    <sequence>
+      <any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
+    </sequence>
+    <attribute name='URI' type='anyURI' use='required'/>
+  </complexType>
+
+
+  <element name='EncryptionProperties' type='xenc:EncryptionPropertiesType'/>
+  <complexType name='EncryptionPropertiesType'>
+    <sequence>
+      <element ref='xenc:EncryptionProperty' maxOccurs='unbounded'/>
+    </sequence>
+    <attribute name='Id' type='ID' use='optional'/>
+  </complexType>
+
+  <element name='EncryptionProperty' type='xenc:EncryptionPropertyType'/>
+  <complexType name='EncryptionPropertyType' mixed='true'>
+    <choice maxOccurs='unbounded'>
+      <any namespace='##other' processContents='lax'/>
+    </choice>
+    <attribute name='Target' type='anyURI' use='optional'/>
+    <attribute name='Id' type='ID' use='optional'/>
+    <anyAttribute namespace="http://www.w3.org/XML/1998/namespace"/>
+  </complexType>
+
+  <!-- Children of ds:KeyValue -->
+
+  <element name="DHKeyValue" type="xenc:DHKeyValueType"/>
+  <complexType name="DHKeyValueType">
+    <sequence>
+      <sequence minOccurs="0">
+        <element name="P" type="ds:CryptoBinary"/>
+        <element name="Q" type="ds:CryptoBinary"/>
+        <element name="Generator" type="ds:CryptoBinary"/>
+      </sequence>
+      <element name="Public" type="ds:CryptoBinary"/>
+      <sequence minOccurs="0">
+        <element name="seed" type="ds:CryptoBinary"/>
+        <element name="pgenCounter" type="ds:CryptoBinary"/>
+      </sequence>
+    </sequence>
+  </complexType>
+
+  <!-- End Children of ds:KeyValue -->
+  
+</schema>
+

Added: cxf/trunk/services/xkms/xkms-common/src/main/model/xkms.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/model/xkms.wsdl?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/model/xkms.wsdl (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/model/xkms.wsdl Sat May 18 16:04:37 2013
@@ -0,0 +1,203 @@
+<?xml version="1.0"?>
+
+<wsdl:definitions name="XMLKeyManagement"
+	targetNamespace="http://www.w3.org/2002/03/xkms#wsdl" xmlns:tns="http://www.w3.org/2002/03/xkms#wsdl"
+	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"
+	xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xkms="http://www.w3.org/2002/03/xkms#"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+	<types>  
+		<xsd:schema>  
+          	  <xsd:import namespace="http://www.w3.org/2002/03/xkms#"
+			 schemaLocation="./xkms.xsd"/>  
+		</xsd:schema>  
+	</types>  
+	
+	<message name="PendingRequest">
+		<part name="body" element="xkms:PendingRequest" />
+	</message>
+	<message name="PendingResult">
+		<part name="body" element="xkms:Result" />
+	</message>
+	<message name="CompoundRequest">
+		<part name="body" element="xkms:CompoundRequest" />
+	</message>
+	<message name="CompoundResult">
+		<part name="body" element="xkms:CompoundResult" />
+	</message>
+	<message name="StatusRequest">
+		<part name="body" element="xkms:StatusRequest" />
+	</message>
+	<message name="StatusResult">
+		<part name="body" element="xkms:StatusResult" />
+	</message>
+	<message name="LocateRequest">
+		<part name="body" element="xkms:LocateRequest" />
+	</message>
+	<message name="LocateResult">
+		<part name="body" element="xkms:LocateResult" />
+	</message>
+	<message name="ValidateRequest">
+		<part name="body" element="xkms:ValidateRequest" />
+	</message>
+	<message name="ValidateResult">
+		<part name="body" element="xkms:ValidateResult" />
+	</message>
+	<message name="RegisterRequest">
+		<part name="body" element="xkms:RegisterRequest" />
+	</message>
+	<message name="RegisterResult">
+		<part name="body" element="xkms:RegisterResult" />
+	</message>
+	<message name="ReissueRequest">
+		<part name="body" element="xkms:ReissueRequest" />
+	</message>
+	<message name="ReissueResult">
+		<part name="body" element="xkms:ReissueResult" />
+	</message>
+	<message name="RevokeRequest">
+		<part name="body" element="xkms:RevokeRequest" />
+	</message>
+	<message name="RevokeResult">
+		<part name="body" element="xkms:RevokeResult" />
+	</message>
+	<message name="RecoverRequest">
+		<part name="body" element="xkms:RecoverRequest" />
+	</message>
+	<message name="RecoverResult">
+		<part name="body" element="xkms:RecoverResult" />
+	</message>
+
+	<portType name="XKMSPortType">
+		<operation name="Pending">
+			<input message="tns:PendingRequest" />
+			<output message="tns:PendingResult" />
+		</operation>
+		<operation name="Compound">
+			<input message="tns:CompoundRequest" />
+			<output message="tns:CompoundResult" />
+		</operation>
+		<operation name="Status">
+			<input message="tns:StatusRequest" />
+			<output message="tns:StatusResult" />
+		</operation>
+		<operation name="Locate">
+			<input message="tns:LocateRequest" />
+			<output message="tns:LocateResult" />
+		</operation>
+		<operation name="Validate">
+			<input message="tns:ValidateRequest" />
+			<output message="tns:ValidateResult" />
+		</operation>
+		<operation name="Register">
+			<input message="tns:RegisterRequest" />
+			<output message="tns:RegisterResult" />
+		</operation>
+		<operation name="Reissue">
+			<input message="tns:ReissueRequest" />
+			<output message="tns:ReissueResult" />
+		</operation>
+		<operation name="Revoke">
+			<input message="tns:RevokeRequest" />
+			<output message="tns:RevokeResult" />
+		</operation>
+		<operation name="Recover">
+			<input message="tns:RecoverRequest" />
+			<output message="tns:RecoverResult" />
+		</operation>
+	</portType>
+
+	<binding name="SOAPBinding" type="tns:XKMSPortType">
+		<wsdlsoap:binding transport="http://schemas.xmlsoap.org/soap/http"
+			style="document" />
+		<operation name="Pending">
+			<wsdlsoap:operation soapAction="" />
+			<input>
+				<wsdlsoap:body use="literal" />
+			</input>
+			<output>
+				<wsdlsoap:body use="literal" />
+			</output>
+		</operation>
+		<operation name="Compound">
+			<wsdlsoap:operation soapAction="" />
+			<input>
+				<wsdlsoap:body use="literal" />
+			</input>
+			<output>
+				<wsdlsoap:body use="literal" />
+			</output>
+		</operation>
+		<operation name="Status">
+			<wsdlsoap:operation soapAction="" />
+			<input>
+				<wsdlsoap:body use="literal" />
+			</input>
+			<output>
+				<wsdlsoap:body use="literal" />
+			</output>
+		</operation>
+		<operation name="Locate">
+			<wsdlsoap:operation soapAction="" />
+			<input>
+				<wsdlsoap:body use="literal" />
+			</input>
+			<output>
+				<wsdlsoap:body use="literal" />
+			</output>
+		</operation>
+		<operation name="Validate">
+			<wsdlsoap:operation soapAction="" />
+			<input>
+				<wsdlsoap:body use="literal" />
+			</input>
+			<output>
+				<wsdlsoap:body use="literal" />
+			</output>
+		</operation>
+		<operation name="Register">
+			<wsdlsoap:operation soapAction="" />
+			<input>
+				<wsdlsoap:body use="literal" />
+			</input>
+			<output>
+				<wsdlsoap:body use="literal" />
+			</output>
+		</operation>
+		<operation name="Reissue">
+			<wsdlsoap:operation soapAction="" />
+			<input>
+				<wsdlsoap:body use="literal" />
+			</input>
+			<output>
+				<wsdlsoap:body use="literal" />
+			</output>
+		</operation>
+		<operation name="Revoke">
+			<wsdlsoap:operation soapAction="" />
+			<input>
+				<wsdlsoap:body use="literal" />
+			</input>
+			<output>
+				<wsdlsoap:body use="literal" />
+			</output>
+		</operation>
+		<operation name="Recover">
+			<wsdlsoap:operation soapAction="" />
+			<input>
+				<wsdlsoap:body use="literal" />
+			</input>
+			<output>
+				<wsdlsoap:body use="literal" />
+			</output>
+		</operation>
+	</binding>
+
+	<service name="XKMSService">
+		<port name="XKMSPort" binding="tns:SOAPBinding">
+			<wsdlsoap:address location="http://localhost:8080/services/xkms" />
+		</port>
+	</service>
+
+</wsdl:definitions>
+

Added: cxf/trunk/services/xkms/xkms-common/src/main/model/xkms.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/model/xkms.xsd?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/model/xkms.xsd (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/model/xkms.xsd Sat May 18 16:04:37 2013
@@ -0,0 +1,439 @@
+<?xml version="1.0"?>
+<!DOCTYPE schema [
+  <!--  The URI for the XKMS namespace, and also the base URI used for
+        URI's defined by the specification. -->
+  <!ENTITY xkms 'http://www.w3.org/2002/03/xkms#'>
+]>
+<schema xmlns:xkms="http://www.w3.org/2002/03/xkms#"
+ xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
+ xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
+ xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/2002/03/xkms#" elementFormDefault="qualified" attributeFormDefault="unqualified">
+<import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="./xmldsig-core-schema.xsd"></import>
+<import namespace="http://www.w3.org/2001/04/xmlenc#" schemaLocation="./xenc-schema.xsd"></import>
+<annotation>
+<documentation xml:lang="en">
+   XML Schema for XKMS 2.0 Recommendation
+</documentation></annotation>
+<!-- /Namespace -->
+<!-- MessageAbstractType -->
+<complexType name="MessageAbstractType" abstract="true">
+<sequence>
+<element ref="ds:Signature" minOccurs="0"></element>
+<element ref="xkms:MessageExtension" minOccurs="0" maxOccurs="unbounded"></element>
+<element ref="xkms:OpaqueClientData" minOccurs="0"></element></sequence>
+<attribute name="Id" type="ID" use="required"></attribute>
+<attribute name="Service" type="anyURI" use="required"></attribute>
+<attribute name="Nonce" type="base64Binary" use="optional"></attribute></complexType>
+<!-- /MessageAbstractType -->
+<!-- MessageExtension -->
+<element name="MessageExtension" type="xkms:MessageExtensionAbstractType" abstract="true"></element>
+<complexType name="MessageExtensionAbstractType" abstract="true"></complexType>
+<!-- /MessageExtension -->
+<!-- OpaqueClientData -->
+<element name="OpaqueClientData" type="xkms:OpaqueClientDataType"></element>
+<complexType name="OpaqueClientDataType">
+<sequence maxOccurs="unbounded">
+<element ref="xkms:OpaqueData" minOccurs="0"></element></sequence></complexType>
+<element name="OpaqueData" type="base64Binary"></element>
+<!-- /OpaqueClientData -->
+<!-- RequestAbstractType -->
+<complexType name="RequestAbstractType" abstract="true">
+<complexContent>
+<extension base="xkms:MessageAbstractType">
+<sequence>
+<element ref="xkms:ResponseMechanism" minOccurs="0" maxOccurs="unbounded"></element>
+<element ref="xkms:RespondWith" minOccurs="0" maxOccurs="unbounded"></element>
+<element ref="xkms:PendingNotification" minOccurs="0"></element></sequence>
+<attribute name="OriginalRequestId" type="NCName" use="optional"></attribute>
+<attribute name="ResponseLimit" type="integer" use="optional"></attribute></extension></complexContent></complexType>
+<!-- /RequestAbstractType -->
+<!-- ResponseMechanism -->
+<simpleType name="ResponseMechanismEnum">
+<restriction base="anyURI">
+<enumeration value="http://www.w3.org/2002/03/xkms#Pending"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#Represent"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#RequestSignatureValue"></enumeration></restriction></simpleType>
+<simpleType name="ResponseMechanismOpenEnum">
+<union memberTypes="xkms:ResponseMechanismEnum anyURI"></union></simpleType>
+<element name="ResponseMechanism" type="xkms:ResponseMechanismOpenEnum"></element>
+<!-- /ResponseMechanism -->
+<!-- RespondWith -->
+<simpleType name="RespondWithEnum">
+<restriction base="anyURI">
+<enumeration value="http://www.w3.org/2002/03/xkms#KeyName"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#KeyValue"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#X509Cert"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#X509Chain"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#X509CRL"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#RetrievalMethod"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#PGP"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#PGPWeb"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#SPKI"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#PrivateKey"></enumeration></restriction></simpleType>
+<simpleType name="RespondWithOpenEnum">
+<union memberTypes="xkms:RespondWithEnum anyURI"></union></simpleType>
+<element name="RespondWith" type="xkms:RespondWithOpenEnum"></element>
+<!-- /RespondWith -->
+<!-- PendingNotification -->
+<element name="PendingNotification" type="xkms:PendingNotificationType"></element>
+<complexType name="PendingNotificationType">
+<attribute name="Mechanism" type="anyURI" use="required"></attribute>
+<attribute name="Identifier" type="anyURI" use="required"></attribute></complexType>
+<!-- /PendingNotification -->
+<!-- PendingRequest -->
+<element name="PendingRequest" type="xkms:PendingRequestType"></element>
+<complexType name="PendingRequestType">
+<complexContent>
+<extension base="xkms:RequestAbstractType">
+<attribute name="ResponseId" type="NCName" use="required"></attribute></extension></complexContent></complexType>
+<!-- /PendingRequest -->
+<!-- ResultType -->
+<element name="Result" type="xkms:ResultType"></element>
+<simpleType name="ResultMajorEnum">
+<restriction base="anyURI">
+<enumeration value="http://www.w3.org/2002/03/xkms#Success"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#VersionMismatch"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#Sender"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#Receiver"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#Represent"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#Pending"></enumeration></restriction></simpleType>
+<simpleType name="ResultMajorOpenEnum">
+<union memberTypes="xkms:ResultMajorEnum anyURI"></union></simpleType>
+<simpleType name="ResultMinorEnum">
+<restriction base="anyURI">
+<enumeration value="http://www.w3.org/2002/03/xkms#NoMatch"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#TooManyResponses"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#Incomplete"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#Failure"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#Refused"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#NoAuthentication"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#MessageNotSupported"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#UnknownResponseId"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#RepresentRequired"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#NotSynchronous"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#OptionalElementNotSupported"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#ProofOfPossessionRequired"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#TimeInstantNotSupported"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#TimeInstantOutOfRange"></enumeration>
+
+</restriction></simpleType>
+<simpleType name="ResultMinorOpenEnum">
+<union memberTypes="xkms:ResultMinorEnum anyURI"></union></simpleType>
+<complexType name="ResultType">
+<complexContent>
+<extension base="xkms:MessageAbstractType">
+<sequence>
+<element ref="xkms:RequestSignatureValue" minOccurs="0"></element></sequence>
+<attribute name="ResultMajor" type="xkms:ResultMajorOpenEnum" use="required"></attribute>
+<attribute name="ResultMinor" type="xkms:ResultMinorOpenEnum" use="optional"></attribute>
+<attribute name="RequestId" type="NCName" use="optional"></attribute></extension></complexContent></complexType>
+<!-- /ResultType -->
+<!-- RequestSignatureValue -->
+<element name="RequestSignatureValue" type="ds:SignatureValueType"></element>
+<!-- /RequestSignatureValue -->
+<!-- CompoundRequest -->
+<element name="CompoundRequest" type="xkms:CompoundRequestType"></element>
+<complexType name="CompoundRequestType">
+<complexContent>
+<extension base="xkms:RequestAbstractType">
+<choice maxOccurs="unbounded">
+<element ref="xkms:LocateRequest"></element>
+<element ref="xkms:ValidateRequest"></element>
+<element ref="xkms:RegisterRequest"></element>
+<element ref="xkms:ReissueRequest"></element>
+<element ref="xkms:RecoverRequest"></element>
+<element ref="xkms:RevokeRequest"></element></choice></extension></complexContent></complexType>
+<!-- /CompoundRequest -->
+<!-- CompoundResult -->
+<element name="CompoundResult" type="xkms:CompoundResultType"></element>
+<complexType name="CompoundResultType">
+<complexContent>
+<extension base="xkms:ResultType">
+<choice minOccurs="0" maxOccurs="unbounded">
+<element ref="xkms:LocateResult"></element>
+<element ref="xkms:ValidateResult"></element>
+<element ref="xkms:RegisterResult"></element>
+<element ref="xkms:ReissueResult"></element>
+<element ref="xkms:RecoverResult"></element>
+<element ref="xkms:RevokeResult"></element></choice></extension></complexContent></complexType>
+<!-- /CompoundResult -->
+<!-- StatusRequest -->
+<element name="StatusRequest" type="xkms:StatusRequestType"></element>
+<complexType name="StatusRequestType">
+<complexContent>
+<extension base="xkms:PendingRequestType"></extension></complexContent></complexType>
+<!-- /StatusRequest -->
+<!-- StatusResult -->
+<element name="StatusResult" type="xkms:StatusResultType"></element>
+<complexType name="StatusResultType">
+<complexContent>
+<extension base="xkms:ResultType">
+<attribute name="Success" type="integer" use="optional"></attribute>
+<attribute name="Failure" type="integer" use="optional"></attribute>
+<attribute name="Pending" type="integer" use="optional"></attribute></extension></complexContent></complexType>
+<!-- /StatusResult -->
+<!-- KeyBindingAbstractType-->
+<complexType name="KeyBindingAbstractType" abstract="true">
+<sequence>
+<element ref="ds:KeyInfo" minOccurs="0"></element>
+<element ref="xkms:KeyUsage" minOccurs="0" maxOccurs="3"></element>
+<element ref="xkms:UseKeyWith" minOccurs="0" maxOccurs="unbounded"></element></sequence>
+<attribute name="Id" type="ID" use="optional"></attribute></complexType>
+<!-- /KeyBindingAbstractType-->
+<!-- UnverifiedKeyBinding -->
+<element name="UnverifiedKeyBinding" type="xkms:UnverifiedKeyBindingType"></element>
+<complexType name="UnverifiedKeyBindingType">
+<complexContent>
+<extension base="xkms:KeyBindingAbstractType">
+<sequence>
+<element ref="xkms:ValidityInterval" minOccurs="0"></element></sequence></extension></complexContent></complexType>
+<!-- /UnverifiedKeyBinding -->
+<!-- KeyBinding -->
+<element name="KeyBinding" type="xkms:KeyBindingType"></element>
+<complexType name="KeyBindingType">
+<complexContent>
+<extension base="xkms:UnverifiedKeyBindingType">
+<sequence>
+<element ref="xkms:Status"></element></sequence></extension></complexContent></complexType>
+<!-- /KeyBinding -->
+<!-- KeyUsage -->
+<simpleType name="KeyUsageEnum">
+<restriction base="anyURI">
+<enumeration value="http://www.w3.org/2002/03/xkms#Encryption"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#Signature"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#Exchange"></enumeration></restriction></simpleType>
+<element name="KeyUsage" type="xkms:KeyUsageEnum"></element>
+<!-- /KeyUsage -->
+<!-- UseKeyWith -->
+<element name="UseKeyWith" type="xkms:UseKeyWithType"></element>
+<complexType name="UseKeyWithType">
+<attribute name="Application" type="anyURI" use="required"></attribute>
+<attribute name="Identifier" type="string" use="required"></attribute></complexType>
+<!-- /UseKeyWith -->
+<!-- Status -->
+<element name="Status" type="xkms:StatusType"></element>
+<complexType name="StatusType">
+<sequence>
+<element ref="xkms:ValidReason" minOccurs="0" maxOccurs="unbounded"></element>
+<element ref="xkms:IndeterminateReason" minOccurs="0" maxOccurs="unbounded"></element>
+<element ref="xkms:InvalidReason" minOccurs="0" maxOccurs="unbounded"></element></sequence>
+<attribute name="StatusValue" type="xkms:KeyBindingEnum" use="required"></attribute></complexType>
+<simpleType name="KeyBindingEnum">
+<restriction base="anyURI">
+<enumeration value="http://www.w3.org/2002/03/xkms#Valid"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#Invalid"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#Indeterminate"></enumeration></restriction></simpleType>
+<!-- /Status -->
+<!-- Reason -->
+<simpleType name="ReasonEnum">
+<restriction base="anyURI">
+<enumeration value="http://www.w3.org/2002/03/xkms#IssuerTrust"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#RevocationStatus"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#ValidityInterval"></enumeration>
+<enumeration value="http://www.w3.org/2002/03/xkms#Signature"></enumeration></restriction></simpleType>
+<simpleType name="ReasonOpenEnum">
+<union memberTypes="xkms:ReasonEnum anyURI"></union></simpleType>
+<element name="ValidReason" type="xkms:ReasonOpenEnum"></element>
+<element name="InvalidReason" type="xkms:ReasonOpenEnum"></element>
+<element name="IndeterminateReason" type="xkms:ReasonOpenEnum"></element>
+<!-- /Reason -->
+<!-- ValidityInterval -->
+<element name="ValidityInterval" type="xkms:ValidityIntervalType"></element>
+<complexType name="ValidityIntervalType">
+<attribute name="NotBefore" type="dateTime" use="optional"></attribute>
+<attribute name="NotOnOrAfter" type="dateTime" use="optional"></attribute></complexType>
+<!-- /ValidityInterval -->
+<!-- QueryKeyBinding -->
+<element name="QueryKeyBinding" type="xkms:QueryKeyBindingType"></element>
+<complexType name="QueryKeyBindingType">
+<complexContent>
+<extension base="xkms:KeyBindingAbstractType">
+<sequence>
+<element ref="xkms:TimeInstant" minOccurs="0"></element></sequence></extension></complexContent></complexType>
+<!-- /QueryKeyBinding -->
+<!-- TimeInstant -->
+<element name="TimeInstant" type="xkms:TimeInstantType"></element>
+<complexType name="TimeInstantType">
+<attribute name="Time" type="dateTime" use="required"></attribute></complexType>
+<!-- /TimeInstant -->
+<!-- PrototypeKeyBinding -->
+<element name="PrototypeKeyBinding" type="xkms:PrototypeKeyBindingType"></element>
+<complexType name="PrototypeKeyBindingType">
+<complexContent>
+<extension base="xkms:KeyBindingAbstractType">
+<sequence>
+<element ref="xkms:ValidityInterval" minOccurs="0"></element>
+<element ref="xkms:RevocationCodeIdentifier" minOccurs="0"></element></sequence></extension></complexContent></complexType>
+<!-- /PrototypeKeyBinding -->
+<!-- RevocationCodeIdentifier -->
+<element name="RevocationCodeIdentifier" type="xkms:RevocationCodeIdentifierType"></element>
+<simpleType name="RevocationCodeIdentifierType">
+<restriction base="base64Binary"></restriction></simpleType>
+<!-- /RevocationCodeIdentifier -->
+<!-- LocateRequest -->
+<element name="LocateRequest" type="xkms:LocateRequestType"></element>
+<complexType name="LocateRequestType">
+<complexContent>
+<extension base="xkms:RequestAbstractType">
+<sequence>
+<element ref="xkms:QueryKeyBinding"></element></sequence></extension></complexContent></complexType>
+<!-- /LocateRequest -->
+<!-- LocateResult -->
+<element name="LocateResult" type="xkms:LocateResultType"></element>
+<complexType name="LocateResultType">
+<complexContent>
+<extension base="xkms:ResultType">
+<sequence>
+<element ref="xkms:UnverifiedKeyBinding" minOccurs="0" maxOccurs="unbounded"></element></sequence></extension></complexContent></complexType>
+<!-- /LocateResult -->
+<!-- ValidateRequest -->
+<element name="ValidateRequest" type="xkms:ValidateRequestType"></element>
+<complexType name="ValidateRequestType">
+<complexContent>
+<extension base="xkms:RequestAbstractType">
+<sequence>
+<element ref="xkms:QueryKeyBinding"></element></sequence></extension></complexContent></complexType>
+<!-- /ValidateRequest -->
+<!-- ValidateResult -->
+<element name="ValidateResult" type="xkms:ValidateResultType"></element>
+<complexType name="ValidateResultType">
+<complexContent>
+<extension base="xkms:ResultType">
+<sequence>
+<element ref="xkms:KeyBinding" minOccurs="0" maxOccurs="unbounded"></element></sequence></extension></complexContent></complexType>
+<!-- /ValidateResult -->
+<!-- Authentication -->
+<element name="Authentication" type="xkms:AuthenticationType"></element>
+<complexType name="AuthenticationType">
+<sequence>
+<element ref="xkms:KeyBindingAuthentication" minOccurs="0"></element>
+<element ref="xkms:NotBoundAuthentication" minOccurs="0"></element></sequence></complexType>
+<!-- /Authentication -->
+<!-- KeyBindingAuthentication -->
+<element name="KeyBindingAuthentication" type="xkms:KeyBindingAuthenticationType"></element>
+<complexType name="KeyBindingAuthenticationType">
+<sequence>
+<element ref="ds:Signature"></element></sequence></complexType>
+<!-- /KeyBindingAuthentication -->
+<!-- NotBoundAuthentication -->
+<element name="NotBoundAuthentication" type="xkms:NotBoundAuthenticationType"></element>
+<complexType name="NotBoundAuthenticationType">
+<attribute name="Protocol" type="anyURI" use="required"></attribute>
+<attribute name="Value" type="base64Binary" use="required"></attribute></complexType>
+<!-- /NotBoundAuthentication -->
+<!-- ProofOfPossession -->
+<element name="ProofOfPossession" type="xkms:ProofOfPossessionType"></element>
+<complexType name="ProofOfPossessionType">
+<sequence>
+<element ref="ds:Signature"></element></sequence></complexType>
+<!-- /ProofOfPossession -->
+<!-- PrivateKey -->
+<element name="PrivateKey" type="xkms:PrivateKeyType"></element>
+<complexType name="PrivateKeyType">
+<sequence>
+<element ref="xenc:EncryptedData"></element></sequence></complexType>
+<!-- /PrivateKey -->
+<!-- RegisterRequest -->
+<element name="RegisterRequest" type="xkms:RegisterRequestType"></element>
+<complexType name="RegisterRequestType">
+<complexContent>
+<extension base="xkms:RequestAbstractType">
+<sequence>
+<element ref="xkms:PrototypeKeyBinding"></element>
+<element ref="xkms:Authentication"></element>
+<element ref="xkms:ProofOfPossession" minOccurs="0"></element></sequence></extension></complexContent></complexType>
+<!-- /RegisterRequest -->
+<!-- RegisterResult -->
+<element name="RegisterResult" type="xkms:RegisterResultType"></element>
+<complexType name="RegisterResultType">
+<complexContent>
+<extension base="xkms:ResultType">
+<sequence>
+<element ref="xkms:KeyBinding" minOccurs="0" maxOccurs="unbounded"></element>
+<element ref="xkms:PrivateKey" minOccurs="0"></element></sequence></extension></complexContent></complexType>
+<!-- /RegisterResult -->
+<!-- ReissueRequest -->
+<element name="ReissueRequest" type="xkms:ReissueRequestType"></element>
+<complexType name="ReissueRequestType">
+<complexContent>
+<extension base="xkms:RequestAbstractType">
+<sequence>
+<element ref="xkms:ReissueKeyBinding"></element>
+<element ref="xkms:Authentication"></element>
+<element ref="xkms:ProofOfPossession" minOccurs="0"></element></sequence></extension></complexContent></complexType>
+<element name="ReissueKeyBinding" type="xkms:KeyBindingType"></element>
+<!-- /ReissueRequest -->
+<!-- ReissueResult -->
+<element name="ReissueResult" type="xkms:ReissueResultType"></element>
+<complexType name="ReissueResultType">
+<complexContent>
+<extension base="xkms:ResultType">
+<sequence>
+<element ref="xkms:KeyBinding" minOccurs="0" maxOccurs="unbounded"></element></sequence></extension></complexContent></complexType>
+<!-- /ReissueResult -->
+<!-- RevokeRequest -->
+<element name="RevokeRequest" type="xkms:RevokeRequestType"></element>
+<complexType name="RevokeRequestType">
+<complexContent>
+<extension base="xkms:RequestAbstractType">
+<sequence>
+<element ref="xkms:RevokeKeyBinding"></element>
+<choice>
+<element ref="xkms:Authentication"></element>
+<element ref="xkms:RevocationCode"></element></choice></sequence></extension></complexContent></complexType>
+<element name="RevokeKeyBinding" type="xkms:KeyBindingType"></element>
+<!-- /RevokeRequest -->
+<!-- RevocationCode -->
+<element name="RevocationCode" type="xkms:RevocationCodeType"></element>
+<simpleType name="RevocationCodeType">
+<restriction base="base64Binary"></restriction></simpleType>
+<!-- /RevocationCode -->
+<!-- RevokeResult -->
+<element name="RevokeResult" type="xkms:RevokeResultType"></element>
+<complexType name="RevokeResultType">
+<complexContent>
+<extension base="xkms:ResultType">
+<sequence>
+<element ref="xkms:KeyBinding" minOccurs="0" maxOccurs="unbounded"></element></sequence></extension></complexContent></complexType>
+<!-- /RevokeResult -->
+<!-- RecoverRequest -->
+<element name="RecoverRequest" type="xkms:RecoverRequestType"></element>
+<complexType name="RecoverRequestType">
+<complexContent>
+<extension base="xkms:RequestAbstractType">
+<sequence>
+<element ref="xkms:RecoverKeyBinding"></element>
+<element ref="xkms:Authentication"></element></sequence></extension></complexContent></complexType>
+<element name="RecoverKeyBinding" type="xkms:KeyBindingType"></element>
+<!-- /RecoverRequest -->
+<!-- RecoverResult -->
+<element name="RecoverResult" type="xkms:RecoverResultType"></element>
+<complexType name="RecoverResultType">
+<complexContent>
+<extension base="xkms:ResultType">
+<sequence>
+<element ref="xkms:KeyBinding" minOccurs="0" maxOccurs="unbounded"></element>
+<element ref="xkms:PrivateKey" minOccurs="0"></element></sequence></extension></complexContent></complexType>
+<!-- /RecoverResult -->
+<!-- RSAKeyPair -->
+<element name="RSAKeyPair" type="xkms:RSAKeyPairType"></element>
+<complexType name="RSAKeyPairType">
+<sequence>
+<element ref="xkms:Modulus"></element>
+<element ref="xkms:Exponent"></element>
+<element ref="xkms:P"></element>
+<element ref="xkms:Q"></element>
+<element ref="xkms:DP"></element>
+<element ref="xkms:DQ"></element>
+<element ref="xkms:InverseQ"></element>
+<element ref="xkms:D"></element></sequence></complexType>
+<element name="Modulus" type="ds:CryptoBinary"></element>
+<element name="Exponent" type="ds:CryptoBinary"></element>
+<element name="P" type="ds:CryptoBinary"></element>
+<element name="Q" type="ds:CryptoBinary"></element>
+<element name="DP" type="ds:CryptoBinary"></element>
+<element name="DQ" type="ds:CryptoBinary"></element>
+<element name="InverseQ" type="ds:CryptoBinary"></element>
+<element name="D" type="ds:CryptoBinary"></element>
+<!-- /RSAKeyPair -->
+<!-- End Schema --></schema>

Added: cxf/trunk/services/xkms/xkms-common/src/main/model/xmldsig-core-schema.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-common/src/main/model/xmldsig-core-schema.xsd?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-common/src/main/model/xmldsig-core-schema.xsd (added)
+++ cxf/trunk/services/xkms/xkms-common/src/main/model/xmldsig-core-schema.xsd Sat May 18 16:04:37 2013
@@ -0,0 +1,318 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE schema
+  PUBLIC "-//W3C//DTD XMLSchema 200102//EN" "http://www.w3.org/2001/XMLSchema.dtd"
+ [
+   <!ATTLIST schema 
+     xmlns:ds CDATA #FIXED "http://www.w3.org/2000/09/xmldsig#">
+   <!ENTITY dsig 'http://www.w3.org/2000/09/xmldsig#'>
+   <!ENTITY % p ''>
+   <!ENTITY % s ''>
+  ]>
+
+<!-- Schema for XML Signatures
+    http://www.w3.org/2000/09/xmldsig#
+    $Revision: 1.1 $ on $Date: 2002/02/08 20:32:26 $ by $Author: reagle $
+
+    Copyright 2001 The Internet Society and W3C (Massachusetts Institute
+    of Technology, Institut National de Recherche en Informatique et en
+    Automatique, Keio University). All Rights Reserved.
+    http://www.w3.org/Consortium/Legal/
+
+    This document is governed by the W3C Software License [1] as described
+    in the FAQ [2].
+
+    [1] http://www.w3.org/Consortium/Legal/copyright-software-19980720
+    [2] http://www.w3.org/Consortium/Legal/IPR-FAQ-20000620.html#DTD
+-->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+        xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
+        targetNamespace="http://www.w3.org/2000/09/xmldsig#"
+        version="0.1" elementFormDefault="qualified"> 
+
+<!-- Basic Types Defined for Signatures -->
+
+<simpleType name="CryptoBinary">
+  <restriction base="base64Binary">
+  </restriction>
+</simpleType>
+
+<!-- Start Signature -->
+
+<element name="Signature" type="ds:SignatureType"/>
+<complexType name="SignatureType">
+  <sequence> 
+    <element ref="ds:SignedInfo"/> 
+    <element ref="ds:SignatureValue"/> 
+    <element ref="ds:KeyInfo" minOccurs="0"/> 
+    <element ref="ds:Object" minOccurs="0" maxOccurs="unbounded"/> 
+  </sequence>  
+  <attribute name="Id" type="ID" use="optional"/>
+</complexType>
+
+  <element name="SignatureValue" type="ds:SignatureValueType"/> 
+  <complexType name="SignatureValueType">
+    <simpleContent>
+      <extension base="base64Binary">
+        <attribute name="Id" type="ID" use="optional"/>
+      </extension>
+    </simpleContent>
+  </complexType>
+
+<!-- Start SignedInfo -->
+
+<element name="SignedInfo" type="ds:SignedInfoType"/>
+<complexType name="SignedInfoType">
+  <sequence> 
+    <element ref="ds:CanonicalizationMethod"/> 
+    <element ref="ds:SignatureMethod"/> 
+    <element ref="ds:Reference" maxOccurs="unbounded"/> 
+  </sequence>  
+  <attribute name="Id" type="ID" use="optional"/> 
+</complexType>
+
+  <element name="CanonicalizationMethod" type="ds:CanonicalizationMethodType"/> 
+  <complexType name="CanonicalizationMethodType" mixed="true">
+    <sequence>
+      <any namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
+      <!-- (0,unbounded) elements from (1,1) namespace -->
+    </sequence>
+    <attribute name="Algorithm" type="anyURI" use="required"/> 
+  </complexType>
+
+  <element name="SignatureMethod" type="ds:SignatureMethodType"/>
+  <complexType name="SignatureMethodType" mixed="true">
+    <sequence>
+      <element name="HMACOutputLength" minOccurs="0" type="ds:HMACOutputLengthType"/>
+      <any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+      <!-- (0,unbounded) elements from (1,1) external namespace -->
+    </sequence>
+    <attribute name="Algorithm" type="anyURI" use="required"/> 
+  </complexType>
+
+<!-- Start Reference -->
+
+<element name="Reference" type="ds:ReferenceType"/>
+<complexType name="ReferenceType">
+  <sequence> 
+    <element ref="ds:Transforms" minOccurs="0"/> 
+    <element ref="ds:DigestMethod"/> 
+    <element ref="ds:DigestValue"/> 
+  </sequence>
+  <attribute name="Id" type="ID" use="optional"/> 
+  <attribute name="URI" type="anyURI" use="optional"/> 
+  <attribute name="Type" type="anyURI" use="optional"/> 
+</complexType>
+
+  <element name="Transforms" type="ds:TransformsType"/>
+  <complexType name="TransformsType">
+    <sequence>
+      <element ref="ds:Transform" maxOccurs="unbounded"/>  
+    </sequence>
+  </complexType>
+
+  <element name="Transform" type="ds:TransformType"/>
+  <complexType name="TransformType" mixed="true">
+    <choice minOccurs="0" maxOccurs="unbounded"> 
+      <any namespace="##other" processContents="lax"/>
+      <!-- (1,1) elements from (0,unbounded) namespaces -->
+      <element name="XPath" type="string"/> 
+    </choice>
+    <attribute name="Algorithm" type="anyURI" use="required"/> 
+  </complexType>
+
+<!-- End Reference -->
+
+<element name="DigestMethod" type="ds:DigestMethodType"/>
+<complexType name="DigestMethodType" mixed="true"> 
+  <sequence>
+    <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+  </sequence>    
+  <attribute name="Algorithm" type="anyURI" use="required"/> 
+</complexType>
+
+<element name="DigestValue" type="ds:DigestValueType"/>
+<simpleType name="DigestValueType">
+  <restriction base="base64Binary"/>
+</simpleType>
+
+<!-- End SignedInfo -->
+
+<!-- Start KeyInfo -->
+
+<element name="KeyInfo" type="ds:KeyInfoType"/> 
+<complexType name="KeyInfoType" mixed="true">
+  <choice maxOccurs="unbounded">     
+    <element ref="ds:KeyName"/> 
+    <element ref="ds:KeyValue"/> 
+    <element ref="ds:RetrievalMethod"/> 
+    <element ref="ds:X509Data"/> 
+    <element ref="ds:PGPData"/> 
+    <element ref="ds:SPKIData"/>
+    <element ref="ds:MgmtData"/>
+    <any processContents="lax" namespace="##other"/>
+    <!-- (1,1) elements from (0,unbounded) namespaces -->
+  </choice>
+  <attribute name="Id" type="ID" use="optional"/> 
+</complexType>
+
+  <element name="KeyName" type="string"/>
+  <element name="MgmtData" type="string"/>
+
+  <element name="KeyValue" type="ds:KeyValueType"/> 
+  <complexType name="KeyValueType" mixed="true">
+   <choice>
+     <element ref="ds:DSAKeyValue"/>
+     <element ref="ds:RSAKeyValue"/>
+     <any namespace="##other" processContents="lax"/>
+   </choice>
+  </complexType>
+
+  <element name="RetrievalMethod" type="ds:RetrievalMethodType"/> 
+  <complexType name="RetrievalMethodType">
+    <sequence>
+      <element ref="ds:Transforms" minOccurs="0"/> 
+    </sequence>  
+    <attribute name="URI" type="anyURI"/>
+    <attribute name="Type" type="anyURI" use="optional"/>
+  </complexType>
+
+<!-- Start X509Data -->
+
+<element name="X509Data" type="ds:X509DataType"/> 
+<complexType name="X509DataType">
+  <sequence maxOccurs="unbounded">
+    <choice>
+      <element name="X509IssuerSerial" type="ds:X509IssuerSerialType"/>
+      <element name="X509SKI" type="base64Binary"/>
+      <element name="X509SubjectName" type="string"/>
+      <element name="X509Certificate" type="base64Binary"/>
+      <element name="X509CRL" type="base64Binary"/>
+      <any namespace="##other" processContents="lax"/>
+    </choice>
+  </sequence>
+</complexType>
+
+<complexType name="X509IssuerSerialType"> 
+  <sequence> 
+    <element name="X509IssuerName" type="string"/> 
+    <element name="X509SerialNumber" type="integer"/> 
+  </sequence>
+</complexType>
+
+<!-- End X509Data -->
+
+<!-- Begin PGPData -->
+
+<element name="PGPData" type="ds:PGPDataType"/> 
+<complexType name="PGPDataType"> 
+  <choice>
+    <sequence>
+      <element name="PGPKeyID" type="base64Binary"/> 
+      <element name="PGPKeyPacket" type="base64Binary" minOccurs="0"/> 
+      <any namespace="##other" processContents="lax" minOccurs="0"
+       maxOccurs="unbounded"/>
+    </sequence>
+    <sequence>
+      <element name="PGPKeyPacket" type="base64Binary"/> 
+      <any namespace="##other" processContents="lax" minOccurs="0"
+       maxOccurs="unbounded"/>
+    </sequence>
+  </choice>
+</complexType>
+
+<!-- End PGPData -->
+
+<!-- Begin SPKIData -->
+
+<element name="SPKIData" type="ds:SPKIDataType"/> 
+<complexType name="SPKIDataType">
+  <sequence maxOccurs="unbounded">
+    <element name="SPKISexp" type="base64Binary"/>
+    <any namespace="##other" processContents="lax" minOccurs="0"/>
+  </sequence>
+</complexType> 
+
+<!-- End SPKIData -->
+
+<!-- End KeyInfo -->
+
+<!-- Start Object (Manifest, SignatureProperty) -->
+
+<element name="Object" type="ds:ObjectType"/> 
+<complexType name="ObjectType" mixed="true">
+  <sequence minOccurs="0" maxOccurs="unbounded">
+    <any namespace="##any" processContents="lax"/>
+  </sequence>
+  <attribute name="Id" type="ID" use="optional"/> 
+  <attribute name="MimeType" type="string" use="optional"/> <!-- add a grep facet -->
+  <attribute name="Encoding" type="anyURI" use="optional"/> 
+</complexType>
+
+<element name="Manifest" type="ds:ManifestType"/> 
+<complexType name="ManifestType">
+  <sequence>
+    <element ref="ds:Reference" maxOccurs="unbounded"/> 
+  </sequence>
+  <attribute name="Id" type="ID" use="optional"/> 
+</complexType>
+
+<element name="SignatureProperties" type="ds:SignaturePropertiesType"/> 
+<complexType name="SignaturePropertiesType">
+  <sequence>
+    <element ref="ds:SignatureProperty" maxOccurs="unbounded"/> 
+  </sequence>
+  <attribute name="Id" type="ID" use="optional"/> 
+</complexType>
+
+   <element name="SignatureProperty" type="ds:SignaturePropertyType"/> 
+   <complexType name="SignaturePropertyType" mixed="true">
+     <choice maxOccurs="unbounded">
+       <any namespace="##other" processContents="lax"/>
+       <!-- (1,1) elements from (1,unbounded) namespaces -->
+     </choice>
+     <attribute name="Target" type="anyURI" use="required"/> 
+     <attribute name="Id" type="ID" use="optional"/> 
+   </complexType>
+
+<!-- End Object (Manifest, SignatureProperty) -->
+
+<!-- Start Algorithm Parameters -->
+
+<simpleType name="HMACOutputLengthType">
+  <restriction base="integer"/>
+</simpleType>
+
+<!-- Start KeyValue Element-types -->
+
+<element name="DSAKeyValue" type="ds:DSAKeyValueType"/>
+<complexType name="DSAKeyValueType">
+  <sequence>
+    <sequence minOccurs="0">
+      <element name="P" type="ds:CryptoBinary"/>
+      <element name="Q" type="ds:CryptoBinary"/>
+    </sequence>
+    <element name="G" type="ds:CryptoBinary" minOccurs="0"/>
+    <element name="Y" type="ds:CryptoBinary"/>
+    <element name="J" type="ds:CryptoBinary" minOccurs="0"/>
+    <sequence minOccurs="0">
+      <element name="Seed" type="ds:CryptoBinary"/>
+      <element name="PgenCounter" type="ds:CryptoBinary"/>
+    </sequence>
+  </sequence>
+</complexType>
+
+<element name="RSAKeyValue" type="ds:RSAKeyValueType"/>
+<complexType name="RSAKeyValueType">
+  <sequence>
+    <element name="Modulus" type="ds:CryptoBinary"/> 
+    <element name="Exponent" type="ds:CryptoBinary"/> 
+  </sequence>
+</complexType> 
+
+<!-- End KeyValue Element-types -->
+
+<!-- End Signature -->
+
+</schema>

Added: cxf/trunk/services/xkms/xkms-features/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-features/pom.xml?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-features/pom.xml (added)
+++ cxf/trunk/services/xkms/xkms-features/pom.xml Sat May 18 16:04:37 2013
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2011 Talend Inc. - www.talend.com All rights reserved. 
+	This program and the accompanying materials are made available under the 
+	terms of the Apache License v2.0 which accompanies this distribution, and 
+	is available at http://www.apache.org/licenses/LICENSE-2.0 -->
+<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-features</artifactId>
+	<packaging>pom</packaging>
+	<name>Apache CXF XKMS Karaf Features</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>
+
+	<build>
+		<resources>
+			<resource>
+				<directory>${project.basedir}/src/main/resources</directory>
+				<filtering>true</filtering>
+				<includes>
+					<include>**/features.xml</include>
+					<include>**/*.cfg</include>
+					<include>**/*.properties</include>
+				</includes>
+			</resource>
+		</resources>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-resources-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>filter</id>
+						<phase>generate-resources</phase>
+						<goals>
+							<goal>resources</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>build-helper-maven-plugin</artifactId>
+				<executions>
+					<execution>
+						<id>attach-artifacts</id>
+						<phase>package</phase>
+						<goals>
+							<goal>attach-artifact</goal>
+						</goals>
+						<configuration>
+							<artifacts>
+								<artifact>
+									<file>target/classes/features.xml</file>
+									<type>xml</type>
+								</artifact>
+								<artifact>
+									<file>target/classes/org.apache.cxf.xkms.cfg</file>
+									<classifier>org.apache.cxf.xkms</classifier>
+									<type>cfg</type>
+								</artifact>
+							</artifacts>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+
+</project>

Added: cxf/trunk/services/xkms/xkms-features/src/main/resources/features.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-features/src/main/resources/features.xml?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-features/src/main/resources/features.xml (added)
+++ cxf/trunk/services/xkms/xkms-features/src/main/resources/features.xml Sat May 18 16:04:37 2013
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  #%L
+  Talend ESB Runtime :: Example Basic Features
+  %%
+  Copyright (C) 2011 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%
+  -->
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">
+
+	<feature name="cxf-xkms-client" version="${project.version}">
+		<feature>cxf</feature>
+		<feature>spring-dm</feature>
+		<bundle>mvn:${project.groupId}/cxf-services-xkms-common/${project.version}</bundle>
+		<bundle>mvn:${project.groupId}/cxf-services-xkms-client/${project.version}</bundle>
+	</feature>
+
+	<feature name="cxf-xkms-service" version="${project.version}">
+		<feature>cxf</feature>
+		<feature>spring-dm</feature>
+		<bundle>mvn:${project.groupId}/cxf-services-xkms-common/${project.version}</bundle>
+		<bundle>mvn:${project.groupId}/cxf-services-xkms-service/${project.version}</bundle>
+		<bundle>mvn:${project.groupId}/cxf-services-xkms-x509-handlers/${project.version}</bundle>
+		<bundle>mvn:${project.groupId}/cxf-services-xkms-osgi/${project.version}</bundle>
+		<configfile finalname="/etc/org.apache.cxf.xkms.cfg">
+			mvn:${project.groupId}/cxf-services-xkms-features/${project.version}/cfg/org.apache.cxf.xkms
+		</configfile>
+	</feature>
+
+</features>

Added: cxf/trunk/services/xkms/xkms-features/src/main/resources/org.apache.cxf.xkms.cfg
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-features/src/main/resources/org.apache.cxf.xkms.cfg?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-features/src/main/resources/org.apache.cxf.xkms.cfg (added)
+++ cxf/trunk/services/xkms/xkms-features/src/main/resources/org.apache.cxf.xkms.cfg Sat May 18 16:04:37 2013
@@ -0,0 +1,30 @@
+#################################################################################
+#
+#    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.
+#
+################################################################################
+
+# XKMS configuration properties
+
+# 1. Filesystem backend
+#xkms.backend.file.storageDir=data/xkms/keys
+
+# 2. LDAP backend
+xkms.backend.ldap.url=ldap://localhost:2389
+xkms.backend.ldap.user=cn=Directory Manager
+xkms.backend.ldap.pwd=test
+xkms.backend.ldap.retry=2
+xkms.backend.ldap.rootDN=dc=example,dc=com
\ No newline at end of file

Added: cxf/trunk/services/xkms/xkms-itests/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-itests/pom.xml?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-itests/pom.xml (added)
+++ cxf/trunk/services/xkms/xkms-itests/pom.xml Sat May 18 16:04:37 2013
@@ -0,0 +1,197 @@
+<?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-itests</artifactId>
+	<name>Apache CXF XKMS Integration Tests</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>
+	
+	<properties>
+		<exam.version>2.6.0</exam.version>
+	</properties>
+
+	<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.services.xkms</groupId>
+            <artifactId>cxf-services-xkms-x509-handlers</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf.services.xkms</groupId>
+            <artifactId>cxf-services-xkms-service</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf.services.xkms</groupId>
+            <artifactId>cxf-services-xkms-ldap-persistence</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf.services.xkms</groupId>
+            <artifactId>cxf-services-xkms-file-persistence</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.karaf</groupId>
+            <artifactId>apache-karaf</artifactId>
+            <version>2.2.9</version>
+            <scope>test</scope>
+            <type>tar.gz</type>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.karaf</groupId>
+                    <artifactId>org.apache.karaf.client</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.karaf.tooling.exam</groupId>
+            <artifactId>org.apache.karaf.tooling.exam.container</artifactId>
+            <version>2.3.0</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit4</artifactId>
+            <version>${exam.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-inject</artifactId>
+            <version>${exam.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-link-mvn</artifactId>
+            <version>${exam.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ops4j.pax.url</groupId>
+            <artifactId>pax-url-aether</artifactId>
+            <version>1.5.0</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.framework</artifactId>
+            <version>3.2.2</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.ops4j.pax.swissbox</groupId>
+            <artifactId>pax-swissbox-tinybundles</artifactId>
+            <version>1.3.1</version>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>1.6.1</version>
+        </dependency>
+        
+        <dependency>
+        	<groupId>org.apache.cxf.services.xkms</groupId>
+        	<artifactId>cxf-services-xkms-features</artifactId>
+        	<version>${project.version}</version>
+        	<type>xml</type>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.ops4j.pax.exam</groupId>
+                <artifactId>maven-paxexam-plugin</artifactId>
+                <version>1.2.4</version>
+                <executions>
+                    <execution>
+                        <id>generate-config</id>
+                        <goals>
+                            <goal>generate-config</goal>
+                            <goal>generate-depends-file</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <options>
+                        <platform>equinox</platform>
+                        <profiles>log</profiles>
+                    </options>
+                </configuration>
+            </plugin>
+        </plugins>
+        <pluginManagement>
+        	<plugins>
+        		<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+        		<plugin>
+        			<groupId>org.eclipse.m2e</groupId>
+        			<artifactId>lifecycle-mapping</artifactId>
+        			<version>1.0.0</version>
+        			<configuration>
+        				<lifecycleMappingMetadata>
+        					<pluginExecutions>
+        						<pluginExecution>
+        							<pluginExecutionFilter>
+        								<groupId>
+        									org.ops4j.pax.exam
+        								</groupId>
+        								<artifactId>
+        									maven-paxexam-plugin
+        								</artifactId>
+        								<versionRange>
+        									[1.2.4,)
+        								</versionRange>
+        								<goals>
+        									<goal>
+        										generate-depends-file
+        									</goal>
+        									<goal>generate-config</goal>
+        								</goals>
+        							</pluginExecutionFilter>
+        							<action>
+        								<ignore></ignore>
+        							</action>
+        						</pluginExecution>
+        					</pluginExecutions>
+        				</lifecycleMappingMetadata>
+        			</configuration>
+        		</plugin>
+        	</plugins>
+        </pluginManagement>
+    </build>
+</project>

Added: cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/XkmsServiceTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/XkmsServiceTest.java?rev=1484133&view=auto
==============================================================================
--- cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/XkmsServiceTest.java (added)
+++ cxf/trunk/services/xkms/xkms-itests/src/test/java/org/apache/cxf/xkms/itests/XkmsServiceTest.java Sat May 18 16:04:37 2013
@@ -0,0 +1,127 @@
+/**
+ * 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.itests;
+
+import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.editConfigurationFilePut;
+import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.karafDistributionConfiguration;
+import static org.apache.karaf.tooling.exam.options.KarafDistributionOption.logLevel;
+import static org.ops4j.pax.exam.CoreOptions.maven;
+import static org.ops4j.pax.exam.CoreOptions.scanFeatures;
+
+import java.io.File;
+import java.net.URISyntaxException;
+import java.util.UUID;
+
+import javax.inject.Inject;
+
+import junit.framework.Assert;
+
+import org.apache.cxf.xkms.model.xkms.PrototypeKeyBindingType;
+import org.apache.cxf.xkms.model.xkms.RegisterRequestType;
+import org.apache.cxf.xkms.model.xkms.RegisterResultType;
+import org.apache.cxf.xkms.model.xkms.ResultMajorEnum;
+import org.apache.cxf.xkms.model.xkms.ResultMinorEnum;
+import org.apache.cxf.xkms.model.xmldsig.KeyInfoType;
+import org.apache.karaf.tooling.exam.options.LogLevelOption;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.CoreOptions;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.Configuration;
+import org.ops4j.pax.exam.junit.ExamReactorStrategy;
+import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.ops4j.pax.exam.options.MavenArtifactUrlReference;
+import org.ops4j.pax.exam.options.MavenUrlReference;
+import org.ops4j.pax.exam.spi.reactors.EagerSingleStagedReactorFactory;
+import org.osgi.framework.BundleContext;
+import org.w3._2002._03.xkms_wsdl.XKMSPortType;
+
+@RunWith(JUnit4TestRunner.class)
+@ExamReactorStrategy(EagerSingleStagedReactorFactory.class)
+public class XkmsServiceTest {
+    private static final String HTTP_PORT = "9191";
+
+    private static final String XKMS_ENDPOINT = "http://localhost:" + HTTP_PORT + "/cxf/XKMS";
+
+    @Inject
+    BundleContext bundleContext;
+
+    @Inject
+    XKMSPortType xkmsService;
+
+    @Configuration
+    public Option[] config() {
+        MavenArtifactUrlReference karafUrl = maven()
+                .groupId("org.apache.karaf").artifactId("apache-karaf")
+                .version("2.3.0").type("tar.gz");
+        MavenUrlReference cxfFeatures = maven().groupId("org.apache.cxf.karaf")
+                .artifactId("apache-cxf").type("xml").classifier("features")
+                .version("2.7.0");
+        MavenUrlReference xkmsFeatures = maven()
+                .groupId("org.apache.cxf.services.xkms")
+                .artifactId("cxf-services-xkms-features").type("xml")
+                .version("2.7.1-SNAPSHOT");
+
+        return new Option[] {
+                karafDistributionConfiguration().frameworkUrl(karafUrl)
+                        .karafVersion("2.3.0").name("Apache Karaf")
+                        .unpackDirectory(new File("target/exam")),
+                logLevel(LogLevelOption.LogLevel.INFO),
+                CoreOptions.
+                scanFeatures(cxfFeatures, "cxf"),
+                scanFeatures(xkmsFeatures, "cxf-xkms-service", "cxf-xkms-client").start(),
+                editConfigurationFilePut("etc/org.ops4j.pax.web.cfg",
+                        "org.osgi.service.http.port", HTTP_PORT),
+                editConfigurationFilePut("etc/org.apache.cxf.xkms.client.cfg",
+                        "xkms.endpoint", XKMS_ENDPOINT),
+                        
+                editConfigurationFilePut("etc/org.apache.cxf.xkms.cfg",
+                                "xkms.filepersistence.storageDir", "data/xkms/keys"),
+
+                        
+        // vmOption(
+        // "-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005" )
+        };
+    }
+
+    @Test
+    public void testEmptyRegister() throws URISyntaxException, Exception {
+        RegisterRequestType request = new RegisterRequestType();
+        request.setId(UUID.randomUUID().toString());
+        RegisterResultType result = xkmsService.register(request);
+        Assert.assertEquals(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER.value(), result.getResultMajor());
+        Assert.assertEquals(ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE.value(), result.getResultMinor());
+    }
+    
+    @Test
+    public void testRegisterWithoutKey() throws URISyntaxException, Exception {
+        RegisterRequestType request = new RegisterRequestType();
+        PrototypeKeyBindingType binding = new PrototypeKeyBindingType();
+        KeyInfoType keyInfo = new KeyInfoType();
+        binding.setKeyInfo(keyInfo);
+        request.setPrototypeKeyBinding(binding );
+        request.setId(UUID.randomUUID().toString());
+        RegisterResultType result = xkmsService.register(request);
+        Assert.assertEquals(ResultMajorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_SENDER.value(), result.getResultMajor());
+        Assert.assertEquals(ResultMinorEnum.HTTP_WWW_W_3_ORG_2002_03_XKMS_FAILURE.value(), result.getResultMinor());
+    }
+
+
+}



Mime
View raw message