Adding changes of asok

Merge branch 'asokaravinda-master'
revert-dabc3590
Geeth Munasinghe 10 years ago
commit 118ee37998

@ -1,75 +0,0 @@
<!--
~ Copyright 2005-2007 WSO2, Inc. (http://wso2.com)
~
~ 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.
-->
<project default="build-all">
<property name="wso2appserver.home" value="../../../"/>
<property name="repo.location" value="${wso2appserver.home}/repository/deployment/server"/>
<property name="warName" value="jaxrs_basic.war"/>
<property name="build.dir" value="build"/>
<property name="classes" value="${build.dir}/classes"/>
<property name="lib" value="${build.dir}/lib"/>
<property name="webapps" value="${build.dir}/webapps"/>
<property name="src" value="."/>
<path id="compile.classpath">
<fileset dir="${lib}">
<include name="*.jar"/>
</fileset>
</path>
<target name="init" depends="clean">
<mkdir dir="${build.dir}"/>
<mkdir dir="${classes}"/>
<mkdir dir="${webapps}"/>
<mkdir dir="${lib}"/>
<copy toDir="${lib}">
<fileset dir="${wso2appserver.home}/repository/components/plugins/">
<include name="commons-httpclient_3.1.0.wso2v2.jar"/>
<include name="commons-codec_1.4.0.wso2v1.jar"/>
</fileset>
<fileset dir="${wso2appserver.home}/lib/runtimes/cxf/">
<include name="*.jar"/>
</fileset>
</copy>
</target>
<target name="compile" depends="init" >
<javac destdir="${classes}" debug="true" srcdir="src">
<classpath refid="compile.classpath"/>
</javac>
</target>
<target name="war" depends="compile">
<echo message="Creating webapp ${warName}."/>
<copy file="src/main/java/demo/jaxrs/client/add_customer.xml" todir="${classes}/demo/jaxrs/client"/>
<copy file="src/main/java/demo/jaxrs/client/update_customer.xml" todir="${classes}/demo/jaxrs/client"/>
<war destfile="${webapps}/${warName}" webxml="./src/main/webapp/WEB-INF/web.xml">
<classes dir="${classes}"/>
<fileset dir="src/main/webapp/"/>
</war>
</target>
<target name="build-all" depends ="war">
<echo message="Copying the created war file in to the deployment directory"/>
<copy file="${webapps}/${warName}" todir="${repo.location}/webapps"/>
</target>
<target name="clean">
<delete dir="${build.dir}" />
</target>
</project>

@ -1,17 +1,19 @@
<!--
~ Copyright 2011-2012 WSO2, Inc. (http://wso2.com)
~ Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ WSO2 Inc. 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.
~ 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"
@ -127,23 +129,11 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.4</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon</groupId>
<artifactId>org.wso2.carbon.utils</artifactId>
@ -165,9 +155,9 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<groupId>org.apache.wss4j</groupId>
<artifactId>wss4j-ws-security-common</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
@ -179,10 +169,24 @@
<artifactId>bcprov-jdk15on</artifactId>
<version>1.49</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.21</version>
</dependency>
<dependency>
<groupId>com.madgag.spongycastle</groupId>
<artifactId>pkix</artifactId>
<version>1.51.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-security</artifactId>
<version>2.6.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-jaxrs</artifactId>
</dependency>
</dependencies>
<properties>
<cxf.version>2.6.1</cxf.version>
<junit.version>4.8.2</junit.version>
</properties>
</project>

@ -1,81 +0,0 @@
@echo off
REM ---------------------------------------------------------------------------
REM Copyright 2005,2006 WSO2, Inc. http://www.wso2.org
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
REM You may obtain a copy of the License at
REM
REM http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
REM See the License for the specific language governing permissions and
REM limitations under the License.
rem ---------------------------------------------------------------------------
rem Client script for the Jaxws-Jaxrs/jaxrs_basic Sample
rem
rem Environment Variable Prequisites
rem
rem WSO2AppServer_HOME Must point at your WSO2 AppServer directory
rem
rem JAVA_HOME Must point at your Java Development Kit installation.
rem
rem JAVA_OPTS (Optional) Java runtime options
rem ---------------------------------------------------------------------------
set CURRENT_DIR=%cd%
rem Make sure prerequisite environment variables are set
if not "%JAVA_HOME%" == "" goto gotJavaHome
echo The JAVA_HOME environment variable is not defined
echo This environment variable is needed to run this program
goto end
:gotJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
goto okJavaHome
:noJavaHome
echo The JAVA_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
echo NB: JAVA_HOME should point to a JDK/JRE
goto end
:okJavaHome
rem check the WSO2AppServer_HOME environment variable
if not "%WSO2AppServer_HOME%" == "" goto gotHome
set WSO2AppServer_HOME=%CURRENT_DIR%
if exist "%WSO2AppServer_HOME\bin\version.txt" goto okHome
rem guess the home. Jump two directories up to check if that is the home
cd ..\..\..
set WSO2AppServer_HOME=%cd%
cd %CURRENT_DIR%
:gotHome
if exist "%WSO2AppServer_HOME%\bin\version.txt" goto okHome
set WSO2AppServer_HOME=%~dp0..\..
if exist "%WSO2AppServer_HOME%\bin\version.txt" goto okHome
echo The WSO2AppServer_HOME environment variable is not defined correctly
echo This environment variable is needed to run this program
goto end
:okHome
rem set the classes
setlocal EnableDelayedExpansion
rem loop through the libs and add them to the class path
cd %WSO2AppServer_HOME%\samples\Jaxws-Jaxrs\jaxrs_basic
set CLIENT_CLASSPATH=.\conf;.\build\classes
FOR %%C in (.\build\lib\*.jar) DO set CLIENT_CLASSPATH=!CLIENT_CLASSPATH!;.\build\lib\%%~nC%%~xC
rem ----- Execute The Requested Command ---------------------------------------
echo Using WSO2AppServer_HOME: %WSO2AppServer_HOME%
echo Using JAVA_HOME: %JAVA_HOME%
set _RUNJAVA="%JAVA_HOME%\bin\java"
%_RUNJAVA% %JAVA_OPTS% -Dwso2appserver.home="%WSO2AppServer_HOME%" -cp "%CLIENT_CLASSPATH%" -Djava.endorsed.dirs="%WSO2AppServer_HOME%\lib\endorsed";"%JAVA_HOME%\jre\lib\endorsed";"%JAVA_HOME%\lib\endorsed" demo.jaxrs.client.Client http://localhost:9763/jaxrs_basic/services/customers/customerservice %*
cd %CURRENT_DIR%
endlocal
:end

@ -1,90 +0,0 @@
#!/bin/sh
# -----------------------------------------------------------------------------
#
# Environment Variable Prequisites
#
# CARBON_HOME Home of WSO2 AppServer installation. If not set I will try
# to figure it out.
#
# JAVA_HOME Must point at your Java Development Kit installation.
#
# NOTE: Borrowed generously from Apache Tomcat startup scripts.
# if JAVA_HOME is not set we're not happy
if [ -z "$JAVA_HOME" ]; then
echo "You must set the JAVA_HOME variable before running WSO2 AppServer."
exit 1
fi
# OS specific support. $var _must_ be set to either true or false.
cygwin=false
os400=false
case "`uname`" in
CYGWIN*) cygwin=true;;
OS400*) os400=true;;
esac
# resolve links - $0 may be a softlink
PRG="$0"
while [ -h "$PRG" ]; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '.*/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`/"$link"
fi
done
# Get standard environment variables
PRGDIR=`dirname "$PRG"`
# Only set WSO2AppServer_HOME if not already set
[ -z "$CARBON_HOME" ] && CARBON_HOME=`cd "$PRGDIR/../../.." ; pwd`
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$CARBON_HOME" ] && WSO2AppServer_HOME=`cygpath --unix "$CARBON_HOME"`
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi
# For OS400
if $os400; then
# Set job priority to standard for interactive (interactive - 6) by using
# the interactive priority - 6, the helper threads that respond to requests
# will be running at the same priority as interactive jobs.
COMMAND='chgjob job('$JOBNAME') runpty(6)'
system $COMMAND
# Enable multi threading
QIBM_MULTI_THREADED=Y
export QIBM_MULTI_THREADED
fi
# update classpath
CLIENT_CLASSPATH=""
for f in "$CARBON_HOME"/samples/Jaxws-Jaxrs/jaxrs_basic/build/lib/*.jar
do
CLIENT_CLASSPATH=$CLIENT_CLASSPATH:$f
done
CLIENT_CLASSPATH=$CLIENT_CLASSPATH:$CLASSPATH
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
CARBON_HOME=`cygpath --absolute --windows "$CARBON_HOME"`
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
fi
echo Using CARBON_HOME: $CARBON_HOME
echo Using JAVA_HOME : $JAVA_HOME
CLIENT_CLASSPATH="$CARBON_HOME/samples/Jaxws-Jaxrs/jaxrs_basic/build/classes":$CLIENT_CLASSPATH
$JAVA_HOME/bin/java -Dwso2appserver.home="$CARBON_HOME" -classpath "$CLIENT_CLASSPATH" \
-Djava.endorsed.dirs="$CARBON_HOME/lib/endorsed":"$JAVA_HOME/jre/lib/endorsed":"$JAVA_HOME/lib/endorsed" \
demo.jaxrs.client.Client http://localhost:9763/jaxrs_basic/services/customers/customerservice$*

@ -1,47 +0,0 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import java.io.InputStream;
@Path("/EnrollmentServer")
public interface DiscoveryService {
@Path("/Discovery.svc")
@POST
@Consumes({ "application/soap+xml;charset=utf-8", "application/xml" })
@Produces("application/soap+xml;charset=utf-8")
Response getDiscoveryResponse(
InputStream discoveryRequest);
@Path("/Discovery.svc")
@GET
@Consumes("text/html")
@Produces("text/html")
Response getDiscoveryOKRequest();
@Path("/Discovery.svc")
@GET
@Consumes({ "application/soap+xml;charset=utf-8", "application/xml" })
@Produces("text/html")
Response getDiscoveryOKRequestWithBody(InputStream discoveryRequest);
}

@ -0,0 +1,52 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.DiscoveryService;
import cdm.api.windows.DiscoveryService.beans.in.DiscoveryRequest;
import cdm.api.windows.DiscoveryService.beans.out.Message;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.ws.rs.*;
import javax.ws.rs.core.Response;
import javax.xml.ws.BindingType;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
import javax.xml.ws.soap.SOAPBinding;
@WebService(targetNamespace = "http://schemas.microsoft.com/windows/management/2012/01/enrollment", name = "IDiscoveryService")
@BindingType(value = SOAPBinding.SOAP12HTTP_BINDING)
public interface DiscoveryServiceGet {
@POST
@WebMethod(operationName = "Discover")
@RequestWrapper(targetNamespace = "http://schemas.microsoft.com/windows/management/2012/01/enrollment")
@ResponseWrapper(targetNamespace = "http://schemas.microsoft.com/windows/management/2012/01/enrollment")
@WebResult(name = "DiscoverResult") Message Discover(
@WebParam(name = "request")
DiscoveryRequest request);
@GET
@WebMethod
@WebResult() Response DiscoverGet();
}

@ -0,0 +1,61 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.DiscoveryService.beans.in;
import javax.xml.bind.annotation.*;
import java.io.Serializable;
@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class DiscoveryRequest implements Serializable {
@XmlElement(name = "EmailAddress")
private String emailId;
@XmlElement(name = "RequestVersion")
private String version;
@XmlElement(name = "DeviceType")
private String deviceType;
public String getEmailId() {
return emailId;
}
public String getVersion() {
return version;
}
public void setEmailId(String emailId) {
this.emailId = emailId;
}
public void setVersion(String version) {
this.version = version;
}
public String getDeviceType() {
return deviceType;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
}

@ -0,0 +1,24 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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.
*/
@javax.xml.bind.annotation.XmlSchema(namespace = "http://schemas.microsoft.com/windows/pki/2009/01/enrollment", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package cdm.api.windows.DiscoveryService.beans.in;

@ -0,0 +1,58 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.DiscoveryService.beans.out;
import javax.xml.bind.annotation.*;
import java.io.Serializable;
@XmlRootElement
public class Message implements Serializable {
private String authPolicy;
private String enrollmentPolicyServiceUrl;
private String enrollmentServiceUrl;
@XmlElement(name = "AuthPolicy", namespace = "http://schemas.microsoft.com/windows/management/2012/01/enrollment")
public String getAuthPolicy() {
return authPolicy;
}
@XmlElement(name = "EnrollmentPolicyServiceUrl", namespace = "http://schemas.microsoft.com/windows/management/2012/01/enrollment")
public String getEnrollmentPolicyServiceUrl() {
return enrollmentPolicyServiceUrl;
}
@XmlElement(name = "EnrollmentServiceUrl", namespace = "http://schemas.microsoft.com/windows/management/2012/01/enrollment")
public String getEnrollmentServiceUrl() {
return enrollmentServiceUrl;
}
public void setAuthPolicy(String authPolicy) {
this.authPolicy = authPolicy;
}
public void setEnrollmentPolicyServiceUrl(String enrollmentPolicyServiceUrl) {
this.enrollmentPolicyServiceUrl = enrollmentPolicyServiceUrl;
}
public void setEnrollmentServiceUrl(String enrollmentServiceUrl) {
this.enrollmentServiceUrl = enrollmentServiceUrl;
}
}

@ -0,0 +1,64 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.DiscoveryService.impl;
import cdm.api.windows.DiscoveryService.beans.in.DiscoveryRequest;
import cdm.api.windows.DiscoveryService.DiscoveryServiceGet;
import cdm.api.windows.DiscoveryService.beans.out.Message;
import org.apache.log4j.Logger;
import javax.jws.WebService;
import javax.ws.rs.core.Response;
import javax.xml.ws.BindingType;
import javax.xml.ws.soap.Addressing;
import javax.xml.ws.soap.SOAPBinding;
@WebService(endpointInterface = "cdm.api.windows.DiscoveryService.DiscoveryServiceGet", targetNamespace = "http://schemas.microsoft.com/windows/management/2012/01/enrollment")
@Addressing(enabled = true, required = true)
@BindingType(value = SOAPBinding.SOAP12HTTP_BINDING)
public class DiscoveryServiceGetImpl implements DiscoveryServiceGet {
private Logger LOGGER = Logger.getLogger(DiscoveryServiceGetImpl.class);
@Override
public Message Discover(DiscoveryRequest disRequest) {
System.out.println("CHECK_SECOND_POST");
Message message = new Message();
message.setAuthPolicy("OnPremise");
message.setEnrollmentPolicyServiceUrl(
"https://EnterpriseEnrollment.wso2.com/ENROLLMENTSERVER/PolicyEnrollmentWebservice.svc");
message.setEnrollmentServiceUrl(
"https://EnterpriseEnrollment.wso2.com/ENROLLMENTSERVER/DeviceEnrollmentWebservice.svc");
LOGGER.info("Received Discovery Service Request");
return message;
}
@Override
public Response DiscoverGet() {
System.out.println("CHECK_FIRST_GET");
return Response.ok().build();
}
}

@ -1,43 +0,0 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows;
import javax.swing.text.Document;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Response;
@Path("/ENROLLMENTSERVER")
public interface EnrolmentService {
@Path("/PolicyEnrollmentWebservice.svc")
@POST
@Consumes("application/soap+xml;charset=utf-8")
@Produces("application/soap+xml;charset=utf-8")
Response getPolicies(Document request);
@Path("/DeviceEnrollmentWebservice.svc")
@POST
@Consumes("application/soap+xml;charset=utf-8")
@Produces("application/soap+xml;charset=utf-8")
Response enrollUser(Document request);
}

@ -1,72 +0,0 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.impl;
import cdm.api.windows.DiscoveryService;
import javax.ws.rs.core.Response;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import org.apache.log4j.Logger;
public class DiscoveryServiceImpl implements DiscoveryService {
private Logger LOGGER = Logger.getLogger(DiscoveryServiceImpl.class);
public Response getDiscoveryResponse(InputStream discoveryRequest) {
LOGGER.info("Received Discovery Service POST Request [{}]");
String response = null;
File file = null;
FileInputStream fis = null;
byte[] data = null;
try {
file = new File("./conf/discover-service.xml");
fis = new FileInputStream(file);
data = new byte[(int) file.length()];
fis.read(data);
fis.close();
response = new String(data, "UTF-8");
} catch (IOException e) {
LOGGER.error("An Unexpected Error has occurred while processing the request ", e);
}
LOGGER.info("Sending Discovery Response");
return Response.ok().entity(response).build();
}
public Response getDiscoveryOKRequest() {
LOGGER.info("Received a GET Request without body");
return Response.ok().build();
}
public Response getDiscoveryOKRequestWithBody(InputStream discoveryRequest) {
LOGGER.info("Received a GET Request with body [{}]");
return Response.ok().build();
}
}

@ -1,305 +0,0 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.impl;
import cdm.api.windows.EnrolmentService;
import org.apache.log4j.Logger;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.bouncycastle.pkcs.PKCS10CertificationRequest;
import org.bouncycastle.pkcs.jcajce.JcaPKCS10CertificationRequest;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
import javax.swing.text.Document;
import javax.ws.rs.core.Response;
import javax.xml.namespace.NamespaceContext;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathFactory;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.StringWriter;
import java.security.KeyFactory;
import java.security.PrivateKey;
import java.security.Security;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.security.spec.PKCS8EncodedKeySpec;
import java.util.Iterator;
import cdm.api.windows.util.CertificateSigningService;
public class EnrolmentServiceImpl implements EnrolmentService {
private Logger LOGGER = Logger.getLogger(EnrolmentServiceImpl.class);
static {
Security.addProvider(new BouncyCastleProvider());
}
private String enrollmentResponseFile;
private String wapProvisioningXmlFile;
private String privatePemKeyFilePath;
private String caCertificateFilePath;
PrivateKey privateKey;
X509Certificate rooCACertificate;
public void init() {
try {
FileInputStream in = new FileInputStream(privatePemKeyFilePath);
byte[] keyBytes = new byte[in.available()];
in.read(keyBytes);
in.close();
String key = new String(keyBytes, "UTF-8");
key = key.replaceAll(
"(-+BEGIN RSA PRIVATE KEY-+\\r?\\n|-+END RSA PRIVATE KEY-+\\r?\\n?)", "");
// don't use this for real projects!
BASE64Decoder decoder = new BASE64Decoder();
keyBytes = decoder.decodeBuffer(key);
// generate private key
PKCS8EncodedKeySpec spec = new PKCS8EncodedKeySpec(keyBytes);
KeyFactory keyFactory = KeyFactory.getInstance("RSA");
privateKey = keyFactory.generatePrivate(spec);
LOGGER.info("Private Key Algorithm : " + privateKey.getAlgorithm());
} catch (Exception e) {
LOGGER.error("An unexpected Error has occurred while reading CA Private Key, ", e);
}
try {
FileInputStream fr = new FileInputStream(caCertificateFilePath);
CertificateFactory cf = CertificateFactory.getInstance("X509");
rooCACertificate = (X509Certificate) cf.generateCertificate(fr);
rooCACertificate.verify(rooCACertificate.getPublicKey());
LOGGER.info("CA Certificate Expiration Date : " + rooCACertificate.getNotAfter());
} catch (Exception e) {
LOGGER.error("An unexpected Error has occurred while reading CA Root Certificate, ", e);
}
/*try {
KeyPairGenerator gen = KeyPairGenerator.getInstance("RSA");
gen.initialize(2048);
key = gen.generateKeyPair();
PrivateKey privateKey = key.getPrivate();
PublicKey publicKey = key.getPublic();
*//**
* Following details need to be provided
*
* Serial number
* Signature algorithm
* Issuer Name.
* Subject Name -- or a Subject Alternative Name (SAN).
* Date range (not before, not after).
* Subject Public Key.
*//*
X509V3CertificateGenerator v3CertGen = new X509V3CertificateGenerator();
v3CertGen.setSerialNumber(BigInteger.valueOf(new SecureRandom().nextInt(Integer.MAX_VALUE)));
v3CertGen.setIssuerDN(new X509Principal("CN=wso2.com"));
//v3CertGen.setIssuerDN(new X509Principal("CN=wso2.com, OU=Mobile, O=wso2 L=Colombo, C=LK"));
v3CertGen.setNotBefore(new Date(System.currentTimeMillis() - 1000L * 60 * 60 * 24 * 30));
v3CertGen.setNotAfter(new Date(System.currentTimeMillis() + (1000L * 60 * 60 * 24 * 365*10)));
v3CertGen.setSubjectDN(new X509Principal("CN=wso2.com"));
v3CertGen.setPublicKey(publicKey);
v3CertGen.setSignatureAlgorithm("SHA1withRSA");
rooCACertificate = v3CertGen.generateX509Certificate(privateKey);
} catch (Exception e) {
e.printStackTrace();
}*/
}
public Response getPolicies(Document request) {
LOGGER.info("Received Get Policies Request");
String response = null;
File file = null;
FileInputStream fis = null;
byte[] data = null;
try {
file = new File("./conf/policy-service.xml");
fis = new FileInputStream(file);
data = new byte[(int) file.length()];
fis.read(data);
fis.close();
response = new String(data, "UTF-8");
} catch (IOException e) {
LOGGER.error("An Unexpected Error has occurred while processing the request ", e);
}
LOGGER.info("Sending Get Policy Response");
return Response.ok().entity(response).build();
}
public Response enrollUser(Document request) {
LOGGER.info("Received User Enrollment Request");
XPath xPath = XPathFactory.newInstance().newXPath();
xPath.setNamespaceContext(new MyNamespaceContext());
String response = null;
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
try {
NodeList nl = (NodeList) xPath.evaluate(
"/s:Envelope/s:Body/wst:RequestSecurityToken/wsse:BinarySecurityToken", request,
XPathConstants.NODESET);
Node node = nl.item(0);
String certificateDataString = node.getTextContent();
byte[] derByteArray =
javax.xml.bind.DatatypeConverter.parseBase64Binary(certificateDataString);
PKCS10CertificationRequest certificationRequest =
new PKCS10CertificationRequest(derByteArray);
JcaPKCS10CertificationRequest csrReq =
new JcaPKCS10CertificationRequest(certificationRequest);
LOGGER.info("Public Key of CSR : " + csrReq.getPublicKey());
X509Certificate signedCert =
CertificateSigningService.signCSR(csrReq, privateKey, rooCACertificate);
LOGGER.info("Verifying Signed Certificate with CSR's public key : " +
signedCert.getPublicKey());
BASE64Encoder base64Encoder = new BASE64Encoder();
String rootCertEncodedString = base64Encoder.encode(rooCACertificate.getEncoded());
String signedCertEncoded = base64Encoder.encode(signedCert.getEncoded());
DocumentBuilder builder = domFactory.newDocumentBuilder();
org.w3c.dom.Document dDoc = builder.parse(wapProvisioningXmlFile);
NodeList wapParm = dDoc.getElementsByTagName("parm");
NamedNodeMap rootCertAttributes = wapParm.item(0).getAttributes();
Node b64Encoded = rootCertAttributes.getNamedItem("value");
b64Encoded.setTextContent(rootCertEncodedString);
NamedNodeMap clientCertAttributes = wapParm.item(1).getAttributes();
Node b64CliendEncoded = clientCertAttributes.getNamedItem("value");
b64CliendEncoded.setTextContent(signedCertEncoded);
String wapProvisioning = convertDocumentToString(dDoc);
String encodedWap = base64Encoder.encode(wapProvisioning.getBytes());
org.w3c.dom.Document responseXml = builder.parse(enrollmentResponseFile);
NodeList token = responseXml.getElementsByTagName("BinarySecurityToken");
Node firstToken = token.item(0);
firstToken.setTextContent(encodedWap);
response = convertDocumentToString(responseXml);
} catch (Exception e) {
LOGGER.error("An Unexpected Error has occurred while processing the request ", e);
}
LOGGER.info("Sending User Enrollment Response");
return Response.ok().entity(response).build();
}
private String convertDocumentToString(org.w3c.dom.Document document) throws Exception {
DOMSource domSource = new DOMSource(document);
StringWriter writer = new StringWriter();
StreamResult result = new StreamResult(writer);
TransformerFactory tf = TransformerFactory.newInstance();
Transformer transformer = tf.newTransformer();
transformer.transform(domSource, result);
String wapProvisioning = writer.toString();
return wapProvisioning;
}
public void setEnrollmentResponseFile(String enrollmentResponseFile) {
this.enrollmentResponseFile = enrollmentResponseFile;
}
public void setWapProvisioningXmlFile(String wapProvisioningXmlFile) {
this.wapProvisioningXmlFile = wapProvisioningXmlFile;
}
public void setPrivatePemKeyFilePath(String privatePemKeyFilePath) {
this.privatePemKeyFilePath = privatePemKeyFilePath;
}
public void setCaCertificateFilePath(String caCertificateFilePath) {
this.caCertificateFilePath = caCertificateFilePath;
}
public void setPrivateKey(PrivateKey privateKey) {
this.privateKey = privateKey;
}
public void setRooCACertificate(X509Certificate rooCACertificate) {
this.rooCACertificate = rooCACertificate;
}
private static class MyNamespaceContext implements NamespaceContext {
public String getNamespaceURI(String prefix) {
if ("s".equals(prefix)) {
return "http://www.w3.org/2003/05/soap-envelope";
} else if ("wst".equals(prefix)) {
return "http://docs.oasis-open.org/ws-sx/ws-trust/200512";
} else if ("wsse".equals(prefix)) {
return "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
}
return null;
}
public String getPrefix(String namespaceURI) {
return null;
}
public Iterator getPrefixes(String namespaceURI) {
return null;
}
}
}

@ -1,92 +0,0 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.util;
import org.apache.log4j.Logger;
import org.bouncycastle.asn1.x500.X500Name;
import org.bouncycastle.cert.X509v3CertificateBuilder;
import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter;
import org.bouncycastle.cert.jcajce.JcaX509ExtensionUtils;
import org.bouncycastle.cert.jcajce.JcaX509v3CertificateBuilder;
import org.bouncycastle.operator.ContentSigner;
import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder;
import org.bouncycastle.pkcs.jcajce.JcaPKCS10CertificationRequest;
import java.math.BigInteger;
import java.security.PrivateKey;
import java.security.SecureRandom;
import java.security.cert.X509Certificate;
import java.util.Date;
public class CertificateSigningService {
private static Logger LOGGER = Logger.getLogger(CertificateSigningService.class);
public static X509Certificate signCSR(JcaPKCS10CertificationRequest jcaRequest,
PrivateKey privateKey, X509Certificate caCert)
throws Exception {
try {
X509v3CertificateBuilder certificateBuilder = new JcaX509v3CertificateBuilder(caCert,
BigInteger
.valueOf(
new SecureRandom()
.nextInt(
Integer.MAX_VALUE)),
new Date(
System.currentTimeMillis() -
1000L *
60 *
60 *
24 *
30),
new Date(
System.currentTimeMillis() +
(1000L *
60 *
60 *
24 *
365 *
10)),
new X500Name(
"CN=abimaran"),
jcaRequest
.getPublicKey());
JcaX509ExtensionUtils extUtils = new JcaX509ExtensionUtils();
ContentSigner signer =
new JcaContentSignerBuilder("SHA1withRSA").setProvider("BC").build(privateKey);
X509Certificate theCert =
new JcaX509CertificateConverter().setProvider("BC").getCertificate(
certificateBuilder.build(signer));
LOGGER.info("Signed Certificate CN : " + theCert.getSubjectDN().getName());
LOGGER.info("Signed CSR's public key : " + theCert.getPublicKey());
return theCert;
} catch (Exception e) {
throw new Exception("Error in signing the certificate", e);
}
}
}

@ -1,45 +0,0 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* 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.
*/
package cdm.api.windows.util;
import com.google.gson.JsonObject;
import org.wso2.carbon.device.mgt.common.Device;
import org.wso2.carbon.device.mgt.common.DeviceIdentifier;
import org.wso2.carbon.device.mgt.common.DeviceManagementConstants;
/**
* WindowsAPIUtil class provides utility function used by Android REST-API classes.
*/
public class WindowsAPIUtil {
public static Device convertToDeviceObject(JsonObject json){
Device device = new Device();
device.setType(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_ANDROID);
device.setName("Test Device");
device.setOwner("harshan");
return device;
}
public static DeviceIdentifier convertToDeviceIdentifierObject(String deviceId){
DeviceIdentifier identifier = new DeviceIdentifier();
identifier.setId(deviceId);
identifier.setType(DeviceManagementConstants.MobileDeviceTypes.MOBILE_DEVICE_TYPE_ANDROID);
return identifier;
}
}

@ -0,0 +1,54 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.wstep;
import cdm.api.windows.wstep.beans.RequestSecurityTokenResponse;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.ws.rs.*;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.Action;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
import javax.xml.ws.soap.SOAPBinding;
import javax.xml.ws.BindingType;
@WebService(targetNamespace = "http://schemas.microsoft.com/windows/pki/2009/01/enrollment/RSTRC", name = "wstep")
@BindingType(value = SOAPBinding.SOAP12HTTP_BINDING)
public interface CertificateEnrollmentService {
@RequestWrapper(localName = "RequestSecurityToken", targetNamespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512")
@WebMethod(operationName = "RequestSecurityToken")
@ResponseWrapper(localName = "RequestSecurityTokenResponseCollection", targetNamespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512")
public void RequestSecurityToken(
@WebParam(name = "TokenType", targetNamespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512")
String TokenType,
@WebParam(name = "RequestType", targetNamespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512")
String RequestType,
@WebParam(name = "BinarySecurityToken", targetNamespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd")
String BinarySecurityToken,
@WebParam(name = "AdditionalContext", targetNamespace = "http://schemas.xmlsoap.org/ws/2006/12/authorization")
cdm.api.windows.wstep.beans.AdditionalContext AdditionalContext,
@WebParam(mode = WebParam.Mode.OUT, name = "RequestSecurityTokenResponse", targetNamespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512")
javax.xml.ws.Holder<RequestSecurityTokenResponse> response
);
}

@ -0,0 +1,45 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.wstep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "OIDCollection", namespace = "http://schemas.xmlsoap.org/ws/2006/12/authorization", propOrder = {
"contextitem"
})
public class AdditionalContext {
@XmlElement(name = "ContextItem", required = true)
protected List<ContextItem> contextitem;
public List<ContextItem> getcontextitem() {
if (contextitem == null) {
contextitem = new ArrayList<ContextItem>();
}
return this.contextitem;
}
}

@ -0,0 +1,60 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.wstep.beans;
import javax.xml.bind.annotation.*;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "BinarySecurityToken", namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd")
public class BinarySecurityToken {
@XmlAttribute(name = "ValueType")
protected String ValueType;
@XmlAttribute(name = "EncodingType")
protected String EncodingType;
@XmlValue
protected String Token;
public void setValueType(String valuetype) {
this.ValueType = valuetype;
}
public String getValueType() {
return this.ValueType;
}
public void setEncodingType(String encodingtype) {
this.EncodingType = encodingtype;
}
public String getEncodingType() {
return this.EncodingType;
}
public void setToken(String token) {
this.Token = token;
}
public String getToken() {
return this.Token;
}
}

@ -0,0 +1,43 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.wstep.beans;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ContextItem", namespace = "http://schemas.xmlsoap.org/ws/2006/12/authorization", propOrder = {
"Value"
})
public class ContextItem {
@XmlElement(required = true)
protected String Value;
public String getValue() {
return Value;
}
public void setValue(String value) {
Value = value;
}
}

@ -0,0 +1,40 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.wstep.beans;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RequestedSecurityToken", namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", propOrder = {
"binarySecurityToken"
})
public class RequestSecurityToken {
@XmlElement(name = "BinarySecurityToken", required = true, namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd")
protected BinarySecurityToken binarySecurityToken;
public void setBinarySecurityToken(BinarySecurityToken binarysecuritytoken) {
this.binarySecurityToken = binarysecuritytoken;
}
}

@ -0,0 +1,71 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.wstep.beans;
import cdm.api.windows.wstep.beans.AdditionalContext;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RequestSecurityTokenResponse", namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", propOrder = {
"TokenType",
"RequestedSecurityToken",
"RequestID"
})
public class RequestSecurityTokenResponse implements Serializable {
@XmlElement(name = "TokenType", namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512")
private String TokenType;
@XmlElement(name = "RequestedSecurityToken", required = true, namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512")
private RequestedSecurityToken RequestedSecurityToken;
@XmlElement(name = "RequestID", namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512")
private int RequestID;
public String getTokenType() {
return TokenType;
}
public void setTokenType(String tokenType) {
TokenType = tokenType;
}
public RequestedSecurityToken getRequestedSecurityToken() {
return RequestedSecurityToken;
}
public void setRequestedSecurityToken(RequestedSecurityToken requestedSecurityToken) {
RequestedSecurityToken = requestedSecurityToken;
}
public int getRequestID() {
return RequestID;
}
public void setRequestID(int requestID) {
RequestID = requestID;
}
}

@ -0,0 +1,45 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.wstep.beans;
import cdm.api.windows.wstep.beans.ContextItem;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import java.util.ArrayList;
import java.util.List;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RequestedSecurityToken", namespace = "http://docs.oasis-open.org/ws-sx/ws-trust/200512", propOrder = {
"binarySecurityToken"
})
public class RequestedSecurityToken {
@XmlElement(name = "BinarySecurityToken", required = true, namespace = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd")
protected BinarySecurityToken binarySecurityToken;
public void setBinarySecurityToken(BinarySecurityToken binarysecuritytoken) {
this.binarySecurityToken = binarysecuritytoken;
}
}

@ -0,0 +1,27 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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.
*/
@XmlSchema(namespace = "http://www.w3.org/2003/05/soap-envelope",
xmlns = {
@XmlNs(prefix = "", namespaceURI = "http://www.w3.org/2003/05/soap-envelope"),
}, elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package com.ex.wstep;
import javax.xml.bind.annotation.XmlNs;
import javax.xml.bind.annotation.XmlSchema;

@ -0,0 +1,195 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.wstep.impl;
import cdm.api.windows.wstep.beans.AdditionalContext;
import cdm.api.windows.wstep.CertificateEnrollmentService;
import cdm.api.windows.wstep.beans.BinarySecurityToken;
import javax.jws.WebService;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.ws.BindingType;
import javax.xml.ws.Holder;
import javax.xml.ws.soap.Addressing;
import javax.xml.ws.soap.SOAPBinding;
import org.apache.commons.codec.digest.DigestUtils;
import cdm.api.windows.wstep.beans.RequestSecurityTokenResponse;
import cdm.api.windows.wstep.beans.RequestedSecurityToken;
import cdm.api.windows.wstep.util.CertificateSigningService;
import cdm.api.windows.wstep.util.KeyStoreGenerator;
import org.apache.log4j.Logger;
import org.bouncycastle.pkcs.PKCS10CertificationRequest;
import org.bouncycastle.pkcs.jcajce.JcaPKCS10CertificationRequest;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import sun.misc.BASE64Encoder;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.StringWriter;
import java.security.KeyStore;
import java.security.PrivateKey;
import java.security.cert.Certificate;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
@WebService(endpointInterface = "cdm.api.windows.wstep.CertificateEnrollmentService", targetNamespace = "http://schemas.microsoft.com/windows/pki/2009/01/enrollment/RSTRC")
@Addressing(enabled = true, required = true)
@BindingType(value = SOAPBinding.SOAP12HTTP_BINDING)
public class CertificateEnrollmentServiceImpl implements CertificateEnrollmentService {
private Logger LOGGER = Logger.getLogger(CertificateEnrollmentServiceImpl.class);
PrivateKey privateKey;
X509Certificate rooCACertificate;
JcaPKCS10CertificationRequest csrReq;
PKCS10CertificationRequest certificationRequest;
String wapProvisioningXmlFile;
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
@Override public void RequestSecurityToken(String TokenType, String RequestType,
String BinarySecurityToken,
AdditionalContext AdditionalContext,
Holder<RequestSecurityTokenResponse> response) {
certificateSign();
//////////
System.out.println("\n\n\n"+"REQUEST_CSR:"+BinarySecurityToken+"\n\n\n");
//////////
File file = new File(getClass().getClassLoader().getResource("wap-provisioning.xml").getFile());
wapProvisioningXmlFile = file.getPath();
String encodedWap="Initial_test";
RequestSecurityTokenResponse rs = new RequestSecurityTokenResponse();
rs.setTokenType(
"http://schemas.microsoft.com/5.0.0.0/ConfigurationManager/Enrollment/DeviceEnrollmentToken");
try {
byte[] derByteArray = javax.xml.bind.DatatypeConverter.parseBase64Binary(BinarySecurityToken);
certificationRequest = new PKCS10CertificationRequest(derByteArray);
csrReq = new JcaPKCS10CertificationRequest(certificationRequest);
X509Certificate signedCert = CertificateSigningService.signCSR(csrReq, privateKey, rooCACertificate);
System.out.println("PUBLIC KEY OF SIGNED CERT :"+signedCert.getPublicKey()+"\n\n\n");
System.out.println("PUBLIC KEY OF CSR :"+csrReq.getPublicKey()+"\n\n\n");
BASE64Encoder base64Encoder = new BASE64Encoder();
String rootCertEncodedString = base64Encoder.encode(rooCACertificate.getEncoded());
String signedCertEncoded = base64Encoder.encode(signedCert.getEncoded());
DocumentBuilder builder = domFactory.newDocumentBuilder();
Document dDoc = builder.parse(wapProvisioningXmlFile);
NodeList wapParm = dDoc.getElementsByTagName("parm");
/////////
wapParm.item(0).getParentNode().getAttributes().getNamedItem("type").setTextContent(String.valueOf(
DigestUtils.sha1Hex(rooCACertificate.getEncoded())));
/////////
NamedNodeMap rootCertAttributes = wapParm.item(0).getAttributes();
Node b64Encoded = rootCertAttributes.getNamedItem("value");
rootCertEncodedString=rootCertEncodedString.replaceAll("\n","");
b64Encoded.setTextContent(rootCertEncodedString);
System.out.println("COPY_ROOT_CERT:"+rootCertEncodedString);
/////////
wapParm.item(1).getParentNode().getAttributes().getNamedItem("type").setTextContent(String.valueOf(DigestUtils.sha1Hex(signedCert.getEncoded())));
/////////
NamedNodeMap clientCertAttributes = wapParm.item(1).getAttributes();
Node b64CliendEncoded = clientCertAttributes.getNamedItem("value");
signedCertEncoded=signedCertEncoded.replaceAll("\n","");
b64CliendEncoded.setTextContent(signedCertEncoded);
System.out.println("COPY_SIGNED_CERT:"+signedCertEncoded);
String wapProvisioning = convertDocumentToString(dDoc);
///////
System.out.println("WAP_XML:"+wapProvisioning+"\n\n\n");
///////
encodedWap = base64Encoder.encode(wapProvisioning.getBytes());
} catch (Exception e) {
//throw
}
RequestedSecurityToken rst = new RequestedSecurityToken();
BinarySecurityToken BinarySecToken=new BinarySecurityToken();
BinarySecToken.setValueType("http://schemas.microsoft.com/5.0.0.0/ConfigurationManager/Enrollment/DeviceEnrollmentProvisionDoc");
BinarySecToken.setEncodingType(
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#base64binary");
BinarySecToken.setToken(encodedWap);
rst.setBinarySecurityToken(BinarySecToken);
rs.setRequestedSecurityToken(rst);
rs.setRequestID(0);
response.value = rs;
}
private String convertDocumentToString(Document document) throws Exception {
DOMSource domSource = new DOMSource(document);
StringWriter writer = new StringWriter();
StreamResult result = new StreamResult(writer);
TransformerFactory tf = TransformerFactory.newInstance();
Transformer transformer = tf.newTransformer();
transformer.transform(domSource, result);
String wapProvisioning = writer.toString();
return wapProvisioning;
}
public void certificateSign() {
try {
KeyStore securityJks = KeyStoreGenerator.getKeyStore();
String pass = "wso2carbon";
KeyStoreGenerator.loadToStore(securityJks, pass.toCharArray(), "/Users/asok/Downloads/wso2as-5.2.1/repository/resources/security/wso2carbon.jks");
PrivateKey privateKeyCA = (PrivateKey) securityJks.getKey("wso2carbon", pass.toCharArray());
privateKey=privateKeyCA;
Certificate cartificateCA = securityJks.getCertificate(pass);
CertificateFactory cf = CertificateFactory.getInstance("X.509");
ByteArrayInputStream bais = new ByteArrayInputStream(cartificateCA.getEncoded());
X509Certificate cartificateCAX509 = (X509Certificate) cf.generateCertificate(bais);
rooCACertificate=cartificateCAX509;
} catch (Exception e) {
e.printStackTrace();
}
}
}

@ -0,0 +1,36 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.wstep.util;
/**
* Custom exception handling class, to handle the issue that come up during
* execution of Apk and certificate generation.
*/
public class ApkGenerationException extends Exception {
public ApkGenerationException(String message) {
super(message);
}
public ApkGenerationException(String message, Throwable e) {
super(message, e);
}
}

@ -0,0 +1,104 @@
package cdm.api.windows.wstep.util;
//REMOVE THIS LATER
import org.apache.log4j.Logger;
import org.bouncycastle.asn1.x500.X500Name;
import org.bouncycastle.asn1.x509.*;
import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.cert.X509v3CertificateBuilder;
import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter;
import org.bouncycastle.cert.jcajce.JcaX509ExtensionUtils;
import org.bouncycastle.cert.jcajce.JcaX509v3CertificateBuilder;
import org.bouncycastle.crypto.params.AsymmetricKeyParameter;
import org.bouncycastle.crypto.util.PrivateKeyFactory;
import org.bouncycastle.jce.PKCS10CertificationRequest;
import org.bouncycastle.operator.ContentSigner;
import org.bouncycastle.operator.DefaultDigestAlgorithmIdentifierFinder;
import org.bouncycastle.operator.DefaultSignatureAlgorithmIdentifierFinder;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.operator.bc.BcRSAContentSignerBuilder;
import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder;
//import org.bouncycastle.pkcs.PKCS10CertificationRequestHolder;
import org.bouncycastle.pkcs.jcajce.JcaPKCS10CertificationRequest;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigInteger;
import java.security.*;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import java.util.Date;
public class CertificateSigningService {
private static Logger LOGGER = Logger.getLogger(CertificateSigningService.class);
/*public static X509Certificate sign(PKCS10CertificationRequest inputCSR, PrivateKey caPrivate, X509Certificate caCertificate)
throws InvalidKeyException, NoSuchAlgorithmException,NoSuchProviderException, SignatureException, IOException,
OperatorCreationException, CertificateException {
AlgorithmIdentifier sigAlgId = new DefaultSignatureAlgorithmIdentifierFinder().find("SHA1withRSA");
AlgorithmIdentifier digAlgId = new DefaultDigestAlgorithmIdentifierFinder().find(sigAlgId);
AsymmetricKeyParameter foo = PrivateKeyFactory.createKey(caPrivate.getEncoded());
//SubjectPublicKeyInfo keyInfo = SubjectPublicKeyInfo.getInstance(pair.getPublic().getEncoded());
PKCS10CertificationRequestHolder pk10Holder = new PKCS10CertificationRequestHolder(inputCSR);
SubjectPublicKeyInfo csrKeyInfo = pk10Holder.getSubjectPublicKeyInfo();
LOGGER.info("CN of the Device's CSR : " + pk10Holder.getSubject().toString());
X509v3CertificateBuilder myCertificateGenerator = new X509v3CertificateBuilder(
new X500Name(caCertificate.getIssuerX500Principal().getName()), BigInteger.valueOf(new SecureRandom().nextInt(Integer.MAX_VALUE)), new Date(System.currentTimeMillis() - 1000L * 60 * 60 * 24 * 30),
new Date(System.currentTimeMillis() + (1000L * 60 * 60 * 24 * 365*10)), new X500Name("CN=abimaran"), csrKeyInfo);
ContentSigner sigGen = new BcRSAContentSignerBuilder(sigAlgId, digAlgId).build(foo);
X509CertificateHolder holder = myCertificateGenerator.build(sigGen);
X509CertificateStructure eeX509CertificateStructure = holder.toASN1Structure();
CertificateFactory cf = CertificateFactory.getInstance("X.509", "BC");
// Read Certificate
InputStream is1 = new ByteArrayInputStream(eeX509CertificateStructure.getEncoded());
X509Certificate theCert = (X509Certificate) cf.generateCertificate(is1);
LOGGER.info("Signed Certificate CN : " + theCert.getSubjectDN().getName());
LOGGER.info("Signed CSR's public key : " + theCert.getPublicKey());
is1.close();
return theCert;
}*/
public static X509Certificate signCSR(JcaPKCS10CertificationRequest jcaRequest, PrivateKey privateKey, X509Certificate caCert) throws Exception{
try {
X509v3CertificateBuilder certificateBuilder = new JcaX509v3CertificateBuilder(caCert,
BigInteger.valueOf(new SecureRandom().nextInt(Integer.MAX_VALUE)), new Date(System.currentTimeMillis() - 1000L * 60 * 60 * 24 * 30),
new Date(System.currentTimeMillis() + (1000L * 60 * 60 * 24 * 365*10)), new X500Name("CN=abimaran"), jcaRequest.getPublicKey());
JcaX509ExtensionUtils extUtils = new JcaX509ExtensionUtils();
ContentSigner signer = new JcaContentSignerBuilder("SHA1withRSA").setProvider("BC").build(privateKey);
X509Certificate theCert = new JcaX509CertificateConverter().setProvider("BC").getCertificate(certificateBuilder.build(signer));
LOGGER.info("Signed Certificate CN : " + theCert.getSubjectDN().getName());
LOGGER.info("Signed CSR's public key : " + theCert.getPublicKey());
return theCert;
} catch (Exception e) {
throw new Exception("Error in signing the certificate", e);
}
}
}

@ -0,0 +1,77 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.wstep.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import java.math.BigInteger;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.Date;
import org.spongycastle.asn1.x500.X500Name;
import org.spongycastle.cert.X509v3CertificateBuilder;
import org.spongycastle.cert.jcajce.JcaX509CertificateConverter;
import org.spongycastle.cert.jcajce.JcaX509v3CertificateBuilder;
import org.spongycastle.operator.ContentSigner;
import org.spongycastle.operator.OperatorCreationException;
import org.spongycastle.operator.jcajce.JcaContentSignerBuilder;
/**
* Generate X509 V3 certificates. CA, RA and SSL can be generated, where
* intermediate certificates are signed from the root certificate to generate
* the chain.
*/
public class CertificateUtil {
private static final Log LOG = LogFactory.getLog(CertificateUtil.class);
public static X509Certificate signCSR(PublicKey publicKeyToBeSigned, PrivateKey caPrivateKey, X509Certificate caCert) throws Exception{
try {
X509v3CertificateBuilder certificateBuilder = new JcaX509v3CertificateBuilder(caCert,
BigInteger
.valueOf(new SecureRandom().nextInt(Integer.MAX_VALUE)),
new Date(System.currentTimeMillis()),
new Date(System.currentTimeMillis() + (1000L * 60 * 60 * 24 * 365*10)),
new X500Name("CN=abimaran"),
publicKeyToBeSigned);
ContentSigner signer = new JcaContentSignerBuilder("SHA1withRSA").setProvider("SC").build(caPrivateKey);
X509Certificate theCert = new JcaX509CertificateConverter().setProvider("SC").getCertificate(certificateBuilder.build(signer));
return theCert;
} catch (OperatorCreationException e) {
String message = "Error creating ContentSigner with JcaContentSignerBuilder"
+ " with the private key provided.";
LOG.error(message, e);
throw new ApkGenerationException(message, e);
} catch (CertificateException e) {
String message = "Error building certificate.";
LOG.error(message, e);
throw new ApkGenerationException(message, e);
}
}
}

@ -0,0 +1,117 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.wstep.util;
import java.io.File;
/**
* Constants used throughout the project
*/
public class Constants {
public static class FilePath {
private FilePath() {
throw new AssertionError();
}
public static final String BKS_FILE = "emm_truststore.bks";
public static final String ANDROID_AGENT = "emm-agent-android";
public static final String WSO2CARBON_JKS = "wso2carbon.jks";
public static final String CLIENT_TRUST_JKS = "client-truststore.jks";
public static final String COMMON_UTIL = ANDROID_AGENT + File.separator + "src" +
File.separator + "org" + File.separator + "wso2" +
File.separator + "emm" + File.separator + "agent" +
File.separator + "utils" + File.separator +
"CommonUtilities.java";
public static final String WSO2EMM_JKS = "wso2emm.jks";
public static final String ANDROID_AGENT_RAW = ANDROID_AGENT + File.separator + "res" +
File.separator + "raw" + File.separator;
public static final String ANDROID_AGENT_APK = ANDROID_AGENT + File.separator + "target" +
File.separator + "emm_agent.apk";
public static final String APK_FOLDER = "Apk";
public static final String JKS_FOLDER = "jks";
public static final String BIN_PATH = File.separator + "bin" + File.separator + "mvn";
public static final String WORKING_DIR = "workingDir";
public static final String ZIP_PATH = "zipPath";
}
public static final String ALGORITHM = "RSA";
public static final String PROVIDER = "SC";
public static final String ENCRYPTION = "SHA1withRSA";
public static final String REGISTRATION_AUTHORITY = "RA";
public static final String BKS = "BKS";
public static final String BKS_ALIAS = "cert-alias";
public static final String JKS = "JKS";
public static final String SSL = "SSL";
public static final String ENVIRONMENT_VARIABLE = "MAVEN_HOME";
public static final String ARCHIVE_TYPE = ".zip";
public static final String ACTION = "clean";
public static final String GOAL = "package";
public static final String SERVER_IP_ANDROID = "String SERVER_IP = \"";
public static final String TRUST_STORE_BKS = "String TRUSTSTORE_PASSWORD = \"";
public static class CSRDataKeys {
private CSRDataKeys() {
throw new AssertionError();
}
public static final String COUNTRY_CA = "countryCA";
public static final String STATE_CA = "stateCA";
public static final String LOCALITY_CA = "localityCA";
public static final String ORGANIZATION_CA = "organizationCA";
public static final String ORGANIZATION_UNIT_CA = "organizationUCA";
public static final String DAYS_CA = "daysCA";
public static final String COMMON_NAME_CA = "commonNameCA";
public static final String COUNTRY_RA = "countryRA";
public static final String STATE_RA = "stateRA";
public static final String LOCALITY_RA = "localityRA";
public static final String ORGANIZATION_RA = "organizationRA";
public static final String ORGANIZATION_UNIT_RA = "organizationURA";
public static final String DAYS_RA = "daysRA";
public static final String COMMON_NAME_RA = "commonNameRA";
public static final String COUNTRY_SSL = "countrySSL";
public static final String STATE_SSL = "stateSSL";
public static final String LOCALITY_SSL = "localitySSL";
public static final String ORGANIZATION_SSL = "organizationSSL";
public static final String ORGANIZATION_UNIT_SSL = "organizationUSSL";
public static final String DAYS_SSL = "daysSSL";
public static final String SERVER_IP = "serverIp";
public static final String PASSWORD = "password";
public static final String USERSNAME = "usersname";
public static final String COMPANY = "company";
}
public static class TruststoreKeys {
private TruststoreKeys() {
throw new AssertionError();
}
public static final String PASSWORD_PK12_CA = "passwordPK12CA";
public static final String PASSWORD_PK12_RA = "passwordPK12RA";
public static final String ALIAS_PK12_CA = "aliasPK12CA";
public static final String ALIAS_PK12_RA = "aliasPK12RA";
public static final String PASSWORD_WSO2_EMM_JKS = "passwordWSO2EMMJKS";
public static final String ALIAS__CLIENT_TRUSTSTORE = "aliasClientTruststore";
public static final String PASSWORD_CLIENT_TRUSTSTORE = "passwordClientTruststore";
public static final String ALIAS_WSO2_CARBON = "aliasWSO2Carbon";
public static final String PASSWORD_WSO2_CARBON = "passwordWSO2Carbon";
}
}

@ -0,0 +1,195 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.wstep.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.codehaus.plexus.util.FileUtils;
import java.io.*;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
/**
* Common file operations such as read, write PEM files and .zip file creation
* are handled by this class. These methods are added to improve reusability of
* commonly used file operations.
*/
public class FileOperator {
private static final Log LOG = LogFactory.getLog(FileOperator.class);
/**
* Copy file from the source path to a destination.
*
* @param source source file path
* @param destination destination file path
* @throws ApkGenerationException
*/
public static void copyFile(String source, String destination)
throws ApkGenerationException {
try {
FileUtils.copyFile(new File(source), new File(destination));
} catch (IOException e) {
String message =
"Cannot find one of the files, while trying to copy file :" + source +
", to its destination: " + destination;
LOG.error(message, e);
throw new ApkGenerationException(message, e);
}
}
/**
* Read a file and returns its content as a {@link String}
*
* @param path of the file to be read.
* @return the content of the file
* @throws ApkGenerationException
*/
public static String readFile(String path) throws ApkGenerationException {
try {
return FileUtils.fileRead(new File(path));
} catch (IOException e) {
String message = "Error reading file " + path;
LOG.error(message, e);
throw new ApkGenerationException(message, e);
}
}
/**
* Write content to a physical file
*
* @param path the destination file path
* @param content data to be saved
* @throws ApkGenerationException
*/
public static void fileWrite(String path, String content) throws ApkGenerationException {
try {
FileUtils.fileWrite(path, content);
} catch (IOException e) {
String message = "Error writing to file " + path;
LOG.error(message, e);
throw new ApkGenerationException(message, e);
}
}
/**
* Creates a zip file from a list of files provided.
*
* @param zipFilePath the path of the final zip file to be created.
* @param files An array of file paths that needs to be added to the zip
* @throws ApkGenerationException
*/
public static void createZip(String zipFilePath, String[] files)
throws ApkGenerationException {
FileOutputStream fileOut;
File fileToCopy;
ZipOutputStream zipOutStream = null;
FileInputStream inputStream = null;
byte[] bytes = new byte[1024];
int count;
int x = 0;
try {
fileOut = new FileOutputStream(zipFilePath);
} catch (FileNotFoundException e) {
String message = "Error opening file " + zipFilePath;
LOG.error(message, e);
throw new ApkGenerationException(message, e);
}
try {
zipOutStream = new ZipOutputStream(fileOut);
for (x = 0; x < files.length; x++) {
fileToCopy = new File(files[x]);
inputStream = new FileInputStream(files[x]);
zipOutStream.putNextEntry(new ZipEntry(fileToCopy.getName()));
while ((count = inputStream.read(bytes)) > 0) {
zipOutStream.write(bytes, 0, count);
}
}
} catch (FileNotFoundException e) {
String message = "Cannot open the file ," + files[x] + " to add to zip.";
LOG.error(message, e);
throw new ApkGenerationException(message, e);
} catch (IOException e) {
String message = "Cannot write file ," + files[x] + " to zip.";
LOG.error(message, e);
throw new ApkGenerationException(message, e);
} finally {
if (inputStream != null) {
try {
inputStream.close();
} catch (IOException e) {
String message = "File error while closing the file, " + files[x];
LOG.warn(message, e);
}
}
if (zipOutStream != null) {
try {
zipOutStream.close();
} catch (IOException e) {
String message = "File error while closing the file, " + zipFilePath;
LOG.warn(message, e);
}
}
}
}
/**
* Get a file input stream when the file name is provided.
*
* @param sourceFile Name of the source file.
* @return the file input stream.
* @throws ApkGenerationException
*/
public static FileInputStream getFileInputStream(String sourceFile)
throws ApkGenerationException {
try {
return new FileInputStream(sourceFile);
} catch (FileNotFoundException e) {
String message = "Cannot open the file ," + sourceFile;
LOG.error(message, e);
throw new ApkGenerationException(message, e);
}
}
/**
* Generates a new folder if it doesn't exist when the path is given.
*
* @param path the folder path that needs to be created
* @throws ApkGenerationException
*/
public static void makeFolder(String path) throws ApkGenerationException {
try {
File file=new File(path);
if(!file.mkdirs()){
String message = "Error when creating directory " + path;
LOG.error(message);
throw new ApkGenerationException(message);
}
} catch (SecurityException e) {
String message = "Error when creating directory " + path;
LOG.error(message, e);
throw new ApkGenerationException(message, e);
}
}
}

@ -0,0 +1,94 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.wstep.util;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.security.*;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
/**
* Creation of key stores and injecting certificates to the key stores is
* handled here.
*/
public class KeyStoreGenerator {
private static final Log LOG = LogFactory.getLog(KeyStoreGenerator.class);
/**
* Load/initiate a key store from a provided file.
*
* @param keyStore The destination key store which needs to be loaded.
* @param storePass Password of the key store.
* @param resultFile The source key store file.
* @throws ApkGenerationException
*/
public static void loadToStore(KeyStore keyStore, char[] storePass, String resultFile)
throws ApkGenerationException {
FileInputStream fileInputStream = null;
try {
if (resultFile != null) {
fileInputStream = FileOperator.getFileInputStream(resultFile);
keyStore.load(fileInputStream, storePass);
}
} catch (NoSuchAlgorithmException e) {
String message = Constants.ALGORITHM + " cryptographic algorithm is requested but" +
" it is not available in the environment.";
LOG.error(message, e);
throw new ApkGenerationException(message, e);
} catch (CertificateException e) {
String message = "Error working with certificate related to, " + resultFile;
LOG.error(message, e);
throw new ApkGenerationException(message, e);
} catch (IOException e) {
String message = "File error while working with file, " + resultFile;
LOG.error(message, e);
throw new ApkGenerationException(message, e);
} finally {
try {
if (fileInputStream != null) {
fileInputStream.close();
}
} catch (IOException e) {
String message = "File error while closing the file, " + resultFile;
LOG.error(message, e);
}
}
}
public static KeyStore getKeyStore() throws ApkGenerationException {
try {
return KeyStore.getInstance(Constants.JKS);
} catch (KeyStoreException e) {
String message = "KeyStore error while creating new JKS.";
LOG.error(message, e);
throw new ApkGenerationException(message, e);
}
}
}

@ -0,0 +1,57 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.wstep.util;
import javax.xml.namespace.QName;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPHandler;
import javax.xml.ws.handler.soap.SOAPMessageContext;
import java.util.HashSet;
import java.util.Set;
public class PPSRSOApMessageHandler implements SOAPHandler<SOAPMessageContext> {
@Override
public Set<QName> getHeaders() {
final QName securityHeader = new QName(
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd",
"Security",
"wsse");
final HashSet headers = new HashSet();
headers.add(securityHeader);
System.out.println("CHECKED_HEADER");
return headers;
}
@Override public boolean handleMessage(SOAPMessageContext context) {
return true;
}
@Override public boolean handleFault(SOAPMessageContext context) {
return true;
}
@Override public void close(MessageContext context) {
}
}

@ -0,0 +1,42 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.wstep.util;
import org.apache.ws.security.WSPasswordCallback;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
import java.io.IOException;
public class PasswordCallbackHandler implements CallbackHandler {
@Override public void handle(Callback[] callbacks)
throws IOException, UnsupportedCallbackException {
WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
System.out.println("CHECKED_BEFORE_IF_SECURITY");
if ("asok@wso2.com".equals(pc.getIdentifier())) {
System.out.println("CHECKED_IF_SECURITY" + pc.getIdentifier());
pc.setPassword("admin");
return;
}
}
}

@ -0,0 +1,48 @@
package cdm.api.windows.xcep;
import cdm.api.windows.xcep.beans.CACollection;
import cdm.api.windows.xcep.beans.OIDCollection;
import cdm.api.windows.xcep.beans.ObjectFactory;
import cdm.api.windows.xcep.beans.Response;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Produces;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.ws.Action;
import javax.xml.ws.BindingType;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
import javax.xml.ws.soap.SOAPBinding;
/**
* This class was generated by Apache CXF 2.7.3
* 2015-01-11T12:55:46.432+05:30
* Generated source version: 2.7.3
*/
@WebService(targetNamespace = "http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy", name = "IPolicy")
@BindingType(value = SOAPBinding.SOAP12HTTP_BINDING)
@XmlSeeAlso({ ObjectFactory.class })
public interface IPolicy {
@RequestWrapper(localName = "GetPolicies", targetNamespace = "http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy", className = "com.microsoft.schemas.windows.pki._2009._01.enrollmentpolicy.GetPolicies")
@WebMethod(operationName = "GetPolicies")
@ResponseWrapper(localName = "GetPoliciesResponse", targetNamespace = "http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy", className = "com.microsoft.schemas.windows.pki._2009._01.enrollmentpolicy.GetPoliciesResponse")
public void getPolicies(
@WebParam(name = "client", targetNamespace = "http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy")
cdm.api.windows.xcep.beans.Client client,
@WebParam(name = "requestFilter", targetNamespace = "http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy")
cdm.api.windows.xcep.beans.RequestFilter requestFilter,
@WebParam(mode = WebParam.Mode.OUT, name = "response", targetNamespace = "http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy")
javax.xml.ws.Holder<Response> response,
@WebParam(mode = WebParam.Mode.OUT, name = "cAs", targetNamespace = "http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy")
javax.xml.ws.Holder<CACollection> cAs,
@WebParam(mode = WebParam.Mode.OUT, name = "oIDs", targetNamespace = "http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy")
javax.xml.ws.Holder<OIDCollection> oIDs
);
}

@ -0,0 +1,489 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;
/**
* <p>Java class for Attributes complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="Attributes">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element ref="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}commonName"/>
* &lt;element name="policySchema" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
* &lt;element name="certificateValidity" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}CertificateValidity"/>
* &lt;element name="permission" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}EnrollmentPermission"/>
* &lt;element name="privateKeyAttributes" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}PrivateKeyAttributes"/>
* &lt;element name="revision" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}Revision"/>
* &lt;element name="supersededPolicies" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}SupersededPolicies"/>
* &lt;element name="privateKeyFlags" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
* &lt;element name="subjectNameFlags" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
* &lt;element name="enrollmentFlags" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
* &lt;element name="generalFlags" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
* &lt;element name="hashAlgorithmOIDReference" type="{http://www.w3.org/2001/XMLSchema}int"/>
* &lt;element name="rARequirements" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}RARequirements"/>
* &lt;element name="keyArchivalAttributes" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}KeyArchivalAttributes"/>
* &lt;element name="extensions" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}ExtensionCollection"/>
* &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Attributes", propOrder = {
"commonName",
"policySchema",
"certificateValidity",
"permission",
"privateKeyAttributes",
"revision",
"supersededPolicies",
"privateKeyFlags",
"subjectNameFlags",
"enrollmentFlags",
"generalFlags",
"hashAlgorithmOIDReference",
"raRequirements",
"keyArchivalAttributes",
"extensions",
"any"
})
public class Attributes {
@XmlElement(required = true)
protected String commonName;
@XmlSchemaType(name = "unsignedInt")
protected long policySchema;
@XmlElement(required = true)
protected CertificateValidity certificateValidity;
@XmlElement(required = true)
protected EnrollmentPermission permission;
@XmlElement(required = true)
protected PrivateKeyAttributes privateKeyAttributes;
@XmlElement(required = true)
protected Revision revision;
@XmlElement(required = true, nillable = true)
protected SupersededPolicies supersededPolicies;
@XmlElement(required = true, type = Long.class, nillable = true)
@XmlSchemaType(name = "unsignedInt")
protected Long privateKeyFlags;
@XmlElement(required = true, type = Long.class, nillable = true)
@XmlSchemaType(name = "unsignedInt")
protected Long subjectNameFlags;
@XmlElement(required = true, type = Long.class, nillable = true)
@XmlSchemaType(name = "unsignedInt")
protected Long enrollmentFlags;
@XmlElement(required = true, type = Long.class, nillable = true)
@XmlSchemaType(name = "unsignedInt")
protected Long generalFlags;
@XmlElement(required = true, type = Integer.class, nillable = true)
protected Integer hashAlgorithmOIDReference;
@XmlElement(name = "rARequirements", required = true, nillable = true)
protected RARequirements raRequirements;
@XmlElement(required = true, nillable = true)
protected KeyArchivalAttributes keyArchivalAttributes;
@XmlElement(required = true, nillable = true)
protected ExtensionCollection extensions;
@XmlAnyElement(lax = true)
protected List<Object> any;
/**
* Gets the value of the commonName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCommonName() {
return commonName;
}
/**
* Sets the value of the commonName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCommonName(String value) {
this.commonName = value;
}
/**
* Gets the value of the policySchema property.
*
*/
public long getPolicySchema() {
return policySchema;
}
/**
* Sets the value of the policySchema property.
*
*/
public void setPolicySchema(long value) {
this.policySchema = value;
}
/**
* Gets the value of the certificateValidity property.
*
* @return
* possible object is
* {@link CertificateValidity }
*
*/
public CertificateValidity getCertificateValidity() {
return certificateValidity;
}
/**
* Sets the value of the certificateValidity property.
*
* @param value
* allowed object is
* {@link CertificateValidity }
*
*/
public void setCertificateValidity(CertificateValidity value) {
this.certificateValidity = value;
}
/**
* Gets the value of the permission property.
*
* @return
* possible object is
* {@link EnrollmentPermission }
*
*/
public EnrollmentPermission getPermission() {
return permission;
}
/**
* Sets the value of the permission property.
*
* @param value
* allowed object is
* {@link EnrollmentPermission }
*
*/
public void setPermission(EnrollmentPermission value) {
this.permission = value;
}
/**
* Gets the value of the privateKeyAttributes property.
*
* @return
* possible object is
* {@link PrivateKeyAttributes }
*
*/
public PrivateKeyAttributes getPrivateKeyAttributes() {
return privateKeyAttributes;
}
/**
* Sets the value of the privateKeyAttributes property.
*
* @param value
* allowed object is
* {@link PrivateKeyAttributes }
*
*/
public void setPrivateKeyAttributes(PrivateKeyAttributes value) {
this.privateKeyAttributes = value;
}
/**
* Gets the value of the revision property.
*
* @return
* possible object is
* {@link Revision }
*
*/
public Revision getRevision() {
return revision;
}
/**
* Sets the value of the revision property.
*
* @param value
* allowed object is
* {@link Revision }
*
*/
public void setRevision(Revision value) {
this.revision = value;
}
/**
* Gets the value of the supersededPolicies property.
*
* @return
* possible object is
* {@link SupersededPolicies }
*
*/
public SupersededPolicies getSupersededPolicies() {
return supersededPolicies;
}
/**
* Sets the value of the supersededPolicies property.
*
* @param value
* allowed object is
* {@link SupersededPolicies }
*
*/
public void setSupersededPolicies(SupersededPolicies value) {
this.supersededPolicies = value;
}
/**
* Gets the value of the privateKeyFlags property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getPrivateKeyFlags() {
return privateKeyFlags;
}
/**
* Sets the value of the privateKeyFlags property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setPrivateKeyFlags(Long value) {
this.privateKeyFlags = value;
}
/**
* Gets the value of the subjectNameFlags property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getSubjectNameFlags() {
return subjectNameFlags;
}
/**
* Sets the value of the subjectNameFlags property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setSubjectNameFlags(Long value) {
this.subjectNameFlags = value;
}
/**
* Gets the value of the enrollmentFlags property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getEnrollmentFlags() {
return enrollmentFlags;
}
/**
* Sets the value of the enrollmentFlags property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setEnrollmentFlags(Long value) {
this.enrollmentFlags = value;
}
/**
* Gets the value of the generalFlags property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getGeneralFlags() {
return generalFlags;
}
/**
* Sets the value of the generalFlags property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setGeneralFlags(Long value) {
this.generalFlags = value;
}
/**
* Gets the value of the hashAlgorithmOIDReference property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getHashAlgorithmOIDReference() {
return hashAlgorithmOIDReference;
}
/**
* Sets the value of the hashAlgorithmOIDReference property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setHashAlgorithmOIDReference(Integer value) {
this.hashAlgorithmOIDReference = value;
}
/**
* Gets the value of the raRequirements property.
*
* @return
* possible object is
* {@link RARequirements }
*
*/
public RARequirements getRARequirements() {
return raRequirements;
}
/**
* Sets the value of the raRequirements property.
*
* @param value
* allowed object is
* {@link RARequirements }
*
*/
public void setRARequirements(RARequirements value) {
this.raRequirements = value;
}
/**
* Gets the value of the keyArchivalAttributes property.
*
* @return
* possible object is
* {@link KeyArchivalAttributes }
*
*/
public KeyArchivalAttributes getKeyArchivalAttributes() {
return keyArchivalAttributes;
}
/**
* Sets the value of the keyArchivalAttributes property.
*
* @param value
* allowed object is
* {@link KeyArchivalAttributes }
*
*/
public void setKeyArchivalAttributes(KeyArchivalAttributes value) {
this.keyArchivalAttributes = value;
}
/**
* Gets the value of the extensions property.
*
* @return
* possible object is
* {@link ExtensionCollection }
*
*/
public ExtensionCollection getExtensions() {
return extensions;
}
/**
* Sets the value of the extensions property.
*
* @param value
* allowed object is
* {@link ExtensionCollection }
*
*/
public void setExtensions(ExtensionCollection value) {
this.extensions = value;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Object }
* {@link Element }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
}

@ -0,0 +1,165 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;
/**
* <p>Java class for CA complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="CA">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="uris" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}CAURICollection"/>
* &lt;element name="certificate" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
* &lt;element name="enrollPermission" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* &lt;element name="cAReferenceID" type="{http://www.w3.org/2001/XMLSchema}int"/>
* &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CA", propOrder = {
"uris",
"certificate",
"enrollPermission",
"caReferenceID",
"any"
})
public class CA {
@XmlElement(required = true)
protected CAURICollection uris;
@XmlElement(required = true)
protected byte[] certificate;
protected boolean enrollPermission;
@XmlElement(name = "cAReferenceID")
protected int caReferenceID;
@XmlAnyElement(lax = true)
protected List<Object> any;
/**
* Gets the value of the uris property.
*
* @return
* possible object is
* {@link CAURICollection }
*
*/
public CAURICollection getUris() {
return uris;
}
/**
* Sets the value of the uris property.
*
* @param value
* allowed object is
* {@link CAURICollection }
*
*/
public void setUris(CAURICollection value) {
this.uris = value;
}
/**
* Gets the value of the certificate property.
*
* @return
* possible object is
* byte[]
*/
public byte[] getCertificate() {
return certificate;
}
/**
* Sets the value of the certificate property.
*
* @param value
* allowed object is
* byte[]
*/
public void setCertificate(byte[] value) {
this.certificate = value;
}
/**
* Gets the value of the enrollPermission property.
*
*/
public boolean isEnrollPermission() {
return enrollPermission;
}
/**
* Sets the value of the enrollPermission property.
*
*/
public void setEnrollPermission(boolean value) {
this.enrollPermission = value;
}
/**
* Gets the value of the caReferenceID property.
*
*/
public int getCAReferenceID() {
return caReferenceID;
}
/**
* Sets the value of the caReferenceID property.
*
*/
public void setCAReferenceID(int value) {
this.caReferenceID = value;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Object }
* {@link Element }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
}

@ -0,0 +1,69 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for CACollection complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="CACollection">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="cA" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}CA" maxOccurs="unbounded"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CACollection", propOrder = {
"ca"
})
public class CACollection {
@XmlElement(name = "cA", required = true)
protected List<CA> ca;
/**
* Gets the value of the ca property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the ca property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getCA().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link CA }
*
*
*/
public List<CA> getCA() {
if (ca == null) {
ca = new ArrayList<CA>();
}
return this.ca;
}
}

@ -0,0 +1,69 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for CAReferenceCollection complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="CAReferenceCollection">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="cAReference" type="{http://www.w3.org/2001/XMLSchema}int" maxOccurs="unbounded"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CAReferenceCollection", propOrder = {
"caReference"
})
public class CAReferenceCollection {
@XmlElement(name = "cAReference", type = Integer.class)
protected List<Integer> caReference;
/**
* Gets the value of the caReference property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the caReference property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getCAReference().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Integer }
*
*
*/
public List<Integer> getCAReference() {
if (caReference == null) {
caReference = new ArrayList<Integer>();
}
return this.caReference;
}
}

@ -0,0 +1,170 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;
/**
* <p>Java class for CAURI complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="CAURI">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="clientAuthentication" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
* &lt;element name="uri" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
* &lt;element name="priority" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
* &lt;element name="renewalOnly" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CAURI", propOrder = {
"clientAuthentication",
"uri",
"priority",
"renewalOnly",
"any"
})
public class CAURI {
@XmlSchemaType(name = "unsignedInt")
protected long clientAuthentication;
@XmlElement(required = true)
@XmlSchemaType(name = "anyURI")
protected String uri;
@XmlElement(required = true, type = Long.class, nillable = true)
@XmlSchemaType(name = "unsignedInt")
protected Long priority;
protected boolean renewalOnly;
@XmlAnyElement(lax = true)
protected List<Object> any;
/**
* Gets the value of the clientAuthentication property.
*
*/
public long getClientAuthentication() {
return clientAuthentication;
}
/**
* Sets the value of the clientAuthentication property.
*
*/
public void setClientAuthentication(long value) {
this.clientAuthentication = value;
}
/**
* Gets the value of the uri property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getUri() {
return uri;
}
/**
* Sets the value of the uri property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setUri(String value) {
this.uri = value;
}
/**
* Gets the value of the priority property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getPriority() {
return priority;
}
/**
* Sets the value of the priority property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setPriority(Long value) {
this.priority = value;
}
/**
* Gets the value of the renewalOnly property.
*
*/
public boolean isRenewalOnly() {
return renewalOnly;
}
/**
* Sets the value of the renewalOnly property.
*
*/
public void setRenewalOnly(boolean value) {
this.renewalOnly = value;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Object }
* {@link Element }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
}

@ -0,0 +1,69 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for CAURICollection complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="CAURICollection">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="cAURI" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}CAURI" maxOccurs="unbounded"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CAURICollection", propOrder = {
"cauri"
})
public class CAURICollection {
@XmlElement(name = "cAURI", required = true)
protected List<CAURI> cauri;
/**
* Gets the value of the cauri property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the cauri property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getCAURI().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link CAURI }
*
*
*/
public List<CAURI> getCAURI() {
if (cauri == null) {
cauri = new ArrayList<CAURI>();
}
return this.cauri;
}
}

@ -0,0 +1,147 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;
/**
* <p>Java class for CertificateEnrollmentPolicy complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="CertificateEnrollmentPolicy">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="policyOIDReference" type="{http://www.w3.org/2001/XMLSchema}int"/>
* &lt;element name="cAs" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}CAReferenceCollection"/>
* &lt;element name="attributes" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}Attributes"/>
* &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CertificateEnrollmentPolicy", propOrder = {
"policyOIDReference",
"cAs",
"attributes",
"any"
})
public class CertificateEnrollmentPolicy {
protected int policyOIDReference;
@XmlElement(required = true, nillable = true)
protected CAReferenceCollection cAs;
@XmlElement(required = true)
protected Attributes attributes;
@XmlAnyElement(lax = true)
protected List<Object> any;
/**
* Gets the value of the policyOIDReference property.
*
*/
public int getPolicyOIDReference() {
return policyOIDReference;
}
/**
* Sets the value of the policyOIDReference property.
*
*/
public void setPolicyOIDReference(int value) {
this.policyOIDReference = value;
}
/**
* Gets the value of the cAs property.
*
* @return
* possible object is
* {@link CAReferenceCollection }
*
*/
public CAReferenceCollection getCAs() {
return cAs;
}
/**
* Sets the value of the cAs property.
*
* @param value
* allowed object is
* {@link CAReferenceCollection }
*
*/
public void setCAs(CAReferenceCollection value) {
this.cAs = value;
}
/**
* Gets the value of the attributes property.
*
* @return
* possible object is
* {@link Attributes }
*
*/
public Attributes getAttributes() {
return attributes;
}
/**
* Sets the value of the attributes property.
*
* @param value
* allowed object is
* {@link Attributes }
*
*/
public void setAttributes(Attributes value) {
this.attributes = value;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Object }
* {@link Element }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
}

@ -0,0 +1,94 @@
package cdm.api.windows.xcep.beans;
import java.math.BigInteger;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for CertificateValidity complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="CertificateValidity">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="validityPeriodSeconds" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
* &lt;element name="renewalPeriodSeconds" type="{http://www.w3.org/2001/XMLSchema}unsignedLong"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CertificateValidity", propOrder = {
"validityPeriodSeconds",
"renewalPeriodSeconds"
})
public class CertificateValidity {
@XmlElement(required = true)
@XmlSchemaType(name = "unsignedLong")
protected BigInteger validityPeriodSeconds;
@XmlElement(required = true)
@XmlSchemaType(name = "unsignedLong")
protected BigInteger renewalPeriodSeconds;
/**
* Gets the value of the validityPeriodSeconds property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getValidityPeriodSeconds() {
return validityPeriodSeconds;
}
/**
* Sets the value of the validityPeriodSeconds property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setValidityPeriodSeconds(BigInteger value) {
this.validityPeriodSeconds = value;
}
/**
* Gets the value of the renewalPeriodSeconds property.
*
* @return
* possible object is
* {@link BigInteger }
*
*/
public BigInteger getRenewalPeriodSeconds() {
return renewalPeriodSeconds;
}
/**
* Sets the value of the renewalPeriodSeconds property.
*
* @param value
* allowed object is
* {@link BigInteger }
*
*/
public void setRenewalPeriodSeconds(BigInteger value) {
this.renewalPeriodSeconds = value;
}
}

@ -0,0 +1,135 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.datatype.XMLGregorianCalendar;
import org.w3c.dom.Element;
/**
* <p>Java class for Client complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="Client">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="lastUpdate" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
* &lt;element name="preferredLanguage" type="{http://www.w3.org/2001/XMLSchema}language"/>
* &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Client", propOrder = {
"lastUpdate",
"preferredLanguage",
"any"
})
public class Client {
@XmlElement(required = true, nillable = true)
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar lastUpdate;
@XmlElement(required = true, nillable = true)
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "language")
protected String preferredLanguage;
@XmlAnyElement(lax = true)
protected List<Object> any;
/**
* Gets the value of the lastUpdate property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getLastUpdate() {
return lastUpdate;
}
/**
* Sets the value of the lastUpdate property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public void setLastUpdate(XMLGregorianCalendar value) {
this.lastUpdate = value;
}
/**
* Gets the value of the preferredLanguage property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPreferredLanguage() {
return preferredLanguage;
}
/**
* Sets the value of the preferredLanguage property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPreferredLanguage(String value) {
this.preferredLanguage = value;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Object }
* {@link Element }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
}

@ -0,0 +1,69 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for CryptoProviders complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="CryptoProviders">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="provider" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CryptoProviders", propOrder = {
"provider"
})
public class CryptoProviders {
@XmlElement(required = true)
protected List<String> provider;
/**
* Gets the value of the provider property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the provider property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getProvider().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getProvider() {
if (provider == null) {
provider = new ArrayList<String>();
}
return this.provider;
}
}

@ -0,0 +1,71 @@
package cdm.api.windows.xcep.beans;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for EnrollmentPermission complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="EnrollmentPermission">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="enroll" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* &lt;element name="autoEnroll" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "EnrollmentPermission", propOrder = {
"enroll",
"autoEnroll"
})
public class EnrollmentPermission {
protected boolean enroll;
protected boolean autoEnroll;
/**
* Gets the value of the enroll property.
*
*/
public boolean isEnroll() {
return enroll;
}
/**
* Sets the value of the enroll property.
*
*/
public void setEnroll(boolean value) {
this.enroll = value;
}
/**
* Gets the value of the autoEnroll property.
*
*/
public boolean isAutoEnroll() {
return autoEnroll;
}
/**
* Sets the value of the autoEnroll property.
*
*/
public void setAutoEnroll(boolean value) {
this.autoEnroll = value;
}
}

@ -0,0 +1,99 @@
package cdm.api.windows.xcep.beans;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for Extension complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="Extension">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="oIDReference" type="{http://www.w3.org/2001/XMLSchema}int"/>
* &lt;element name="critical" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Extension", propOrder = {
"oidReference",
"critical",
"value"
})
public class Extension {
@XmlElement(name = "oIDReference")
protected int oidReference;
protected boolean critical;
@XmlElement(required = true, nillable = true)
protected byte[] value;
/**
* Gets the value of the oidReference property.
*
*/
public int getOIDReference() {
return oidReference;
}
/**
* Sets the value of the oidReference property.
*
*/
public void setOIDReference(int value) {
this.oidReference = value;
}
/**
* Gets the value of the critical property.
*
*/
public boolean isCritical() {
return critical;
}
/**
* Sets the value of the critical property.
*
*/
public void setCritical(boolean value) {
this.critical = value;
}
/**
* Gets the value of the value property.
*
* @return
* possible object is
* byte[]
*/
public byte[] getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* byte[]
*/
public void setValue(byte[] value) {
this.value = value;
}
}

@ -0,0 +1,69 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for ExtensionCollection complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="ExtensionCollection">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="extension" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}Extension" maxOccurs="unbounded"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ExtensionCollection", propOrder = {
"extension"
})
public class ExtensionCollection {
@XmlElement(required = true)
protected List<Extension> extension;
/**
* Gets the value of the extension property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the extension property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getExtension().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Extension }
*
*
*/
public List<Extension> getExtension() {
if (extension == null) {
extension = new ArrayList<Extension>();
}
return this.extension;
}
}

@ -0,0 +1,69 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for FilterOIDCollection complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="FilterOIDCollection">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="oid" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "FilterOIDCollection", propOrder = {
"oid"
})
public class FilterOIDCollection {
@XmlElement(required = true)
protected List<String> oid;
/**
* Gets the value of the oid property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the oid property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getOid().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getOid() {
if (oid == null) {
oid = new ArrayList<String>();
}
return this.oid;
}
}

@ -0,0 +1,92 @@
package cdm.api.windows.xcep.beans;
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;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="client" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}Client"/>
* &lt;element name="requestFilter" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}RequestFilter"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"client",
"requestFilter"
})
@XmlRootElement(name = "GetPolicies")
public class GetPolicies {
@XmlElement(required = true)
protected Client client;
@XmlElement(required = true, nillable = true)
protected RequestFilter requestFilter;
/**
* Gets the value of the client property.
*
* @return
* possible object is
* {@link Client }
*
*/
public Client getClient() {
return client;
}
/**
* Sets the value of the client property.
*
* @param value
* allowed object is
* {@link Client }
*
*/
public void setClient(Client value) {
this.client = value;
}
/**
* Gets the value of the requestFilter property.
*
* @return
* possible object is
* {@link RequestFilter }
*
*/
public RequestFilter getRequestFilter() {
return requestFilter;
}
/**
* Sets the value of the requestFilter property.
*
* @param value
* allowed object is
* {@link RequestFilter }
*
*/
public void setRequestFilter(RequestFilter value) {
this.requestFilter = value;
}
}

@ -0,0 +1,120 @@
package cdm.api.windows.xcep.beans;
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;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType>
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="response" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}Response"/>
* &lt;element name="cAs" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}CACollection"/>
* &lt;element name="oIDs" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}OIDCollection"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"response",
"cAs",
"oiDs"
})
@XmlRootElement(name = "GetPoliciesResponse")
public class GetPoliciesResponse {
@XmlElement(required = true, nillable = true)
protected Response response;
@XmlElement(required = true, nillable = true)
protected CACollection cAs;
@XmlElement(name = "oIDs", required = true, nillable = true)
protected OIDCollection oiDs;
/**
* Gets the value of the response property.
*
* @return
* possible object is
* {@link Response }
*
*/
public Response getResponse() {
return response;
}
/**
* Sets the value of the response property.
*
* @param value
* allowed object is
* {@link Response }
*
*/
public void setResponse(Response value) {
this.response = value;
}
/**
* Gets the value of the cAs property.
*
* @return
* possible object is
* {@link CACollection }
*
*/
public CACollection getCAs() {
return cAs;
}
/**
* Sets the value of the cAs property.
*
* @param value
* allowed object is
* {@link CACollection }
*
*/
public void setCAs(CACollection value) {
this.cAs = value;
}
/**
* Gets the value of the oiDs property.
*
* @return
* possible object is
* {@link OIDCollection }
*
*/
public OIDCollection getOIDs() {
return oiDs;
}
/**
* Sets the value of the oiDs property.
*
* @param value
* allowed object is
* {@link OIDCollection }
*
*/
public void setOIDs(OIDCollection value) {
this.oiDs = value;
}
}

@ -0,0 +1,73 @@
package cdm.api.windows.xcep.beans;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for KeyArchivalAttributes complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="KeyArchivalAttributes">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="symmetricAlgorithmOIDReference" type="{http://www.w3.org/2001/XMLSchema}int"/>
* &lt;element name="symmetricAlgorithmKeyLength" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "KeyArchivalAttributes", propOrder = {
"symmetricAlgorithmOIDReference",
"symmetricAlgorithmKeyLength"
})
public class KeyArchivalAttributes {
protected int symmetricAlgorithmOIDReference;
@XmlSchemaType(name = "unsignedInt")
protected long symmetricAlgorithmKeyLength;
/**
* Gets the value of the symmetricAlgorithmOIDReference property.
*
*/
public int getSymmetricAlgorithmOIDReference() {
return symmetricAlgorithmOIDReference;
}
/**
* Sets the value of the symmetricAlgorithmOIDReference property.
*
*/
public void setSymmetricAlgorithmOIDReference(int value) {
this.symmetricAlgorithmOIDReference = value;
}
/**
* Gets the value of the symmetricAlgorithmKeyLength property.
*
*/
public long getSymmetricAlgorithmKeyLength() {
return symmetricAlgorithmKeyLength;
}
/**
* Sets the value of the symmetricAlgorithmKeyLength property.
*
*/
public void setSymmetricAlgorithmKeyLength(long value) {
this.symmetricAlgorithmKeyLength = value;
}
}

@ -0,0 +1,169 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;
/**
* <p>Java class for OID complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="OID">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="value" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="group" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
* &lt;element name="oIDReferenceID" type="{http://www.w3.org/2001/XMLSchema}int"/>
* &lt;element name="defaultName" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "OID", propOrder = {
"value",
"group",
"oidReferenceID",
"defaultName",
"any"
})
public class OID {
@XmlElement(required = true)
protected String value;
@XmlSchemaType(name = "unsignedInt")
protected long group;
@XmlElement(name = "oIDReferenceID")
protected int oidReferenceID;
@XmlElement(required = true, nillable = true)
protected String defaultName;
@XmlAnyElement(lax = true)
protected List<Object> any;
/**
* Gets the value of the value property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Sets the value of the value property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
/**
* Gets the value of the group property.
*
*/
public long getGroup() {
return group;
}
/**
* Sets the value of the group property.
*
*/
public void setGroup(long value) {
this.group = value;
}
/**
* Gets the value of the oidReferenceID property.
*
*/
public int getOIDReferenceID() {
return oidReferenceID;
}
/**
* Sets the value of the oidReferenceID property.
*
*/
public void setOIDReferenceID(int value) {
this.oidReferenceID = value;
}
/**
* Gets the value of the defaultName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDefaultName() {
return defaultName;
}
/**
* Sets the value of the defaultName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDefaultName(String value) {
this.defaultName = value;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Object }
* {@link Element }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
}

@ -0,0 +1,69 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for OIDCollection complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="OIDCollection">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="oID" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}OID" maxOccurs="unbounded"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "OIDCollection", propOrder = {
"oid"
})
public class OIDCollection {
@XmlElement(name = "oID", required = true)
protected List<OID> oid;
/**
* Gets the value of the oid property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the oid property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getOID().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link OID }
*
*
*/
public List<OID> getOID() {
if (oid == null) {
oid = new ArrayList<OID>();
}
return this.oid;
}
}

@ -0,0 +1,69 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for OIDReferenceCollection complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="OIDReferenceCollection">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="oIDReference" type="{http://www.w3.org/2001/XMLSchema}int" maxOccurs="unbounded"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "OIDReferenceCollection", propOrder = {
"oidReference"
})
public class OIDReferenceCollection {
@XmlElement(name = "oIDReference", type = Integer.class)
protected List<Integer> oidReference;
/**
* Gets the value of the oidReference property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the oidReference property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getOIDReference().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Integer }
*
*
*/
public List<Integer> getOIDReference() {
if (oidReference == null) {
oidReference = new ArrayList<Integer>();
}
return this.oidReference;
}
}

@ -0,0 +1,261 @@
package cdm.api.windows.xcep.beans;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlElementDecl;
import javax.xml.bind.annotation.XmlRegistry;
import javax.xml.namespace.QName;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the com.microsoft.schemas.windows.pki._2009._01.enrollmentpolicy package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
private final static QName _CommonName_QNAME = new QName("http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy", "commonName");
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.microsoft.schemas.windows.pki._2009._01.enrollmentpolicy
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link GetPolicies }
*
*/
public GetPolicies createGetPolicies() {
return new GetPolicies();
}
/**
* Create an instance of {@link Client }
*
*/
public Client createClient() {
return new Client();
}
/**
* Create an instance of {@link RequestFilter }
*
*/
public RequestFilter createRequestFilter() {
return new RequestFilter();
}
/**
* Create an instance of {@link GetPoliciesResponse }
*
*/
public GetPoliciesResponse createGetPoliciesResponse() {
return new GetPoliciesResponse();
}
/**
* Create an instance of {@link Response }
*
*/
public Response createResponse() {
return new Response();
}
/**
* Create an instance of {@link CACollection }
*
*/
public CACollection createCACollection() {
return new CACollection();
}
/**
* Create an instance of {@link OIDCollection }
*
*/
public OIDCollection createOIDCollection() {
return new OIDCollection();
}
/**
* Create an instance of {@link SupersededPolicies }
*
*/
public SupersededPolicies createSupersededPolicies() {
return new SupersededPolicies();
}
/**
* Create an instance of {@link OID }
*
*/
public OID createOID() {
return new OID();
}
/**
* Create an instance of {@link ExtensionCollection }
*
*/
public ExtensionCollection createExtensionCollection() {
return new ExtensionCollection();
}
/**
* Create an instance of {@link Attributes }
*
*/
public Attributes createAttributes() {
return new Attributes();
}
/**
* Create an instance of {@link EnrollmentPermission }
*
*/
public EnrollmentPermission createEnrollmentPermission() {
return new EnrollmentPermission();
}
/**
* Create an instance of {@link CAReferenceCollection }
*
*/
public CAReferenceCollection createCAReferenceCollection() {
return new CAReferenceCollection();
}
/**
* Create an instance of {@link CertificateValidity }
*
*/
public CertificateValidity createCertificateValidity() {
return new CertificateValidity();
}
/**
* Create an instance of {@link CAURICollection }
*
*/
public CAURICollection createCAURICollection() {
return new CAURICollection();
}
/**
* Create an instance of {@link PolicyCollection }
*
*/
public PolicyCollection createPolicyCollection() {
return new PolicyCollection();
}
/**
* Create an instance of {@link Revision }
*
*/
public Revision createRevision() {
return new Revision();
}
/**
* Create an instance of {@link OIDReferenceCollection }
*
*/
public OIDReferenceCollection createOIDReferenceCollection() {
return new OIDReferenceCollection();
}
/**
* Create an instance of {@link CA }
*
*/
public CA createCA() {
return new CA();
}
/**
* Create an instance of {@link CertificateEnrollmentPolicy }
*
*/
public CertificateEnrollmentPolicy createCertificateEnrollmentPolicy() {
return new CertificateEnrollmentPolicy();
}
/**
* Create an instance of {@link CryptoProviders }
*
*/
public CryptoProviders createCryptoProviders() {
return new CryptoProviders();
}
/**
* Create an instance of {@link Extension }
*
*/
public Extension createExtension() {
return new Extension();
}
/**
* Create an instance of {@link FilterOIDCollection }
*
*/
public FilterOIDCollection createFilterOIDCollection() {
return new FilterOIDCollection();
}
/**
* Create an instance of {@link CAURI }
*
*/
public CAURI createCAURI() {
return new CAURI();
}
/**
* Create an instance of {@link RARequirements }
*
*/
public RARequirements createRARequirements() {
return new RARequirements();
}
/**
* Create an instance of {@link PrivateKeyAttributes }
*
*/
public PrivateKeyAttributes createPrivateKeyAttributes() {
return new PrivateKeyAttributes();
}
/**
* Create an instance of {@link KeyArchivalAttributes }
*
*/
public KeyArchivalAttributes createKeyArchivalAttributes() {
return new KeyArchivalAttributes();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
*
*/
@XmlElementDecl(namespace = "http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy", name = "commonName")
public JAXBElement<String> createCommonName(String value) {
return new JAXBElement<String>(_CommonName_QNAME, String.class, null, value);
}
}

@ -0,0 +1,69 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for PolicyCollection complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="PolicyCollection">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="policy" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}CertificateEnrollmentPolicy" maxOccurs="unbounded"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PolicyCollection", propOrder = {
"policy"
})
public class PolicyCollection {
@XmlElement(required = true)
protected List<CertificateEnrollmentPolicy> policy;
/**
* Gets the value of the policy property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the policy property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getPolicy().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link CertificateEnrollmentPolicy }
*
*
*/
public List<CertificateEnrollmentPolicy> getPolicy() {
if (policy == null) {
policy = new ArrayList<CertificateEnrollmentPolicy>();
}
return this.policy;
}
}

@ -0,0 +1,197 @@
package cdm.api.windows.xcep.beans;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for PrivateKeyAttributes complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="PrivateKeyAttributes">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="minimalKeyLength" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
* &lt;element name="keySpec" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
* &lt;element name="keyUsageProperty" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
* &lt;element name="permissions" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="algorithmOIDReference" type="{http://www.w3.org/2001/XMLSchema}int"/>
* &lt;element name="cryptoProviders" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}CryptoProviders"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PrivateKeyAttributes", propOrder = {
"minimalKeyLength",
"keySpec",
"keyUsageProperty",
"permissions",
"algorithmOIDReference",
"cryptoProviders"
})
public class PrivateKeyAttributes {
@XmlSchemaType(name = "unsignedInt")
protected long minimalKeyLength;
@XmlElement(required = true, type = Long.class, nillable = true)
@XmlSchemaType(name = "unsignedInt")
protected Long keySpec;
@XmlElement(required = true, type = Long.class, nillable = true)
@XmlSchemaType(name = "unsignedInt")
protected Long keyUsageProperty;
@XmlElement(required = true, nillable = true)
protected String permissions;
@XmlElement(required = true, type = Integer.class, nillable = true)
protected Integer algorithmOIDReference;
@XmlElement(required = true, nillable = true)
protected CryptoProviders cryptoProviders;
/**
* Gets the value of the minimalKeyLength property.
*
*/
public long getMinimalKeyLength() {
return minimalKeyLength;
}
/**
* Sets the value of the minimalKeyLength property.
*
*/
public void setMinimalKeyLength(long value) {
this.minimalKeyLength = value;
}
/**
* Gets the value of the keySpec property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getKeySpec() {
return keySpec;
}
/**
* Sets the value of the keySpec property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setKeySpec(Long value) {
this.keySpec = value;
}
/**
* Gets the value of the keyUsageProperty property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getKeyUsageProperty() {
return keyUsageProperty;
}
/**
* Sets the value of the keyUsageProperty property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setKeyUsageProperty(Long value) {
this.keyUsageProperty = value;
}
/**
* Gets the value of the permissions property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPermissions() {
return permissions;
}
/**
* Sets the value of the permissions property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPermissions(String value) {
this.permissions = value;
}
/**
* Gets the value of the algorithmOIDReference property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getAlgorithmOIDReference() {
return algorithmOIDReference;
}
/**
* Sets the value of the algorithmOIDReference property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setAlgorithmOIDReference(Integer value) {
this.algorithmOIDReference = value;
}
/**
* Gets the value of the cryptoProviders property.
*
* @return
* possible object is
* {@link CryptoProviders }
*
*/
public CryptoProviders getCryptoProviders() {
return cryptoProviders;
}
/**
* Sets the value of the cryptoProviders property.
*
* @param value
* allowed object is
* {@link CryptoProviders }
*
*/
public void setCryptoProviders(CryptoProviders value) {
this.cryptoProviders = value;
}
}

@ -0,0 +1,112 @@
package cdm.api.windows.xcep.beans;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for RARequirements complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="RARequirements">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="rASignatures" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
* &lt;element name="rAEKUs" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}OIDReferenceCollection"/>
* &lt;element name="rAPolicies" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}OIDReferenceCollection"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RARequirements", propOrder = {
"raSignatures",
"raekUs",
"raPolicies"
})
public class RARequirements {
@XmlElement(name = "rASignatures")
@XmlSchemaType(name = "unsignedInt")
protected long raSignatures;
@XmlElement(name = "rAEKUs", required = true, nillable = true)
protected OIDReferenceCollection raekUs;
@XmlElement(name = "rAPolicies", required = true, nillable = true)
protected OIDReferenceCollection raPolicies;
/**
* Gets the value of the raSignatures property.
*
*/
public long getRASignatures() {
return raSignatures;
}
/**
* Sets the value of the raSignatures property.
*
*/
public void setRASignatures(long value) {
this.raSignatures = value;
}
/**
* Gets the value of the raekUs property.
*
* @return
* possible object is
* {@link OIDReferenceCollection }
*
*/
public OIDReferenceCollection getRAEKUs() {
return raekUs;
}
/**
* Sets the value of the raekUs property.
*
* @param value
* allowed object is
* {@link OIDReferenceCollection }
*
*/
public void setRAEKUs(OIDReferenceCollection value) {
this.raekUs = value;
}
/**
* Gets the value of the raPolicies property.
*
* @return
* possible object is
* {@link OIDReferenceCollection }
*
*/
public OIDReferenceCollection getRAPolicies() {
return raPolicies;
}
/**
* Sets the value of the raPolicies property.
*
* @param value
* allowed object is
* {@link OIDReferenceCollection }
*
*/
public void setRAPolicies(OIDReferenceCollection value) {
this.raPolicies = value;
}
}

@ -0,0 +1,100 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;
/**
* <p>Java class for RequestFilter complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="RequestFilter">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="policyOIDs" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}FilterOIDCollection"/>
* &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "RequestFilter", propOrder = {
"policyOIDs",
"any"
})
public class RequestFilter {
@XmlElement(required = true, nillable = true)
protected FilterOIDCollection policyOIDs;
@XmlAnyElement(lax = true)
protected List<Object> any;
/**
* Gets the value of the policyOIDs property.
*
* @return
* possible object is
* {@link FilterOIDCollection }
*
*/
public FilterOIDCollection getPolicyOIDs() {
return policyOIDs;
}
/**
* Sets the value of the policyOIDs property.
*
* @param value
* allowed object is
* {@link FilterOIDCollection }
*
*/
public void setPolicyOIDs(FilterOIDCollection value) {
this.policyOIDs = value;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Object }
* {@link Element }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
}

@ -0,0 +1,214 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyElement;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import org.w3c.dom.Element;
/**
* <p>Java class for Response complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="Response">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="policyID" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="policyFriendlyName" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="nextUpdateHours" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
* &lt;element name="policiesNotChanged" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
* &lt;element name="policies" type="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}PolicyCollection"/>
* &lt;any processContents='lax' maxOccurs="unbounded" minOccurs="0"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Response", propOrder = {
"policyID",
"policyFriendlyName",
"nextUpdateHours",
"policiesNotChanged",
"policies",
"any"
})
public class Response {
@XmlElement(required = true)
protected String policyID;
@XmlElement(required = true, nillable = true)
protected String policyFriendlyName;
@XmlElement(required = true, type = Long.class, nillable = true)
@XmlSchemaType(name = "unsignedInt")
protected Long nextUpdateHours;
@XmlElement(required = true, type = Boolean.class, nillable = true)
protected Boolean policiesNotChanged;
@XmlElement(required = true, nillable = true)
protected PolicyCollection policies;
@XmlAnyElement(lax = true)
protected List<Object> any;
/**
* Gets the value of the policyID property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPolicyID() {
return policyID;
}
/**
* Sets the value of the policyID property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPolicyID(String value) {
this.policyID = value;
}
/**
* Gets the value of the policyFriendlyName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getPolicyFriendlyName() {
return policyFriendlyName;
}
/**
* Sets the value of the policyFriendlyName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setPolicyFriendlyName(String value) {
this.policyFriendlyName = value;
}
/**
* Gets the value of the nextUpdateHours property.
*
* @return
* possible object is
* {@link Long }
*
*/
public Long getNextUpdateHours() {
return nextUpdateHours;
}
/**
* Sets the value of the nextUpdateHours property.
*
* @param value
* allowed object is
* {@link Long }
*
*/
public void setNextUpdateHours(Long value) {
this.nextUpdateHours = value;
}
/**
* Gets the value of the policiesNotChanged property.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isPoliciesNotChanged() {
return policiesNotChanged;
}
/**
* Sets the value of the policiesNotChanged property.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setPoliciesNotChanged(Boolean value) {
this.policiesNotChanged = value;
}
/**
* Gets the value of the policies property.
*
* @return
* possible object is
* {@link PolicyCollection }
*
*/
public PolicyCollection getPolicies() {
return policies;
}
/**
* Sets the value of the policies property.
*
* @param value
* allowed object is
* {@link PolicyCollection }
*
*/
public void setPolicies(PolicyCollection value) {
this.policies = value;
}
/**
* Gets the value of the any property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the any property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getAny().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Object }
* {@link Element }
*
*
*/
public List<Object> getAny() {
if (any == null) {
any = new ArrayList<Object>();
}
return this.any;
}
}

@ -0,0 +1,74 @@
package cdm.api.windows.xcep.beans;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for Revision complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="Revision">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element name="majorRevision" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
* &lt;element name="minorRevision" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Revision", propOrder = {
"majorRevision",
"minorRevision"
})
public class Revision {
@XmlSchemaType(name = "unsignedInt")
protected long majorRevision;
@XmlSchemaType(name = "unsignedInt")
protected long minorRevision;
/**
* Gets the value of the majorRevision property.
*
*/
public long getMajorRevision() {
return majorRevision;
}
/**
* Sets the value of the majorRevision property.
*
*/
public void setMajorRevision(long value) {
this.majorRevision = value;
}
/**
* Gets the value of the minorRevision property.
*
*/
public long getMinorRevision() {
return minorRevision;
}
/**
* Sets the value of the minorRevision property.
*
*/
public void setMinorRevision(long value) {
this.minorRevision = value;
}
}

@ -0,0 +1,69 @@
package cdm.api.windows.xcep.beans;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for SupersededPolicies complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* &lt;complexType name="SupersededPolicies">
* &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence>
* &lt;element ref="{http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy}commonName" maxOccurs="unbounded"/>
* &lt;/sequence>
* &lt;/restriction>
* &lt;/complexContent>
* &lt;/complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SupersededPolicies", propOrder = {
"commonName"
})
public class SupersededPolicies {
@XmlElement(required = true)
protected List<String> commonName;
/**
* Gets the value of the commonName property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the commonName property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getCommonName().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getCommonName() {
if (commonName == null) {
commonName = new ArrayList<String>();
}
return this.commonName;
}
}

@ -0,0 +1,2 @@
@javax.xml.bind.annotation.XmlSchema(namespace = "http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
package cdm.api.windows.xcep.beans;

@ -0,0 +1,79 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.xcep.impl;
import cdm.api.windows.xcep.IPolicy;
import cdm.api.windows.xcep.beans.*;
import javax.jws.WebService;
import javax.xml.ws.BindingType;
import javax.xml.ws.Holder;
import javax.xml.ws.soap.Addressing;
import javax.xml.ws.soap.SOAPBinding;
@WebService(endpointInterface = "cdm.api.windows.xcep.IPolicy", targetNamespace = "http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy")
@Addressing(enabled = true, required = true)
@BindingType(value = SOAPBinding.SOAP12HTTP_BINDING)
public class xcepimpl implements IPolicy {
@Override
public void getPolicies(Client client, RequestFilter requestFilter,
Holder<Response> response, Holder<CACollection> cAs,
Holder<OIDCollection> oIDs) {
System.out.println("CHECKED_SERVICE");
Response rs = new Response();
OIDCollection oidc = new OIDCollection();
CACollection cac = new CACollection();
PolicyCollection pc = new PolicyCollection();
CertificateEnrollmentPolicy cnp = new CertificateEnrollmentPolicy();
Attributes at = new Attributes();
PrivateKeyAttributes pkat = new PrivateKeyAttributes();
pkat.setMinimalKeyLength(2048);
at.setPolicySchema(3);
at.setPrivateKeyAttributes(pkat);
at.setHashAlgorithmOIDReference(0);
cnp.setPolicyOIDReference(0);
cnp.setAttributes(at);
pc.getPolicy().add(cnp);
rs.setPolicies(pc);
response.value = rs;
OID oid = new OID();
oid.setValue("1.3.14.3.2.29");
oid.setGroup(1);
oid.setOIDReferenceID(0);
oid.setDefaultName("szOID_OIWSEC_sha1RSASign");
oidc.getOID().add(oid);
cAs.value = cac;
oIDs.value = oidc;
}
}

@ -0,0 +1,58 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.xcep.util;
import java.util.HashSet;
import java.util.Set;
import javax.xml.namespace.QName;
import javax.xml.ws.handler.MessageContext;
import javax.xml.ws.handler.soap.SOAPHandler;
import javax.xml.ws.handler.soap.SOAPMessageContext;
public class PPSRSOApMessageHandler implements SOAPHandler<SOAPMessageContext> {
@Override
public Set<QName> getHeaders() {
final QName securityHeader = new QName(
"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd",
"Security",
"wsse");
final HashSet headers = new HashSet();
headers.add(securityHeader);
System.out.println("CHECKED_HEADER");
return headers;
}
@Override public boolean handleMessage(SOAPMessageContext context) {
return true;
}
@Override public boolean handleFault(SOAPMessageContext context) {
return true;
}
@Override public void close(MessageContext context) {
}
}

@ -0,0 +1,40 @@
/*
* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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 cdm.api.windows.xcep.util;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.UnsupportedCallbackException;
import java.io.IOException;
import org.apache.wss4j.common.ext.WSPasswordCallback;
public class ServerPasswordCallback implements CallbackHandler {
@Override public void handle(Callback[] callbacks)
throws IOException, UnsupportedCallbackException {
WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
System.out.println("CHECKED_BEFORE_IF_SECURITY");
if ("asok@wso2.com".equals(pc.getIdentifier())) {
System.out.println("CHECKED_IF_SECURITY");
pc.setPassword("admin");
}
}
}

@ -1,52 +0,0 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
xmlns:sec="http://cxf.apache.org/configuration/security"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://cxf.apache.org/transports/http-jetty/configuration
http://cxf.apache.org/schemas/configuration/http-jetty.xsd
http://cxf.apache.org/transports/http/configuration
http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://cxf.apache.org/transports/http-jetty/configuration
http://cxf.apache.org/schemas/configuration/security.xsd
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml"/>
<import resource="classpath:META-INF/cxf/cxf-extension-xml.xml"/>
<import resource="classpath:META-INF/cxf/cxf-servlet.xml"/>
<context:property-placeholder location="classpath:windows-mdm-server.properties"/>
<bean id="discoveryService" class="cdm.api.windows.impl.DiscoveryServiceImpl">
<property name="discoveryServiceFileName" value="${discovery.service.file.location}"/>
</bean>
<bean id="userEnrollmentService" class="cdm.api.windows.impl.EnrolmentServiceImpl" init-method="init">
<property name="enrollmentResponseFile" value="${enrollment.service.file.location}"/>
<property name="responseFile" value="${policy.certificate.file.location}"/>
<property name="wapProvisioningXmlFile" value="${enrollment.service.wap.provisioning.file.location}"/>
<property name="privatePemKeyFilePath" value="./conf/ca_private.key"/>
<property name="caCertificateFilePath" value="./conf/ca_cert.pem"/>
</bean>
<jaxrs:server name="windowsMDMRest" address="${service.url}">
<jaxrs:serviceBeans>
<ref bean="discoveryService"/>
<ref bean="userEnrollmentService"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean="jaxbProvider"/>
</jaxrs:providers>
</jaxrs:server>
<bean id="jaxbProvider" class="org.apache.cxf.jaxrs.provider.JAXBElementProvider">
</bean>
</beans>

@ -1,20 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIDXDCCAkQCCQDWxw0vNF9H8DANBgkqhkiG9w0BAQUFADBwMQswCQYDVQQGEwJM
SzEQMA4GA1UECBMHQ29sb21ibzEQMA4GA1UEBxMHQ29sb21ibzENMAsGA1UEChME
d3NvMjEPMA0GA1UECxMGbW9iaWxlMR0wGwYDVQQDFBRjYV93c28yV2luZG93c01v
YmlsZTAeFw0xNDA3MDcxMDE4MDhaFw0xNTA3MDcxMDE4MDhaMHAxCzAJBgNVBAYT
AkxLMRAwDgYDVQQIEwdDb2xvbWJvMRAwDgYDVQQHEwdDb2xvbWJvMQ0wCwYDVQQK
EwR3c28yMQ8wDQYDVQQLEwZtb2JpbGUxHTAbBgNVBAMUFGNhX3dzbzJXaW5kb3dz
TW9iaWxlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAz+w93X1S8nOM
VM3ScGP8XY9+PnoUaFZgKaD3d9Z6cj4HPKjIzv8iTMx9JBfDjSsLiks5nJqxm1in
juck7n0tl/CZ5L2j/3DhsA4D0Ngp5JsH5ZF+Vu2T+z8wUq8UwGD6qsn/EP9jBbj/
WN0TtOPcfhOhfJVxaNOrt+9htYad9WOeU8Rh+CIb5oQrigEd417e5d5j4wcU8QLj
sVQQ8WRCYDrnKKof834ZnViBYX4UAdLtXkWFtKcD0RM/cB2LdjydwP3HEj6pkwjT
hRLGHdVF21VCbKOF6mnQagvuseT/ynioBNY60TXb283BQ6YrDfMytvRuzguEQ/7/
AsTPclNZxQIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQB3cwy5pibn009WvAYzmw9B
oB77bt21GQO4gFLJlNkvIRrneE5SinjoO6ezWOgY3+8t9ViNeD874momq4kuE6Hb
XDZE1qqinJlqfMJQuEaFkDZKg55kO66wy5+8ioFhA9V8SpeM+SYy3ENBucxiDLQE
ZhM7RKJCpSIq0rRHJyBRbs6GoW7cOB5QQcFDfSW+/CajicWzeD/OJMIfjJezCsZ8
GNXJpyAS/Te+ysHlfmrKMb1VMZphFNiTmpEx8OI8F/kbhmdwePaZ3SOw2kJp8e3v
Ke4/zPwB95wjz8luzU+PbqNO2K4ZKtXHk6rx5yybR1UBpYINvUEjsRI3hgy1IoE+
-----END CERTIFICATE-----

@ -1,27 +0,0 @@
-----BEGIN RSA PRIVATE KEY-----
MIIEpAIBAAKCAQEAz+w93X1S8nOMVM3ScGP8XY9+PnoUaFZgKaD3d9Z6cj4HPKjI
zv8iTMx9JBfDjSsLiks5nJqxm1injuck7n0tl/CZ5L2j/3DhsA4D0Ngp5JsH5ZF+
Vu2T+z8wUq8UwGD6qsn/EP9jBbj/WN0TtOPcfhOhfJVxaNOrt+9htYad9WOeU8Rh
+CIb5oQrigEd417e5d5j4wcU8QLjsVQQ8WRCYDrnKKof834ZnViBYX4UAdLtXkWF
tKcD0RM/cB2LdjydwP3HEj6pkwjThRLGHdVF21VCbKOF6mnQagvuseT/ynioBNY6
0TXb283BQ6YrDfMytvRuzguEQ/7/AsTPclNZxQIDAQABAoIBAQCrNz+Od1fpnOrv
Hnnu4Pb82F+99Ot/K7mOLiX6Qdyc3KU690Y85m2JTk6yfPsj8VFUdTOg2OXuJWf9
TivkU6JK3u7rJJq6i2rdffz4aji9Lkina1LdJFBacaNKQzBUZsekAiiPB660FK34
sDw9FfIIxAOTwsAb8UoTcgVE5PCIEx7R7YdAI0/mMnd98kTc2YdcnAmGwrDFQNer
eOLhq8H/6SxUADyos3s6Tgw3/yIo9BnBpe8uPNoakEPgYJLh263uF2rJ2h0+yLDV
9F9by+yFCqyVqS8P06NI+NMe8WsYJo99RGQsLZ7PsI5jiJSTRYgOF4ROQfAcCZiK
UWKCwcwhAoGBAPOg32J8AZX64FFDqyruN/1Q6hJfkVAVM+B3dxNAYIpccLuuxJ7x
JMIWkAFfBlOoaXZzxaDIXmXrd3h5qxRTd6W/gAR9nRko7YHaK7NszpEPA8hVOjjx
kkTNs/KjlELrLspRWL+iDqR5Nscw0V9y2D6tyYuGp475wK4PmKbgcKAdAoGBANp7
M9nFEAUTeHzdo9csbrGy6wUuCRlixFvXKOH+1ezeuNvxh0XtbJPj7FrPT4nuCKEV
Wud1w3/IRaeCYeKXaHk6eF8zN1gVkN0MAQJ+9KtfZ0QnmQSsluJfrUBGej6UYO0z
DUv5CLNYLPwOVGTb/jb5n+lY2IzjKmA+aWZRML/JAoGBAJSfUycVVzJTdXydt1Hd
OTLDpcfHnTIpfRg2SOHpp/tAIVWdbD06Bp6QfREZExb96jhkr+9BzLSITL2mG4Ou
15K5nDMhHjE3Eozgt0Ah5HIBouEXfQk39W8bvecLe2rHZifuMCHXju8vMweY9GEy
AlFaW1VOs/E40x5cTVegG5TRAoGANLxmUJtTeZYwkBtDr+2GrpfcSLzK73i6otx1
fs9vPaSpBFXxa/yaJ7xtUaIWtdlh9dfcwF/Zl590yLEdBX+8dP6bDYekRTu3YtPB
7qNMVY1KtNXGBq3OIcgsXoZkfXR9TOP0wrDS289d1F11G39KhmSMp9uNMbynfuGx
uUPBu5kCgYA1UUtQkVPbkKaaopSrDkqAJDlsUnNVkvXH5yWqdAYI2Frw1iOwhED3
cKmwAejf8nl1HPwfDTGQMRB5PCDkK7mWJ5w9W4MUbJ7ZiNPHloZutUTcw3Nz58cn
OZMZGR/Trtn+YLoj2526NPwKqlw0bRB27UR0KOdgPOHynI3uYPnwgQ==
-----END RSA PRIVATE KEY-----

@ -1,27 +0,0 @@
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope"
xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action s:mustUnderstand="1">
http://schemas.microsoft.com/windows/management/2012/01/enrollment/IDiscoveryService/DiscoverResponse
</a:Action>
<ActivityId>
d9eb2fdd-e38a-46ee-bd93-aea9dc86a3b8
</ActivityId>
<a:RelatesTo>urn:uuid: 748132ec-a575-4329-b01b-6171a9cf8478</a:RelatesTo>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<DiscoverResponse
xmlns="http://schemas.microsoft.com/windows/management/2012/01/enrollment">
<DiscoverResult>
<AuthPolicy>OnPremise</AuthPolicy>
<EnrollmentPolicyServiceUrl>
https://EnterpriseEnrollment.wso2.com/ENROLLMENTSERVER/PolicyEnrollmentWebservice.svc
</EnrollmentPolicyServiceUrl>
<EnrollmentServiceUrl>
https://EnterpriseEnrollment.wso2.com/ENROLLMENTSERVER/DeviceEnrollmentWebservice.svc
</EnrollmentServiceUrl>
</DiscoverResult>
</DiscoverResponse>
</s:Body>
</s:Envelope>

@ -1,27 +0,0 @@
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:a="http://www.w3.org/2005/08/addressing"
xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:Header>
<Action s:mustUnderstand="1">http://schemas.microsoft.com/windows/pki/2009/01/enrollment/RSTRC/wstep</Action>
<a:RelatesTo>urn:uuid:81a5419a-496b-474f-a627-5cdd33eed8ab</a:RelatesTo>
<o:Security s:mustUnderstand="1" xmlns:o="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<u:Timestamp u:Id="_0">
<u:Created>2012-08-02T00:32:59.420Z</u:Created>
<u:Expires>2014-08-02T00:37:59.420Z</u:Expires>
</u:Timestamp>
</o:Security>
</s:Header>
<s:Body>
<RequestSecurityTokenResponseCollection xmlns="http://docs.oasis-open.org/ws-sx/ws-trust/200512">
<RequestSecurityTokenResponse>
<TokenType>http://schemas.microsoft.com/5.0.0.0/ConfigurationManager/Enrollment/DeviceEnrollmentToken</TokenType>
<RequestedSecurityToken>
<BinarySecurityToken ValueType="http://schemas.microsoft.com/5.0.0.0/ConfigurationManager/Enrollment/DeviceEnrollmentProvisionDoc"
EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd#base64binary"
xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
</BinarySecurityToken>
</RequestedSecurityToken>
<RequestID xmlns="http://schemas.microsoft.com/windows/pki/2009/01/enrollment">0</RequestID>
</RequestSecurityTokenResponse>
</RequestSecurityTokenResponseCollection>
</s:Body>
</s:Envelope>

@ -1,50 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="false" xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="error" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="logs/windows_mdm_error.log"/>
<param name="Threshold" value="error"/>
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{DATE} %-5p %c{1} - [%x] %m%n"/>
</layout>
</appender>
<appender name="debug" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="logs/windows_mdm_debug.log"/>
<param name="Threshold" value="debug"/>
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{DATE} %-5p %c{1} - [%x] %m%n"/>
</layout>
</appender>
<appender name="trans" class="org.apache.log4j.DailyRollingFileAppender">
<param name="File" value="logs/windows_mdm__trans.log" />
<param name="Threshold" value="info" />
<param name="DatePattern" value="'.'yyyy-MM-dd" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%m%n" />
</layout>
</appender>
<category name="org.apache.cxf" additivity="false">
<priority value="trace"/>
<appender-ref ref="debug"/>
<appender-ref ref="error"/>
</category>
<category name="org.springframework" additivity="false">
<priority value="info"/>
<appender-ref ref="error"/>
</category>
<root>
<appender-ref ref="debug"/>
<appender-ref ref="error"/>
</root>
</log4j:configuration>

@ -1,15 +0,0 @@
<s:Envelope
xmlns:a="http://www.w3.org/2005/08/addressing"
xmlns:s="http://www.w3.org/2003/05/soap-envelope">
<s:Header>
<a:Action s:mustUnderstand="1">
http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy/IPolicy/GetPoliciesResponse
</a:Action>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<GetPoliciesResponse xmlns="http://schemas.microsoft.com/windows/pki/2009/01/enrollmentpolicy">
</GetPoliciesResponse>
</s:Body>
</s:Envelope>

@ -1,3 +1,21 @@
<!--
~ Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. 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.
-->
<wap-provisioningdoc version="1.1">
<characteristic type="CertificateStore">
<characteristic type="Root">

@ -1,8 +0,0 @@
service.url=http://0.0.0.0:9090
discovery.service.file.location=./conf/discover-service.xml
policy.certificate.file.location=./conf/policy-service.xml
enrollment.service.file.location=./conf/enrollment-service.xml
enrollment.service.wap.provisioning.file.location=./conf/wap-provisioning.xml

@ -1,44 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ /*
~ * Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~ *
~ * WSO2 Inc. 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.
~ */
~ Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. 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.
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
<jaxrs:server id="ServiceDiscoveryService" address="/devices">
<jaxrs:serviceBeans>
<ref bean="ServiceDiscoveryServiceBean"/>
</jaxrs:serviceBeans>
</jaxrs:server>
<jaxrs:server id="enrollmentService" address="/enrollment">
<jaxws:endpoint
id="DiscoveryService"
implementor="cdm.api.windows.DiscoveryService.impl.DiscoveryServiceGetImpl"
address="/test/send"/>
<jaxrs:server id="DiscoveryService_rest" address="/test/send2">
<jaxrs:serviceBeans>
<ref bean="enrollmentServiceBean"/>
<ref bean="DiscoveryService_rest_bean"/>
</jaxrs:serviceBeans>
</jaxrs:server>
<bean id="ServiceDiscoveryServiceBean" class="cdm.api.windows.impl.DiscoveryServiceImpl"/>
<bean id="enrollmentServiceBean" class="cdm.api.windows.impl.EnrolmentServiceImpl"/>
<bean id="DiscoveryService_rest_bean" class="cdm.api.windows.DiscoveryService.impl.DiscoveryServiceGetImpl"/>
<jaxws:endpoint
id="EnrollmentPolicyService"
implementor="cdm.api.windows.xcep.impl.xcepimpl"
address="/test/xcep">
<jaxws:inInterceptors>
<ref bean="wss4jInInterceptor1"/>
</jaxws:inInterceptors>
</jaxws:endpoint>
<bean id="wss4jInInterceptor1" class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
<property name="properties">
<map>
<entry key="action" value="UsernameToken"/>
<entry key="passwordType" value="PasswordText"/>
<entry key="isBSPCompliant" value="false"/>
<entry key="allowNamespaceQualifiedPasswordTypes"
value="true"/>
<entry key="passwordCallbackRef" value-ref="passwordCallback1"/>
</map>
</property>
</bean>
<bean id="passwordCallback1" class="cdm.api.windows.xcep.util.ServerPasswordCallback"/>
<jaxws:endpoint
id="CertificateEnrollmentService"
implementor="cdm.api.windows.wstep.impl.CertificateEnrollmentServiceImpl"
address="/cert">
<jaxws:inInterceptors>
<ref bean="wss4jInInterceptor2"/>
</jaxws:inInterceptors>
</jaxws:endpoint>
<bean id="wss4jInInterceptor2" class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
<property name="properties">
<map>
<entry key="action" value="UsernameToken"/>
<entry key="passwordType" value="PasswordText"/>
<entry key="isBSPCompliant" value="false"/>
<entry key="allowNamespaceQualifiedPasswordTypes"
value="true"/>
<entry key="passwordCallbackRef" value-ref="passwordCallback2"/>
</map>
</property>
</bean>
<bean id="passwordCallback2" class="cdm.api.windows.wstep.util.PasswordCallbackHandler"/>
</beans>

@ -20,10 +20,16 @@
-->
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
<display-name>CDM-Windows-API</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/cxf-servlet.xml</param-value>
</context-param>
<servlet>
<description>JAX-WS/JAX-RS Endpoint</description>
<display-name>JAX-WS/JAX-RS Servlet</display-name>
<servlet-name>JAXServlet</servlet-name>
<description>JAX-WS/JAX-RS-windows Endpoint</description>
<display-name>JAX-WS/JAX-RS-windows Servlet</display-name>
<servlet-name>JAXServlet-windows</servlet-name>
<servlet-class>
org.apache.cxf.transport.servlet.CXFServlet
</servlet-class>
@ -34,7 +40,7 @@
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>JAXServlet</servlet-name>
<servlet-name>JAXServlet-windows</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<session-config>

@ -1,117 +0,0 @@
@CHARSET "ISO-8859-1";
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
html {
background: #efefef;
}
body {
line-height: 1;
width:960px;
margin:auto;
background:white;
padding:10px;
box-shadow:0px 0px 5px #CCC;
font-family:"Lucida Grande","Lucida Sans","Microsoft Sans Serif", "Lucida Sans Unicode","Verdana","Sans-serif","trebuchet ms" !important;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
width:960px;
border:solid 1px #ccc;
}
table a {
font-size:12px;
color:#1e90ff;
padding:7px;
float:left;
;
}
.heading {
font-size: 18px;
margin-top: 20px;
float:left;
color:#0067B1;
margin-bottom:20px;
padding-top:20px;
}
.field {
font-weight: normal;
width:120px;
font-size:12px;
float:left;
padding:7px;
clear:left;
}
.value {
font-weight: bold;
font-size:12px;
float:left;
padding:7px;
clear:right;
}
.porttypename {
font-weight: bold;
font-size:14px;
}
UL {
margin-top: 0;
}
LI {
font-weight: normal;
font-size:12px;
margin-top:10px;
}
TD {
border:1px solid #ccc;
vertical-align: text-top;
padding: 5px;
}
Loading…
Cancel
Save