summaryrefslogtreecommitdiff
path: root/BKUOnline
diff options
context:
space:
mode:
authormcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-08-29 12:11:34 +0000
committermcentner <mcentner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-08-29 12:11:34 +0000
commit32d17447a258188b2d534bcb0bf65a659ba7b7d0 (patch)
tree4ad8bb267eb29f7091a7da283f6d7eec1e2188e1 /BKUOnline
downloadmocca-32d17447a258188b2d534bcb0bf65a659ba7b7d0.tar.gz
mocca-32d17447a258188b2d534bcb0bf65a659ba7b7d0.tar.bz2
mocca-32d17447a258188b2d534bcb0bf65a659ba7b7d0.zip
Initial import.
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUOnline')
-rw-r--r--BKUOnline/catalog.xml4
-rw-r--r--BKUOnline/nb-configuration.xml15
-rw-r--r--BKUOnline/pom.xml120
-rw-r--r--BKUOnline/private/cache/retriever/catalog.xml5
-rw-r--r--BKUOnline/private/cache/retriever/java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd362
-rw-r--r--BKUOnline/private/cache/retriever/www.w3.org/2001/XMLSchema.xsd2534
-rw-r--r--BKUOnline/src/main/custom-binding/stalservice-custom.xml102
-rw-r--r--BKUOnline/src/main/custom-binding/staltypes-custom.xml70
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/Configurator.java69
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/BKURequestHandler.java91
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ResultServlet.java120
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/SessionTimeout.java49
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/SpringBKUServlet.java31
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/RequestBrokerSTALFactory.java38
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBroker.java43
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java554
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALServiceImpl.java220
-rw-r--r--BKUOnline/src/main/resources/commons-logging.properties16
-rw-r--r--BKUOnline/src/main/resources/log4j.properties34
-rw-r--r--BKUOnline/src/main/webapp/HTTP-ohne.html85
-rw-r--r--BKUOnline/src/main/webapp/META-INF/MANIFEST.MF3
-rw-r--r--BKUOnline/src/main/webapp/META-INF/context.xml18
-rw-r--r--BKUOnline/src/main/webapp/WEB-INF/applicationContext.xml43
-rw-r--r--BKUOnline/src/main/webapp/WEB-INF/sun-jaxws.xml36
-rw-r--r--BKUOnline/src/main/webapp/WEB-INF/web.xml97
-rw-r--r--BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.wsdl82
-rw-r--r--BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.xsd135
-rw-r--r--BKUOnline/src/main/webapp/appletPage.jsp65
-rw-r--r--BKUOnline/src/main/webapp/expired.html28
-rw-r--r--BKUOnline/src/main/webapp/index.html59
-rw-r--r--BKUOnline/src/main/webapp/js/deployJava.js886
-rw-r--r--BKUOnline/src/test/java/at/gv/egiz/stal/service/STALRequestBrokerTest.java362
32 files changed, 6376 insertions, 0 deletions
diff --git a/BKUOnline/catalog.xml b/BKUOnline/catalog.xml
new file mode 100644
index 00000000..38c98894
--- /dev/null
+++ b/BKUOnline/catalog.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
+ <nextCatalog catalog="private/cache/retriever/catalog.xml"/>
+</catalog> \ No newline at end of file
diff --git a/BKUOnline/nb-configuration.xml b/BKUOnline/nb-configuration.xml
new file mode 100644
index 00000000..4bfb3c58
--- /dev/null
+++ b/BKUOnline/nb-configuration.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-shared-configuration>
+This file contains additional configuration written by modules in the NetBeans IDE.
+The configuration is intended to be shared among all the users of project and
+therefore it is assumed to be part of version control checkout.
+Without this configuration present, some functionality in the IDE may be limited or fail altogether.
+
+
+<spring-data xmlns="http://www.netbeans.org/ns/spring-data/1">
+ <config-files>
+ <config-file>src/main/webapp/WEB-INF/applicationContext.xml</config-file>
+ </config-files>
+ <config-file-groups/>
+ </spring-data>
+</project-shared-configuration>
diff --git a/BKUOnline/pom.xml b/BKUOnline/pom.xml
new file mode 100644
index 00000000..dacdbaf5
--- /dev/null
+++ b/BKUOnline/pom.xml
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>bku</artifactId>
+ <groupId>at.gv.egiz</groupId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>at.gv.egiz</groupId>
+ <artifactId>BKUOnline</artifactId>
+ <packaging>war</packaging>
+ <name>BKU Online</name>
+ <version>1.0-SNAPSHOT</version>
+ <dependencies>
+ <dependency>
+ <groupId>at.gv.egiz</groupId>
+ <artifactId>bkucommon</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>2.5.5</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>2.5.5</version>
+ </dependency>
+ <dependency>
+ <groupId>at.gv.egiz</groupId>
+ <artifactId>STALService</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+ <!--
+ | see https://wsit.dev.java.net/issues/show_bug.cgi?id=970
+ -->
+ <dependency>
+ <groupId>com.sun.xml.ws</groupId>
+ <!--artifactId>webservices-rt</artifactId>
+ <version>1.2</version-->
+ <artifactId>jaxws-rt</artifactId>
+ <version>2.1.4</version>
+ </dependency>
+ <!--dependency>
+ <groupId>at.gv.egiz</groupId>
+ <artifactId>BKUApplet</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency-->
+ </dependencies>
+ <properties>
+ <netbeans.hint.deploy.server>Tomcat60</netbeans.hint.deploy.server>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copyapplet</id>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>at.gv.egiz</groupId>
+ <artifactId>BKUApplet</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </artifactItem>
+ <artifactItem>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </artifactItem>
+ </artifactItems>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}/applet</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!--plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>jaxws-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>wsimport</goal>
+ </goals>
+ <configuration>
+ <verbose>true</verbose>
+ <bindingDirectory>${basedir}/src/main/custom-binding</bindingDirectory>
+ <bindingFiles>
+ <bindingFile>stalservice-custom.xml</bindingFile>
+ <bindingFile>staltypes-custom.xml</bindingFile>
+ </bindingFiles>
+ <wsdlDirectory>${basedir}/src/main/webapp/WEB-INF/wsdl</wsdlDirectory>
+ <wsdlFiles>
+ <wsdlFile>stal.wsdl</wsdlFile>
+ </wsdlFiles>
+ <sourceDestDir>${project.build.directory}/generated-sources/wsimport</sourceDestDir>
+ <staleFile>${project.build.directory}/generated-sources/wsimport/.staleFlag</staleFile>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin-->
+ </plugins>
+ </build>
+</project>
diff --git a/BKUOnline/private/cache/retriever/catalog.xml b/BKUOnline/private/cache/retriever/catalog.xml
new file mode 100644
index 00000000..c40b0d50
--- /dev/null
+++ b/BKUOnline/private/cache/retriever/catalog.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
+ <system systemId="http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd" uri="java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd"/>
+ <system systemId="http://www.w3.org/2001/XMLSchema.xsd" uri="www.w3.org/2001/XMLSchema.xsd"/>
+</catalog> \ No newline at end of file
diff --git a/BKUOnline/private/cache/retriever/java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd b/BKUOnline/private/cache/retriever/java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
new file mode 100644
index 00000000..f9a884c0
--- /dev/null
+++ b/BKUOnline/private/cache/retriever/java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
@@ -0,0 +1,362 @@
+<?xml version = "1.0" encoding = "UTF-8"?>
+<xs:schema
+ targetNamespace = "http://java.sun.com/xml/ns/jaxb"
+ xmlns:jaxb = "http://java.sun.com/xml/ns/jaxb"
+ xmlns:xs = "http://www.w3.org/2001/XMLSchema"
+ elementFormDefault = "qualified"
+ attributeFormDefault = "unqualified">
+ <xs:annotation><xs:documentation>
+ Schema for JAXB 2.0 binding declarations.
+ </xs:documentation></xs:annotation>
+ <xs:group name = "declaration">
+ <xs:annotation><xs:documentation>
+Model group that represents a binding declaration. Each new binding
+declaration added to the jaxb namespace that is not restricted to
+globalBindings should be added as a child element to this model group.
+ </xs:documentation></xs:annotation>
+ <!-- each new binding declaration, not restricted to
+ globalBindings, should be added here -->
+ <xs:choice>
+ <xs:element ref = "jaxb:globalBindings"/>
+ <xs:element ref = "jaxb:schemaBindings"/>
+ <xs:element ref = "jaxb:class"/>
+ <xs:element ref = "jaxb:property"/>
+ <xs:element ref = "jaxb:typesafeEnumClass"/>
+ <xs:element ref = "jaxb:typesafeEnumMember"/>
+ <xs:element ref = "jaxb:javaType"/>
+ <xs:element ref = "jaxb:dom"/>
+ <xs:element ref = "jaxb:inlineBinaryData"/>
+ <xs:any namespace = "##other" processContents = "lax"/>
+ </xs:choice>
+ </xs:group>
+ <xs:attribute name = "version" type="xs:token" >
+ <xs:annotation><xs:documentation>
+Used to specify the version of the binding schema on the schema element for
+inline annotations or jaxb:bindings for external binding.
+ </xs:documentation></xs:annotation>
+ </xs:attribute>
+ <xs:attributeGroup name = "propertyAttributes">
+ <xs:annotation><xs:documentation>
+Attributes used for property customization. The attribute group can be
+referenced either from the globalBindings declaration or from the
+property declaration. The following defaults are defined by the JAXB
+specification in global scope only. Thus they apply when the
+propertyAttributes group is referenced from the globalBindings declaration
+but not when referenced from the property declaration.
+ collectionType a class that implements java.util.List.
+ fixedAttributeAsConstantProperty false
+ enableFailFastCheck false
+ generateIsSetMethod false
+ optionalProperty wrapper
+ generateElementProperty false
+ attachmentRef default
+ </xs:documentation></xs:annotation>
+ <xs:attribute name = "collectionType" type="jaxb:referenceCollectionType"/>
+ <xs:attribute name = "fixedAttributeAsConstantProperty" type = "xs:boolean"/>
+ <xs:attribute name = "enableFailFastCheck" type = "xs:boolean"/>
+ <xs:attribute name = "generateIsSetMethod" type = "xs:boolean"/>
+ <xs:attribute name = "optionalProperty">
+ <xs:simpleType>
+ <xs:restriction base="xs:NCName">
+ <xs:enumeration value="wrapper"/>
+ <xs:enumeration value="primitive"/>
+ <xs:enumeration value="isSet"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name = "generateElementProperty" type="xs:boolean"/>
+ <xs:attribute name = "attachmentRef">
+ <xs:simpleType>
+ <xs:restriction base="xs:NCName">
+ <xs:enumeration value="resolve"/>
+ <xs:enumeration value="doNotResolve"/>
+ <xs:enumeration value="default"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:attributeGroup>
+ <xs:attributeGroup name = "XMLNameToJavaIdMappingDefaults">
+ <xs:annotation><xs:documentation>Customize XMLNames to Java id mapping
+ </xs:documentation></xs:annotation>
+ <xs:attribute name = "underscoreBinding" default = "asWordSeparator" type = "jaxb:underscoreBindingType"/>
+ </xs:attributeGroup>
+ <xs:attributeGroup name = "typesafeEnumClassDefaults">
+ <xs:attribute name = "typesafeEnumMemberName" default = "skipGeneration" type = "jaxb:typesafeEnumMemberNameType"/>
+ <xs:attribute name = "typesafeEnumBase" default = "xs:string" type = "jaxb:typesafeEnumBaseType"/>
+ <xs:attribute name = "typesafeEnumMaxMembers" type="xs:int" default="256"/>
+ </xs:attributeGroup>
+ <xs:element name = "globalBindings">
+ <xs:annotation><xs:documentation>Customization values defined in global scope.</xs:documentation></xs:annotation>
+ <xs:complexType>
+ <xs:sequence minOccurs = "0">
+ <xs:element ref = "jaxb:javaType" minOccurs = "0" maxOccurs = "unbounded"/>
+ <xs:element ref = "jaxb:serializable" minOccurs = "0"/>
+ <xs:any namespace = "##other" processContents = "lax">
+ <xs:annotation> <xs:documentation>allows extension binding declarations to be specified.</xs:documentation></xs:annotation>
+ </xs:any>
+ </xs:sequence>
+ <xs:attributeGroup ref = "jaxb:XMLNameToJavaIdMappingDefaults"/>
+ <xs:attributeGroup ref = "jaxb:typesafeEnumClassDefaults"/>
+ <xs:attributeGroup ref = "jaxb:propertyAttributes"/>
+ <xs:attribute name="generateValueClass" type="xs:boolean"
+ default= "true"/>
+ <xs:attribute name="generateElementClass" type="xs:boolean"
+ default= "false"/>
+ <xs:attribute name="mapSimpleTypeDef" type="xs:boolean"
+ default= "false"/>
+ <xs:attribute name="localScoping" default= "nested">
+ <xs:simpleType>
+ <xs:restriction base="xs:NCName">
+ <xs:enumeration value="nested"/>
+ <xs:enumeration value="toplevel"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name = "enableJavaNamingConventions" default = "true" type = "xs:boolean"/>
+<!-- Removed from JAXB 2.0
+ <xs:attribute name = "bindingStyle" default = "elementBinding" type = "jaxb:bindingStyleType"/>
+-->
+ <xs:attribute name = "choiceContentProperty" default = "false" type = "xs:boolean"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name = "schemaBindings">
+ <xs:annotation><xs:documentation>Customization values with schema scope</xs:documentation></xs:annotation>
+ <xs:complexType>
+ <xs:all>
+ <xs:element name = "package" type = "jaxb:packageType" minOccurs = "0"/>
+ <xs:element name = "nameXmlTransform" type = "jaxb:nameXmlTransformType" minOccurs = "0"/>
+ </xs:all>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name = "class">
+ <xs:annotation><xs:documentation>Customize interface and implementation class.</xs:documentation></xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name = "javadoc" type = "xs:string" minOccurs = "0"/>
+ </xs:sequence>
+ <xs:attribute name = "name" type = "jaxb:javaIdentifierType">
+ <xs:annotation><xs:documentation>Java class name without package prefix.</xs:documentation></xs:annotation>
+ </xs:attribute>
+ <xs:attribute name = "implClass" type = "jaxb:javaIdentifierType">
+ <xs:annotation><xs:documentation>Implementation class name including package prefix.</xs:documentation></xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="generateValueClass" type="xs:boolean">
+ <xs:annotation><xs:documentation>Default value derived from [jaxb:globalBindings]@generateValueClass.</xs:documentation></xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name = "property">
+ <xs:annotation><xs:documentation>Customize property.</xs:documentation></xs:annotation>
+ <xs:complexType>
+ <xs:all>
+ <xs:element name = "javadoc" type = "xs:string" minOccurs="0"/>
+ <xs:element name = "baseType" type="jaxb:propertyBaseType" minOccurs="0"/>
+ </xs:all>
+ <xs:attribute name = "name" type = "jaxb:javaIdentifierType"/>
+ <xs:attributeGroup ref = "jaxb:propertyAttributes"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name = "javaType">
+ <xs:annotation><xs:documentation>Data type conversions; overriding builtins</xs:documentation></xs:annotation>
+ <xs:complexType>
+ <xs:attribute name = "name" use = "required" type = "jaxb:javaIdentifierType">
+ <xs:annotation><xs:documentation>name of the java type to which xml type is to be bound.</xs:documentation></xs:annotation>
+ </xs:attribute>
+ <xs:attribute name = "xmlType" type = "xs:QName">
+ <xs:annotation><xs:documentation> xml type to which java datatype has to be bound.Must be present when javaType is scoped to globalBindings</xs:documentation></xs:annotation>
+ </xs:attribute>
+ <xs:attribute name = "parseMethod" type = "jaxb:javaIdentifierType"/>
+ <xs:attribute name = "printMethod" type = "jaxb:javaIdentifierType"/>
+ <xs:attribute name = "hasNsContext" default = "false" type = "xs:boolean" >
+ <xs:annotation><xs:documentation>
+If true, the parsMethod and printMethod must reference a method
+signtature that has a second parameter of type NamespaceContext.
+ </xs:documentation></xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name = "typesafeEnumClass">
+ <xs:annotation><xs:documentation> Bind to a type safe enumeration class.</xs:documentation></xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name = "javadoc" type = "xs:string" minOccurs = "0"/>
+ <xs:element ref = "jaxb:typesafeEnumMember" minOccurs = "0" maxOccurs = "unbounded"/>
+ </xs:sequence>
+ <xs:attribute name = "name" type = "jaxb:javaIdentifierType"/>
+ <xs:attribute name = "map" type = "xs:boolean" default = "true"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name = "typesafeEnumMember">
+ <xs:annotation><xs:documentation> Enumeration member name in a type safe enumeration class.</xs:documentation></xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name = "javadoc" type = "xs:string" minOccurs = "0"/>
+ </xs:sequence>
+ <xs:attribute name = "value" type="xs:anySimpleType"/>
+ <xs:attribute name = "name" use = "required" type = "jaxb:javaIdentifierType"/>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- TYPE DEFINITIONS -->
+
+ <xs:complexType name = "propertyBaseType">
+ <xs:all>
+ <xs:element ref = "jaxb:javaType" minOccurs = "0"/>
+ </xs:all>
+ <xs:attribute name = "name" type = "jaxb:javaIdentifierType">
+ <xs:annotation><xs:documentation>
+The name attribute for [baseType] enables more precise control over the actual base type for a JAXB property. This customization enables specifying a more general base type than the property's default base type. The name attribute value must be a fully qualified Java class name. Additionally, this Java class must be a super interface/class of the default Java base type for the property. When the default base type is a primitive type, consider the default Java base type to be the Java wrapper class of that primitive type.This customization is useful to enable simple type substitution for a JAXB property representing with too restrictive of a default base type.
+ </xs:documentation></xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+
+<!-- Removed in JAXB 2.0. modelGroupBinding no longer exists.
+ <xs:simpleType name = "bindingStyleType">
+ <xs:annotation><xs:documentation>Allows selection of a binding algorithm</xs:documentation></xs:annotation>
+ <xs:restriction base = "xs:string">
+ <xs:enumeration value = "elementBinding"/>
+ <xs:enumeration value = "modelGroupBinding"/>
+ </xs:restriction>
+ </xs:simpleType>
+-->
+
+ <xs:complexType name = "packageType">
+ <xs:sequence>
+ <xs:element name = "javadoc" type = "xs:string" minOccurs = "0"/>
+ </xs:sequence>
+ <xs:attribute name = "name" type = "jaxb:javaIdentifierType"/>
+ </xs:complexType>
+ <xs:simpleType name = "underscoreBindingType">
+ <xs:annotation><xs:documentation>Treate underscore in XML Name to Java identifier mapping.</xs:documentation></xs:annotation>
+ <xs:restriction base = "xs:string">
+ <xs:enumeration value = "asWordSeparator"/>
+ <xs:enumeration value = "asCharInWord"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name = "typesafeEnumBaseType">
+ <xs:annotation><xs:documentation>
+XML types or types derived from them which have enumeration facet(s) which are be mapped to typesafeEnumClass by default. The following types cannot be specified in this list: "xsd:QName", "xsd:base64Binary", "xsd:hexBinary", "xsd:date", "xsd:time", "xsd:dateTime", "xsd:duration","xsd:gDay", "xsd:gMonth", "xsd:Year", "xsd:gMonthDay", "xsd:YearMonth", "xsd:ID", "xsd:IDREF", "xsd:NOTATION"
+ </xs:documentation></xs:annotation>
+ <xs:list itemType = "xs:QName"/>
+ </xs:simpleType>
+ <xs:simpleType name = "typesafeEnumMemberNameType">
+ <xs:annotation><xs:documentation>Used to customize how to handle name collisions.</xs:documentation></xs:annotation>
+ <xs:restriction base = "xs:string">
+ <xs:enumeration value = "generateName"/>
+ <xs:enumeration value = "generateError"/>
+ <xs:enumeration value = "skipGeneration"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType name = "javaIdentifierType">
+ <xs:annotation><xs:documentation>Placeholder type to indicate Legal Java identifier.</xs:documentation></xs:annotation>
+ <xs:list itemType = "xs:NCName"/>
+ </xs:simpleType>
+ <xs:complexType name = "nameXmlTransformRule">
+ <xs:annotation><xs:documentation>Rule to transform an Xml name into another Xml name</xs:documentation></xs:annotation>
+ <xs:attribute name = "prefix" type = "xs:string">
+ <xs:annotation><xs:documentation>prepend the string to QName.</xs:documentation></xs:annotation>
+ </xs:attribute>
+ <xs:attribute name = "suffix" type = "xs:string">
+ <xs:annotation><xs:documentation>Append the string to QName.</xs:documentation></xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ <xs:complexType name = "nameXmlTransformType">
+ <xs:annotation><xs:documentation>Allows transforming an xml name into another xml name. Use case UDDI 2.0 schema.</xs:documentation></xs:annotation>
+ <xs:all>
+ <xs:element name = "typeName" type = "jaxb:nameXmlTransformRule" minOccurs = "0">
+ <xs:annotation><xs:documentation>Mapping rule for type definitions.</xs:documentation></xs:annotation>
+ </xs:element>
+ <xs:element name = "elementName" type = "jaxb:nameXmlTransformRule" minOccurs = "0">
+ <xs:annotation><xs:documentation>Mapping rule for elements</xs:documentation></xs:annotation>
+ </xs:element>
+ <xs:element name = "modelGroupName" type = "jaxb:nameXmlTransformRule" minOccurs = "0">
+ <xs:annotation><xs:documentation>Mapping rule for model group</xs:documentation></xs:annotation>
+ </xs:element>
+ <xs:element name = "anonymousTypeName" type = "jaxb:nameXmlTransformRule" minOccurs = "0">
+ <xs:annotation><xs:documentation>Mapping rule for class names generated for an anonymous type.</xs:documentation></xs:annotation>
+ </xs:element>
+ </xs:all>
+ </xs:complexType>
+ <xs:attribute name = "extensionBindingPrefixes">
+ <xs:annotation><xs:documentation>
+A binding compiler only processes this attribute when it occurs on an
+an instance of xs:schema element. The value of this attribute is a
+whitespace-separated list of namespace prefixes. The namespace bound
+to each of the prefixes is designated as a customization declaration
+namespace.</xs:documentation></xs:annotation>
+ <xs:simpleType>
+ <xs:list itemType = "xs:normalizedString"/>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:element name = "bindings">
+ <xs:annotation><xs:documentation>
+Binding declaration(s) for a remote schema.
+If attribute node is set, the binding declaraions
+are associated with part of the remote schema
+designated by schemaLocation attribute. The node
+attribute identifies the node in the remote schema
+to associate the binding declaration(s) with.
+ </xs:documentation></xs:annotation>
+ <!-- a <bindings> element can contain arbitrary number of binding declarations or nested <bindings> elements -->
+ <xs:complexType>
+ <xs:sequence>
+ <xs:choice minOccurs = "0" maxOccurs = "unbounded">
+ <xs:group ref = "jaxb:declaration"/>
+ <xs:element ref = "jaxb:bindings"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute name = "schemaLocation" type = "xs:anyURI">
+ <xs:annotation><xs:documentation>
+Location of the remote schema to associate binding declarations with.
+ </xs:documentation></xs:annotation>
+ </xs:attribute>
+ <xs:attribute name = "node" type = "xs:string">
+ <xs:annotation><xs:documentation>
+The value of the string is an XPATH 1.0 compliant string that
+resolves to a node in a remote schema to associate
+binding declarations with. The remote schema is specified
+by the schemaLocation attribute occuring in the current
+element or in a parent of this element.
+ </xs:documentation></xs:annotation>
+ </xs:attribute>
+ <xs:attribute name = "version" type = "xs:token">
+ <xs:annotation><xs:documentation>
+Used to indicate the version of binding declarations. Only valid on root level bindings element. Either this or "jaxb:version" attribute but not both may be specified.
+ </xs:documentation></xs:annotation>
+ </xs:attribute>
+ <xs:attribute ref = "jaxb:version">
+ <xs:annotation><xs:documentation>
+Used to indicate the version of binding declarations. Only valid on root level bindings element. Either this attribute or "version" attribute but not both may be specified.</xs:documentation></xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ <xs:simpleType name="referenceCollectionType">
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="indexed"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base="jaxb:javaIdentifierType"/>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ <xs:element name="dom">
+ <xs:complexType>
+ <xs:attribute name = "type" type="xs:NCName" default="w3c">
+ <xs:annotation><xs:documentation>Specify DOM API to bind to JAXB property to.</xs:documentation></xs:annotation>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="inlineBinaryData">
+ <xs:annotation><xs:documentation>Disable MTOM/XOP encoding for this binary data. Annotation can be placed on a type defintion that derives from a W3C XSD binary data type or on an element that has a type that is or derives from a W3C XSD binary data type.</xs:documentation>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name = "serializable">
+ <xs:complexType>
+ <xs:attribute name="uid" type="xs:long" default="1"/>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
+
diff --git a/BKUOnline/private/cache/retriever/www.w3.org/2001/XMLSchema.xsd b/BKUOnline/private/cache/retriever/www.w3.org/2001/XMLSchema.xsd
new file mode 100644
index 00000000..2e9a2729
--- /dev/null
+++ b/BKUOnline/private/cache/retriever/www.w3.org/2001/XMLSchema.xsd
@@ -0,0 +1,2534 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- XML Schema schema for XML Schemas: Part 1: Structures -->
+<!-- Note this schema is NOT the normative structures schema. -->
+<!-- The prose copy in the structures REC is the normative -->
+<!-- version (which shouldn't differ from this one except for -->
+<!-- this comment and entity expansions, but just in case -->
+<!DOCTYPE xs:schema PUBLIC "-//W3C//DTD XMLSCHEMA 200102//EN" "XMLSchema.dtd" [
+
+<!-- provide ID type information even for parsers which only read the
+ internal subset -->
+<!ATTLIST xs:schema id ID #IMPLIED>
+<!ATTLIST xs:complexType id ID #IMPLIED>
+<!ATTLIST xs:complexContent id ID #IMPLIED>
+<!ATTLIST xs:simpleContent id ID #IMPLIED>
+<!ATTLIST xs:extension id ID #IMPLIED>
+<!ATTLIST xs:element id ID #IMPLIED>
+<!ATTLIST xs:group id ID #IMPLIED>
+<!ATTLIST xs:all id ID #IMPLIED>
+<!ATTLIST xs:choice id ID #IMPLIED>
+<!ATTLIST xs:sequence id ID #IMPLIED>
+<!ATTLIST xs:any id ID #IMPLIED>
+<!ATTLIST xs:anyAttribute id ID #IMPLIED>
+<!ATTLIST xs:attribute id ID #IMPLIED>
+<!ATTLIST xs:attributeGroup id ID #IMPLIED>
+<!ATTLIST xs:unique id ID #IMPLIED>
+<!ATTLIST xs:key id ID #IMPLIED>
+<!ATTLIST xs:keyref id ID #IMPLIED>
+<!ATTLIST xs:selector id ID #IMPLIED>
+<!ATTLIST xs:field id ID #IMPLIED>
+<!ATTLIST xs:include id ID #IMPLIED>
+<!ATTLIST xs:import id ID #IMPLIED>
+<!ATTLIST xs:redefine id ID #IMPLIED>
+<!ATTLIST xs:notation id ID #IMPLIED>
+<!--
+ keep this schema XML1.0 DTD valid
+ -->
+ <!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'>
+
+ <!ELEMENT hfp:hasFacet EMPTY>
+ <!ATTLIST hfp:hasFacet
+ name NMTOKEN #REQUIRED>
+
+ <!ELEMENT hfp:hasProperty EMPTY>
+ <!ATTLIST hfp:hasProperty
+ name NMTOKEN #REQUIRED
+ value CDATA #REQUIRED>
+<!--
+ Make sure that processors that do not read the external
+ subset will know about the various IDs we declare
+ -->
+ <!ATTLIST xs:simpleType id ID #IMPLIED>
+ <!ATTLIST xs:maxExclusive id ID #IMPLIED>
+ <!ATTLIST xs:minExclusive id ID #IMPLIED>
+ <!ATTLIST xs:maxInclusive id ID #IMPLIED>
+ <!ATTLIST xs:minInclusive id ID #IMPLIED>
+ <!ATTLIST xs:totalDigits id ID #IMPLIED>
+ <!ATTLIST xs:fractionDigits id ID #IMPLIED>
+ <!ATTLIST xs:length id ID #IMPLIED>
+ <!ATTLIST xs:minLength id ID #IMPLIED>
+ <!ATTLIST xs:maxLength id ID #IMPLIED>
+ <!ATTLIST xs:enumeration id ID #IMPLIED>
+ <!ATTLIST xs:pattern id ID #IMPLIED>
+ <!ATTLIST xs:appinfo id ID #IMPLIED>
+ <!ATTLIST xs:documentation id ID #IMPLIED>
+ <!ATTLIST xs:list id ID #IMPLIED>
+ <!ATTLIST xs:union id ID #IMPLIED>
+ ]>
+<xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema" blockDefault="#all" elementFormDefault="qualified" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="EN" xmlns:hfp="http://www.w3.org/2001/XMLSchema-hasFacetAndProperty">
+ <xs:annotation>
+ <xs:documentation>
+ Part 1 version: Id: structures.xsd,v 1.2 2004/01/15 11:34:25 ht Exp
+ Part 2 version: Id: datatypes.xsd,v 1.3 2004/01/23 18:11:13 ht Exp
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/2004/PER-xmlschema-1-20040318/structures.html">
+ The schema corresponding to this document is normative,
+ with respect to the syntactic constraints it expresses in the
+ XML Schema language. The documentation (within &lt;documentation> elements)
+ below, is not normative, but rather highlights important aspects of
+ the W3C Recommendation of which this is a part</xs:documentation>
+ </xs:annotation>
+
+ <xs:annotation>
+ <xs:documentation>
+ The simpleType element and all of its members are defined
+ towards the end of this schema document</xs:documentation>
+ </xs:annotation>
+
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd">
+ <xs:annotation>
+ <xs:documentation>
+ Get access to the xml: attribute groups for xml:lang
+ as declared on 'schema' and 'documentation' below
+ </xs:documentation>
+ </xs:annotation>
+ </xs:import>
+
+ <xs:complexType name="openAttrs">
+ <xs:annotation>
+ <xs:documentation>
+ This type is extended by almost all schema types
+ to allow attributes from other namespaces to be
+ added to user schemas.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:restriction base="xs:anyType">
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="annotated">
+ <xs:annotation>
+ <xs:documentation>
+ This type is extended by all types which allow annotation
+ other than &lt;schema&gt; itself
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="xs:openAttrs">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:ID"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:group name="schemaTop">
+ <xs:annotation>
+ <xs:documentation>
+ This group is for the
+ elements which occur freely at the top level of schemas.
+ All of their types are based on the "annotated" type by extension.</xs:documentation>
+ </xs:annotation>
+ <xs:choice>
+ <xs:group ref="xs:redefinable"/>
+ <xs:element ref="xs:element"/>
+ <xs:element ref="xs:attribute"/>
+ <xs:element ref="xs:notation"/>
+ </xs:choice>
+ </xs:group>
+
+ <xs:group name="redefinable">
+ <xs:annotation>
+ <xs:documentation>
+ This group is for the
+ elements which can self-redefine (see &lt;redefine> below).</xs:documentation>
+ </xs:annotation>
+ <xs:choice>
+ <xs:element ref="xs:simpleType"/>
+ <xs:element ref="xs:complexType"/>
+ <xs:element ref="xs:group"/>
+ <xs:element ref="xs:attributeGroup"/>
+ </xs:choice>
+ </xs:group>
+
+ <xs:simpleType name="formChoice">
+ <xs:annotation>
+ <xs:documentation>
+ A utility type, not for public use</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="qualified"/>
+ <xs:enumeration value="unqualified"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="reducedDerivationControl">
+ <xs:annotation>
+ <xs:documentation>
+ A utility type, not for public use</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:derivationControl">
+ <xs:enumeration value="extension"/>
+ <xs:enumeration value="restriction"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="derivationSet">
+ <xs:annotation>
+ <xs:documentation>
+ A utility type, not for public use</xs:documentation>
+ <xs:documentation>
+ #all or (possibly empty) subset of {extension, restriction}</xs:documentation>
+ </xs:annotation>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="#all"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:list itemType="xs:reducedDerivationControl"/>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+
+ <xs:simpleType name="typeDerivationControl">
+ <xs:annotation>
+ <xs:documentation>
+ A utility type, not for public use</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:derivationControl">
+ <xs:enumeration value="extension"/>
+ <xs:enumeration value="restriction"/>
+ <xs:enumeration value="list"/>
+ <xs:enumeration value="union"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="fullDerivationSet">
+ <xs:annotation>
+ <xs:documentation>
+ A utility type, not for public use</xs:documentation>
+ <xs:documentation>
+ #all or (possibly empty) subset of {extension, restriction, list, union}</xs:documentation>
+ </xs:annotation>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="#all"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:list itemType="xs:typeDerivationControl"/>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+
+ <xs:element name="schema" id="schema">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-schema"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:openAttrs">
+ <xs:sequence>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="xs:include"/>
+ <xs:element ref="xs:import"/>
+ <xs:element ref="xs:redefine"/>
+ <xs:element ref="xs:annotation"/>
+ </xs:choice>
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:group ref="xs:schemaTop"/>
+ <xs:element ref="xs:annotation" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:sequence>
+ <xs:attribute name="targetNamespace" type="xs:anyURI"/>
+ <xs:attribute name="version" type="xs:token"/>
+ <xs:attribute name="finalDefault" type="xs:fullDerivationSet" use="optional" default=""/>
+ <xs:attribute name="blockDefault" type="xs:blockSet" use="optional" default=""/>
+ <xs:attribute name="attributeFormDefault" type="xs:formChoice" use="optional" default="unqualified"/>
+ <xs:attribute name="elementFormDefault" type="xs:formChoice" use="optional" default="unqualified"/>
+ <xs:attribute name="id" type="xs:ID"/>
+ <xs:attribute ref="xml:lang"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:key name="element">
+ <xs:selector xpath="xs:element"/>
+ <xs:field xpath="@name"/>
+ </xs:key>
+
+ <xs:key name="attribute">
+ <xs:selector xpath="xs:attribute"/>
+ <xs:field xpath="@name"/>
+ </xs:key>
+
+ <xs:key name="type">
+ <xs:selector xpath="xs:complexType|xs:simpleType"/>
+ <xs:field xpath="@name"/>
+ </xs:key>
+
+ <xs:key name="group">
+ <xs:selector xpath="xs:group"/>
+ <xs:field xpath="@name"/>
+ </xs:key>
+
+ <xs:key name="attributeGroup">
+ <xs:selector xpath="xs:attributeGroup"/>
+ <xs:field xpath="@name"/>
+ </xs:key>
+
+ <xs:key name="notation">
+ <xs:selector xpath="xs:notation"/>
+ <xs:field xpath="@name"/>
+ </xs:key>
+
+ <xs:key name="identityConstraint">
+ <xs:selector xpath=".//xs:key|.//xs:unique|.//xs:keyref"/>
+ <xs:field xpath="@name"/>
+ </xs:key>
+
+ </xs:element>
+
+ <xs:simpleType name="allNNI">
+ <xs:annotation><xs:documentation>
+ for maxOccurs</xs:documentation></xs:annotation>
+ <xs:union memberTypes="xs:nonNegativeInteger">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="unbounded"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+
+ <xs:attributeGroup name="occurs">
+ <xs:annotation><xs:documentation>
+ for all particles</xs:documentation></xs:annotation>
+ <xs:attribute name="minOccurs" type="xs:nonNegativeInteger" use="optional" default="1"/>
+ <xs:attribute name="maxOccurs" type="xs:allNNI" use="optional" default="1"/>
+ </xs:attributeGroup>
+
+ <xs:attributeGroup name="defRef">
+ <xs:annotation><xs:documentation>
+ for element, group and attributeGroup,
+ which both define and reference</xs:documentation></xs:annotation>
+ <xs:attribute name="name" type="xs:NCName"/>
+ <xs:attribute name="ref" type="xs:QName"/>
+ </xs:attributeGroup>
+
+ <xs:group name="typeDefParticle">
+ <xs:annotation>
+ <xs:documentation>
+ 'complexType' uses this</xs:documentation></xs:annotation>
+ <xs:choice>
+ <xs:element name="group" type="xs:groupRef"/>
+ <xs:element ref="xs:all"/>
+ <xs:element ref="xs:choice"/>
+ <xs:element ref="xs:sequence"/>
+ </xs:choice>
+ </xs:group>
+
+
+
+ <xs:group name="nestedParticle">
+ <xs:choice>
+ <xs:element name="element" type="xs:localElement"/>
+ <xs:element name="group" type="xs:groupRef"/>
+ <xs:element ref="xs:choice"/>
+ <xs:element ref="xs:sequence"/>
+ <xs:element ref="xs:any"/>
+ </xs:choice>
+ </xs:group>
+
+ <xs:group name="particle">
+ <xs:choice>
+ <xs:element name="element" type="xs:localElement"/>
+ <xs:element name="group" type="xs:groupRef"/>
+ <xs:element ref="xs:all"/>
+ <xs:element ref="xs:choice"/>
+ <xs:element ref="xs:sequence"/>
+ <xs:element ref="xs:any"/>
+ </xs:choice>
+ </xs:group>
+
+ <xs:complexType name="attribute">
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:sequence>
+ <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="xs:defRef"/>
+ <xs:attribute name="type" type="xs:QName"/>
+ <xs:attribute name="use" use="optional" default="optional">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="prohibited"/>
+ <xs:enumeration value="optional"/>
+ <xs:enumeration value="required"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="default" type="xs:string"/>
+ <xs:attribute name="fixed" type="xs:string"/>
+ <xs:attribute name="form" type="xs:formChoice"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="topLevelAttribute">
+ <xs:complexContent>
+ <xs:restriction base="xs:attribute">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>
+ </xs:sequence>
+ <xs:attribute name="ref" use="prohibited"/>
+ <xs:attribute name="form" use="prohibited"/>
+ <xs:attribute name="use" use="prohibited"/>
+ <xs:attribute name="name" use="required" type="xs:NCName"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:group name="attrDecls">
+ <xs:sequence>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="attribute" type="xs:attribute"/>
+ <xs:element name="attributeGroup" type="xs:attributeGroupRef"/>
+ </xs:choice>
+ <xs:element ref="xs:anyAttribute" minOccurs="0"/>
+ </xs:sequence>
+ </xs:group>
+
+ <xs:element name="anyAttribute" type="xs:wildcard" id="anyAttribute">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-anyAttribute"/>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:group name="complexTypeModel">
+ <xs:choice>
+ <xs:element ref="xs:simpleContent"/>
+ <xs:element ref="xs:complexContent"/>
+ <xs:sequence>
+ <xs:annotation>
+ <xs:documentation>
+ This branch is short for
+ &lt;complexContent>
+ &lt;restriction base="xs:anyType">
+ ...
+ &lt;/restriction>
+ &lt;/complexContent></xs:documentation>
+ </xs:annotation>
+ <xs:group ref="xs:typeDefParticle" minOccurs="0"/>
+ <xs:group ref="xs:attrDecls"/>
+ </xs:sequence>
+ </xs:choice>
+ </xs:group>
+
+ <xs:complexType name="complexType" abstract="true">
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:group ref="xs:complexTypeModel"/>
+ <xs:attribute name="name" type="xs:NCName">
+ <xs:annotation>
+ <xs:documentation>
+ Will be restricted to required or forbidden</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="mixed" type="xs:boolean" use="optional" default="false">
+ <xs:annotation>
+ <xs:documentation>
+ Not allowed if simpleContent child is chosen.
+ May be overriden by setting on complexContent child.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>
+ <xs:attribute name="final" type="xs:derivationSet"/>
+ <xs:attribute name="block" type="xs:derivationSet"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="topLevelComplexType">
+ <xs:complexContent>
+ <xs:restriction base="xs:complexType">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:group ref="xs:complexTypeModel"/>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:NCName" use="required"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="localComplexType">
+ <xs:complexContent>
+ <xs:restriction base="xs:complexType">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:group ref="xs:complexTypeModel"/>
+ </xs:sequence>
+ <xs:attribute name="name" use="prohibited"/>
+ <xs:attribute name="abstract" use="prohibited"/>
+ <xs:attribute name="final" use="prohibited"/>
+ <xs:attribute name="block" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="restrictionType">
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:sequence>
+ <xs:choice minOccurs="0">
+ <xs:group ref="xs:typeDefParticle"/>
+ <xs:group ref="xs:simpleRestrictionModel"/>
+ </xs:choice>
+ <xs:group ref="xs:attrDecls"/>
+ </xs:sequence>
+ <xs:attribute name="base" type="xs:QName" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="complexRestrictionType">
+ <xs:complexContent>
+ <xs:restriction base="xs:restrictionType">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:choice minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>This choice is added simply to
+ make this a valid restriction per the REC</xs:documentation>
+ </xs:annotation>
+ <xs:group ref="xs:typeDefParticle"/>
+ </xs:choice>
+ <xs:group ref="xs:attrDecls"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="extensionType">
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:sequence>
+ <xs:group ref="xs:typeDefParticle" minOccurs="0"/>
+ <xs:group ref="xs:attrDecls"/>
+ </xs:sequence>
+ <xs:attribute name="base" type="xs:QName" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:element name="complexContent" id="complexContent">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexContent"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:choice>
+ <xs:element name="restriction" type="xs:complexRestrictionType"/>
+ <xs:element name="extension" type="xs:extensionType"/>
+ </xs:choice>
+ <xs:attribute name="mixed" type="xs:boolean">
+ <xs:annotation>
+ <xs:documentation>
+ Overrides any setting on complexType parent.</xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="simpleRestrictionType">
+ <xs:complexContent>
+ <xs:restriction base="xs:restrictionType">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:choice minOccurs="0">
+ <xs:annotation>
+ <xs:documentation>This choice is added simply to
+ make this a valid restriction per the REC</xs:documentation>
+ </xs:annotation>
+ <xs:group ref="xs:simpleRestrictionModel"/>
+ </xs:choice>
+ <xs:group ref="xs:attrDecls"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="simpleExtensionType">
+ <xs:complexContent>
+ <xs:restriction base="xs:extensionType">
+ <xs:sequence>
+ <xs:annotation>
+ <xs:documentation>
+ No typeDefParticle group reference</xs:documentation>
+ </xs:annotation>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:group ref="xs:attrDecls"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:element name="simpleContent" id="simpleContent">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-simpleContent"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:choice>
+ <xs:element name="restriction" type="xs:simpleRestrictionType"/>
+ <xs:element name="extension" type="xs:simpleExtensionType"/>
+ </xs:choice>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="complexType" type="xs:topLevelComplexType" id="complexType">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexType"/>
+ </xs:annotation>
+ </xs:element>
+
+
+ <xs:simpleType name="blockSet">
+ <xs:annotation>
+ <xs:documentation>
+ A utility type, not for public use</xs:documentation>
+ <xs:documentation>
+ #all or (possibly empty) subset of {substitution, extension,
+ restriction}</xs:documentation>
+ </xs:annotation>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="#all"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:list>
+ <xs:simpleType>
+ <xs:restriction base="xs:derivationControl">
+ <xs:enumeration value="extension"/>
+ <xs:enumeration value="restriction"/>
+ <xs:enumeration value="substitution"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:list>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+
+ <xs:complexType name="element" abstract="true">
+ <xs:annotation>
+ <xs:documentation>
+ The element element can be used either
+ at the top level to define an element-type binding globally,
+ or within a content model to either reference a globally-defined
+ element or type or declare an element-type binding locally.
+ The ref form is not allowed at the top level.</xs:documentation>
+ </xs:annotation>
+
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:sequence>
+ <xs:choice minOccurs="0">
+ <xs:element name="simpleType" type="xs:localSimpleType"/>
+ <xs:element name="complexType" type="xs:localComplexType"/>
+ </xs:choice>
+ <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attributeGroup ref="xs:defRef"/>
+ <xs:attribute name="type" type="xs:QName"/>
+ <xs:attribute name="substitutionGroup" type="xs:QName"/>
+ <xs:attributeGroup ref="xs:occurs"/>
+ <xs:attribute name="default" type="xs:string"/>
+ <xs:attribute name="fixed" type="xs:string"/>
+ <xs:attribute name="nillable" type="xs:boolean" use="optional" default="false"/>
+ <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>
+ <xs:attribute name="final" type="xs:derivationSet"/>
+ <xs:attribute name="block" type="xs:blockSet"/>
+ <xs:attribute name="form" type="xs:formChoice"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="topLevelElement">
+ <xs:complexContent>
+ <xs:restriction base="xs:element">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:choice minOccurs="0">
+ <xs:element name="simpleType" type="xs:localSimpleType"/>
+ <xs:element name="complexType" type="xs:localComplexType"/>
+ </xs:choice>
+ <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="ref" use="prohibited"/>
+ <xs:attribute name="form" use="prohibited"/>
+ <xs:attribute name="minOccurs" use="prohibited"/>
+ <xs:attribute name="maxOccurs" use="prohibited"/>
+ <xs:attribute name="name" use="required" type="xs:NCName"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="localElement">
+ <xs:complexContent>
+ <xs:restriction base="xs:element">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:choice minOccurs="0">
+ <xs:element name="simpleType" type="xs:localSimpleType"/>
+ <xs:element name="complexType" type="xs:localComplexType"/>
+ </xs:choice>
+ <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="substitutionGroup" use="prohibited"/>
+ <xs:attribute name="final" use="prohibited"/>
+ <xs:attribute name="abstract" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:element name="element" type="xs:topLevelElement" id="element">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-element"/>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:complexType name="group" abstract="true">
+ <xs:annotation>
+ <xs:documentation>
+ group type for explicit groups, named top-level groups and
+ group references</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:group ref="xs:particle" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:attributeGroup ref="xs:defRef"/>
+ <xs:attributeGroup ref="xs:occurs"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="realGroup">
+ <xs:complexContent>
+ <xs:restriction base="xs:group">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="1">
+ <xs:element ref="xs:all"/>
+ <xs:element ref="xs:choice"/>
+ <xs:element ref="xs:sequence"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="namedGroup">
+ <xs:complexContent>
+ <xs:restriction base="xs:realGroup">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:choice minOccurs="1" maxOccurs="1">
+ <xs:element name="all">
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:restriction base="xs:all">
+ <xs:group ref="xs:allModel"/>
+ <xs:attribute name="minOccurs" use="prohibited"/>
+ <xs:attribute name="maxOccurs" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="choice" type="xs:simpleExplicitGroup"/>
+ <xs:element name="sequence" type="xs:simpleExplicitGroup"/>
+ </xs:choice>
+ </xs:sequence>
+ <xs:attribute name="name" use="required" type="xs:NCName"/>
+ <xs:attribute name="ref" use="prohibited"/>
+ <xs:attribute name="minOccurs" use="prohibited"/>
+ <xs:attribute name="maxOccurs" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="groupRef">
+ <xs:complexContent>
+ <xs:restriction base="xs:realGroup">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ </xs:sequence>
+ <xs:attribute name="ref" use="required" type="xs:QName"/>
+ <xs:attribute name="name" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="explicitGroup">
+ <xs:annotation>
+ <xs:documentation>
+ group type for the three kinds of group</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:restriction base="xs:group">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:NCName" use="prohibited"/>
+ <xs:attribute name="ref" type="xs:QName" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="simpleExplicitGroup">
+ <xs:complexContent>
+ <xs:restriction base="xs:explicitGroup">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="minOccurs" use="prohibited"/>
+ <xs:attribute name="maxOccurs" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:group name="allModel">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:annotation>
+ <xs:documentation>This choice with min/max is here to
+ avoid a pblm with the Elt:All/Choice/Seq
+ Particle derivation constraint</xs:documentation>
+ </xs:annotation>
+ <xs:element name="element" type="xs:narrowMaxMin"/>
+ </xs:choice>
+ </xs:sequence>
+ </xs:group>
+
+
+ <xs:complexType name="narrowMaxMin">
+ <xs:annotation>
+ <xs:documentation>restricted max/min</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:restriction base="xs:localElement">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:choice minOccurs="0">
+ <xs:element name="simpleType" type="xs:localSimpleType"/>
+ <xs:element name="complexType" type="xs:localComplexType"/>
+ </xs:choice>
+ <xs:group ref="xs:identityConstraint" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="minOccurs" use="optional" default="1">
+ <xs:simpleType>
+ <xs:restriction base="xs:nonNegativeInteger">
+ <xs:enumeration value="0"/>
+ <xs:enumeration value="1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="maxOccurs" use="optional" default="1">
+ <xs:simpleType>
+ <xs:restriction base="xs:allNNI">
+ <xs:enumeration value="0"/>
+ <xs:enumeration value="1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="all">
+ <xs:annotation>
+ <xs:documentation>
+ Only elements allowed inside</xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:restriction base="xs:explicitGroup">
+ <xs:group ref="xs:allModel"/>
+ <xs:attribute name="minOccurs" use="optional" default="1">
+ <xs:simpleType>
+ <xs:restriction base="xs:nonNegativeInteger">
+ <xs:enumeration value="0"/>
+ <xs:enumeration value="1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="maxOccurs" use="optional" default="1">
+ <xs:simpleType>
+ <xs:restriction base="xs:allNNI">
+ <xs:enumeration value="1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:element name="all" id="all" type="xs:all">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-all"/>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:element name="choice" type="xs:explicitGroup" id="choice">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-choice"/>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:element name="sequence" type="xs:explicitGroup" id="sequence">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-sequence"/>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:element name="group" type="xs:namedGroup" id="group">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-group"/>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:complexType name="wildcard">
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:attribute name="namespace" type="xs:namespaceList" use="optional" default="##any"/>
+ <xs:attribute name="processContents" use="optional" default="strict">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="skip"/>
+ <xs:enumeration value="lax"/>
+ <xs:enumeration value="strict"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:element name="any" id="any">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-any"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:wildcard">
+ <xs:attributeGroup ref="xs:occurs"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:annotation>
+ <xs:documentation>
+ simple type for the value of the 'namespace' attr of
+ 'any' and 'anyAttribute'</xs:documentation>
+ </xs:annotation>
+ <xs:annotation>
+ <xs:documentation>
+ Value is
+ ##any - - any non-conflicting WFXML/attribute at all
+
+ ##other - - any non-conflicting WFXML/attribute from
+ namespace other than targetNS
+
+ ##local - - any unqualified non-conflicting WFXML/attribute
+
+ one or - - any non-conflicting WFXML/attribute from
+ more URI the listed namespaces
+ references
+ (space separated)
+
+ ##targetNamespace or ##local may appear in the above list, to
+ refer to the targetNamespace of the enclosing
+ schema or an absent targetNamespace respectively</xs:documentation>
+ </xs:annotation>
+
+ <xs:simpleType name="namespaceList">
+ <xs:annotation>
+ <xs:documentation>
+ A utility type, not for public use</xs:documentation>
+ </xs:annotation>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="##any"/>
+ <xs:enumeration value="##other"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:list>
+ <xs:simpleType>
+ <xs:union memberTypes="xs:anyURI">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="##targetNamespace"/>
+ <xs:enumeration value="##local"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+ </xs:list>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+
+ <xs:element name="attribute" type="xs:topLevelAttribute" id="attribute">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attribute"/>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:complexType name="attributeGroup" abstract="true">
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:group ref="xs:attrDecls"/>
+ <xs:attributeGroup ref="xs:defRef"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="namedAttributeGroup">
+ <xs:complexContent>
+ <xs:restriction base="xs:attributeGroup">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:group ref="xs:attrDecls"/>
+ </xs:sequence>
+ <xs:attribute name="name" use="required" type="xs:NCName"/>
+ <xs:attribute name="ref" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="attributeGroupRef">
+ <xs:complexContent>
+ <xs:restriction base="xs:attributeGroup">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ </xs:sequence>
+ <xs:attribute name="ref" use="required" type="xs:QName"/>
+ <xs:attribute name="name" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:element name="attributeGroup" type="xs:namedAttributeGroup" id="attributeGroup">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup"/>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:element name="include" id="include">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-include"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="redefine" id="redefine">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-redefine"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:openAttrs">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="xs:annotation"/>
+ <xs:group ref="xs:redefinable"/>
+ </xs:choice>
+ <xs:attribute name="schemaLocation" type="xs:anyURI" use="required"/>
+ <xs:attribute name="id" type="xs:ID"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="import" id="import">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-import"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:attribute name="namespace" type="xs:anyURI"/>
+ <xs:attribute name="schemaLocation" type="xs:anyURI"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="selector" id="selector">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-selector"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:attribute name="xpath" use="required">
+ <xs:simpleType>
+ <xs:annotation>
+ <xs:documentation>A subset of XPath expressions for use
+in selectors</xs:documentation>
+ <xs:documentation>A utility type, not for public
+use</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:token">
+ <xs:annotation>
+ <xs:documentation>The following pattern is intended to allow XPath
+ expressions per the following EBNF:
+ Selector ::= Path ( '|' Path )*
+ Path ::= ('.//')? Step ( '/' Step )*
+ Step ::= '.' | NameTest
+ NameTest ::= QName | '*' | NCName ':' '*'
+ child:: is also allowed
+ </xs:documentation>
+ </xs:annotation>
+ <xs:pattern value="(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*">
+ </xs:pattern>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="field" id="field">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-field"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:attribute name="xpath" use="required">
+ <xs:simpleType>
+ <xs:annotation>
+ <xs:documentation>A subset of XPath expressions for use
+in fields</xs:documentation>
+ <xs:documentation>A utility type, not for public
+use</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:token">
+ <xs:annotation>
+ <xs:documentation>The following pattern is intended to allow XPath
+ expressions per the same EBNF as for selector,
+ with the following change:
+ Path ::= ('.//')? ( Step '/' )* ( Step | '@' NameTest )
+ </xs:documentation>
+ </xs:annotation>
+ <xs:pattern value="(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*))))(\|(\.//)?((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)/)*((((child::)?((\i\c*:)?(\i\c*|\*)))|\.)|((attribute::|@)((\i\c*:)?(\i\c*|\*)))))*">
+ </xs:pattern>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="keybase">
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:sequence>
+ <xs:element ref="xs:selector"/>
+ <xs:element ref="xs:field" minOccurs="1" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="name" type="xs:NCName" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:group name="identityConstraint">
+ <xs:annotation>
+ <xs:documentation>The three kinds of identity constraints, all with
+ type of or derived from 'keybase'.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:choice>
+ <xs:element ref="xs:unique"/>
+ <xs:element ref="xs:key"/>
+ <xs:element ref="xs:keyref"/>
+ </xs:choice>
+ </xs:group>
+
+ <xs:element name="unique" type="xs:keybase" id="unique">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-unique"/>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="key" type="xs:keybase" id="key">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-key"/>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="keyref" id="keyref">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-keyref"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:keybase">
+ <xs:attribute name="refer" type="xs:QName" use="required"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="notation" id="notation">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-notation"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:attribute name="name" type="xs:NCName" use="required"/>
+ <xs:attribute name="public" type="xs:public"/>
+ <xs:attribute name="system" type="xs:anyURI"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:simpleType name="public">
+ <xs:annotation>
+ <xs:documentation>
+ A utility type, not for public use</xs:documentation>
+ <xs:documentation>
+ A public identifier, per ISO 8879</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:token"/>
+ </xs:simpleType>
+
+ <xs:element name="appinfo" id="appinfo">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-appinfo"/>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:any processContents="lax"/>
+ </xs:sequence>
+ <xs:attribute name="source" type="xs:anyURI"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="documentation" id="documentation">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-documentation"/>
+ </xs:annotation>
+ <xs:complexType mixed="true">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:any processContents="lax"/>
+ </xs:sequence>
+ <xs:attribute name="source" type="xs:anyURI"/>
+ <xs:attribute ref="xml:lang"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="annotation" id="annotation">
+ <xs:annotation>
+ <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-annotation"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:extension base="xs:openAttrs">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="xs:appinfo"/>
+ <xs:element ref="xs:documentation"/>
+ </xs:choice>
+ <xs:attribute name="id" type="xs:ID"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:annotation>
+ <xs:documentation>
+ notations for use within XML Schema schemas</xs:documentation>
+ </xs:annotation>
+
+ <xs:notation name="XMLSchemaStructures" public="structures" system="http://www.w3.org/2000/08/XMLSchema.xsd"/>
+ <xs:notation name="XML" public="REC-xml-19980210" system="http://www.w3.org/TR/1998/REC-xml-19980210"/>
+
+ <xs:complexType name="anyType" mixed="true">
+ <xs:annotation>
+ <xs:documentation>
+ Not the real urType, but as close an approximation as we can
+ get in the XML representation</xs:documentation>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+ </xs:sequence>
+ <xs:anyAttribute processContents="lax"/>
+ </xs:complexType>
+
+ <xs:annotation>
+ <xs:documentation>
+ First the built-in primitive datatypes. These definitions are for
+ information only, the real built-in definitions are magic.
+ </xs:documentation>
+
+ <xs:documentation>
+ For each built-in datatype in this schema (both primitive and
+ derived) can be uniquely addressed via a URI constructed
+ as follows:
+ 1) the base URI is the URI of the XML Schema namespace
+ 2) the fragment identifier is the name of the datatype
+
+ For example, to address the int datatype, the URI is:
+
+ http://www.w3.org/2001/XMLSchema#int
+
+ Additionally, each facet definition element can be uniquely
+ addressed via a URI constructed as follows:
+ 1) the base URI is the URI of the XML Schema namespace
+ 2) the fragment identifier is the name of the facet
+
+ For example, to address the maxInclusive facet, the URI is:
+
+ http://www.w3.org/2001/XMLSchema#maxInclusive
+
+ Additionally, each facet usage in a built-in datatype definition
+ can be uniquely addressed via a URI constructed as follows:
+ 1) the base URI is the URI of the XML Schema namespace
+ 2) the fragment identifier is the name of the datatype, followed
+ by a period (".") followed by the name of the facet
+
+ For example, to address the usage of the maxInclusive facet in
+ the definition of int, the URI is:
+
+ http://www.w3.org/2001/XMLSchema#int.maxInclusive
+
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:simpleType name="string" id="string">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#string"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="preserve" id="string.preserve"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="boolean" id="boolean">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality" value="finite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#boolean"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="boolean.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="float" id="float">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="total"/>
+ <hfp:hasProperty name="bounded" value="true"/>
+ <hfp:hasProperty name="cardinality" value="finite"/>
+ <hfp:hasProperty name="numeric" value="true"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#float"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="float.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="double" id="double">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="total"/>
+ <hfp:hasProperty name="bounded" value="true"/>
+ <hfp:hasProperty name="cardinality" value="finite"/>
+ <hfp:hasProperty name="numeric" value="true"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#double"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="double.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="decimal" id="decimal">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="totalDigits"/>
+ <hfp:hasFacet name="fractionDigits"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="total"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="true"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#decimal"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="decimal.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="duration" id="duration">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#duration"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="duration.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="dateTime" id="dateTime">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#dateTime"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="dateTime.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="time" id="time">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#time"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="time.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="date" id="date">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#date"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="date.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="gYearMonth" id="gYearMonth">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#gYearMonth"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="gYearMonth.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="gYear" id="gYear">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#gYear"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="gYear.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="gMonthDay" id="gMonthDay">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#gMonthDay"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="gMonthDay.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="gDay" id="gDay">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#gDay"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="gDay.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="gMonth" id="gMonth">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="maxInclusive"/>
+ <hfp:hasFacet name="maxExclusive"/>
+ <hfp:hasFacet name="minInclusive"/>
+ <hfp:hasFacet name="minExclusive"/>
+ <hfp:hasProperty name="ordered" value="partial"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#gMonth"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="gMonth.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="hexBinary" id="hexBinary">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#binary"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="hexBinary.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="base64Binary" id="base64Binary">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#base64Binary"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="base64Binary.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="anyURI" id="anyURI">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#anyURI"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="anyURI.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="QName" id="QName">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#QName"/>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="QName.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="NOTATION" id="NOTATION">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#NOTATION"/>
+ <xs:documentation>
+ NOTATION cannot be used directly in a schema; rather a type
+ must be derived from it by specifying at least one enumeration
+ facet whose value is the name of a NOTATION declared in the
+ schema.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:anySimpleType">
+ <xs:whiteSpace value="collapse" fixed="true"
+ id="NOTATION.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:annotation>
+ <xs:documentation>
+ Now the derived primitive types
+ </xs:documentation>
+ </xs:annotation>
+
+ <xs:simpleType name="normalizedString" id="normalizedString">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#normalizedString"/>
+ </xs:annotation>
+ <xs:restriction base="xs:string">
+ <xs:whiteSpace value="replace"
+ id="normalizedString.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="token" id="token">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#token"/>
+ </xs:annotation>
+ <xs:restriction base="xs:normalizedString">
+ <xs:whiteSpace value="collapse" id="token.whiteSpace"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="language" id="language">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#language"/>
+ </xs:annotation>
+ <xs:restriction base="xs:token">
+ <xs:pattern
+ value="[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*"
+ id="language.pattern">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.ietf.org/rfc/rfc3066.txt">
+ pattern specifies the content of section 2.12 of XML 1.0e2
+ and RFC 3066 (Revised version of RFC 1766).
+ </xs:documentation>
+ </xs:annotation>
+ </xs:pattern>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="IDREFS" id="IDREFS">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#IDREFS"/>
+ </xs:annotation>
+ <xs:restriction>
+ <xs:simpleType>
+ <xs:list itemType="xs:IDREF"/>
+ </xs:simpleType>
+ <xs:minLength value="1" id="IDREFS.minLength"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="ENTITIES" id="ENTITIES">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#ENTITIES"/>
+ </xs:annotation>
+ <xs:restriction>
+ <xs:simpleType>
+ <xs:list itemType="xs:ENTITY"/>
+ </xs:simpleType>
+ <xs:minLength value="1" id="ENTITIES.minLength"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="NMTOKEN" id="NMTOKEN">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#NMTOKEN"/>
+ </xs:annotation>
+ <xs:restriction base="xs:token">
+ <xs:pattern value="\c+" id="NMTOKEN.pattern">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/REC-xml#NT-Nmtoken">
+ pattern matches production 7 from the XML spec
+ </xs:documentation>
+ </xs:annotation>
+ </xs:pattern>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="NMTOKENS" id="NMTOKENS">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasFacet name="length"/>
+ <hfp:hasFacet name="minLength"/>
+ <hfp:hasFacet name="maxLength"/>
+ <hfp:hasFacet name="enumeration"/>
+ <hfp:hasFacet name="whiteSpace"/>
+ <hfp:hasFacet name="pattern"/>
+ <hfp:hasProperty name="ordered" value="false"/>
+ <hfp:hasProperty name="bounded" value="false"/>
+ <hfp:hasProperty name="cardinality"
+ value="countably infinite"/>
+ <hfp:hasProperty name="numeric" value="false"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#NMTOKENS"/>
+ </xs:annotation>
+ <xs:restriction>
+ <xs:simpleType>
+ <xs:list itemType="xs:NMTOKEN"/>
+ </xs:simpleType>
+ <xs:minLength value="1" id="NMTOKENS.minLength"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="Name" id="Name">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#Name"/>
+ </xs:annotation>
+ <xs:restriction base="xs:token">
+ <xs:pattern value="\i\c*" id="Name.pattern">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/REC-xml#NT-Name">
+ pattern matches production 5 from the XML spec
+ </xs:documentation>
+ </xs:annotation>
+ </xs:pattern>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="NCName" id="NCName">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#NCName"/>
+ </xs:annotation>
+ <xs:restriction base="xs:Name">
+ <xs:pattern value="[\i-[:]][\c-[:]]*" id="NCName.pattern">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/REC-xml-names/#NT-NCName">
+ pattern matches production 4 from the Namespaces in XML spec
+ </xs:documentation>
+ </xs:annotation>
+ </xs:pattern>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="ID" id="ID">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#ID"/>
+ </xs:annotation>
+ <xs:restriction base="xs:NCName"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="IDREF" id="IDREF">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#IDREF"/>
+ </xs:annotation>
+ <xs:restriction base="xs:NCName"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="ENTITY" id="ENTITY">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#ENTITY"/>
+ </xs:annotation>
+ <xs:restriction base="xs:NCName"/>
+ </xs:simpleType>
+
+ <xs:simpleType name="integer" id="integer">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#integer"/>
+ </xs:annotation>
+ <xs:restriction base="xs:decimal">
+ <xs:fractionDigits value="0" fixed="true" id="integer.fractionDigits"/>
+ <xs:pattern value="[\-+]?[0-9]+"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="nonPositiveInteger" id="nonPositiveInteger">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#nonPositiveInteger"/>
+ </xs:annotation>
+ <xs:restriction base="xs:integer">
+ <xs:maxInclusive value="0" id="nonPositiveInteger.maxInclusive"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="negativeInteger" id="negativeInteger">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#negativeInteger"/>
+ </xs:annotation>
+ <xs:restriction base="xs:nonPositiveInteger">
+ <xs:maxInclusive value="-1" id="negativeInteger.maxInclusive"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="long" id="long">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasProperty name="bounded" value="true"/>
+ <hfp:hasProperty name="cardinality" value="finite"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#long"/>
+ </xs:annotation>
+ <xs:restriction base="xs:integer">
+ <xs:minInclusive value="-9223372036854775808" id="long.minInclusive"/>
+ <xs:maxInclusive value="9223372036854775807" id="long.maxInclusive"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="int" id="int">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#int"/>
+ </xs:annotation>
+ <xs:restriction base="xs:long">
+ <xs:minInclusive value="-2147483648" id="int.minInclusive"/>
+ <xs:maxInclusive value="2147483647" id="int.maxInclusive"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="short" id="short">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#short"/>
+ </xs:annotation>
+ <xs:restriction base="xs:int">
+ <xs:minInclusive value="-32768" id="short.minInclusive"/>
+ <xs:maxInclusive value="32767" id="short.maxInclusive"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="byte" id="byte">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#byte"/>
+ </xs:annotation>
+ <xs:restriction base="xs:short">
+ <xs:minInclusive value="-128" id="byte.minInclusive"/>
+ <xs:maxInclusive value="127" id="byte.maxInclusive"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="nonNegativeInteger" id="nonNegativeInteger">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#nonNegativeInteger"/>
+ </xs:annotation>
+ <xs:restriction base="xs:integer">
+ <xs:minInclusive value="0" id="nonNegativeInteger.minInclusive"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="unsignedLong" id="unsignedLong">
+ <xs:annotation>
+ <xs:appinfo>
+ <hfp:hasProperty name="bounded" value="true"/>
+ <hfp:hasProperty name="cardinality" value="finite"/>
+ </xs:appinfo>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#unsignedLong"/>
+ </xs:annotation>
+ <xs:restriction base="xs:nonNegativeInteger">
+ <xs:maxInclusive value="18446744073709551615"
+ id="unsignedLong.maxInclusive"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="unsignedInt" id="unsignedInt">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#unsignedInt"/>
+ </xs:annotation>
+ <xs:restriction base="xs:unsignedLong">
+ <xs:maxInclusive value="4294967295"
+ id="unsignedInt.maxInclusive"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="unsignedShort" id="unsignedShort">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#unsignedShort"/>
+ </xs:annotation>
+ <xs:restriction base="xs:unsignedInt">
+ <xs:maxInclusive value="65535"
+ id="unsignedShort.maxInclusive"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="unsignedByte" id="unsignedByte">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#unsignedByte"/>
+ </xs:annotation>
+ <xs:restriction base="xs:unsignedShort">
+ <xs:maxInclusive value="255" id="unsignedByte.maxInclusive"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="positiveInteger" id="positiveInteger">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#positiveInteger"/>
+ </xs:annotation>
+ <xs:restriction base="xs:nonNegativeInteger">
+ <xs:minInclusive value="1" id="positiveInteger.minInclusive"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="derivationControl">
+ <xs:annotation>
+ <xs:documentation>
+ A utility type, not for public use</xs:documentation>
+ </xs:annotation>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="substitution"/>
+ <xs:enumeration value="extension"/>
+ <xs:enumeration value="restriction"/>
+ <xs:enumeration value="list"/>
+ <xs:enumeration value="union"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:group name="simpleDerivation">
+ <xs:choice>
+ <xs:element ref="xs:restriction"/>
+ <xs:element ref="xs:list"/>
+ <xs:element ref="xs:union"/>
+ </xs:choice>
+ </xs:group>
+
+ <xs:simpleType name="simpleDerivationSet">
+ <xs:annotation>
+ <xs:documentation>
+ #all or (possibly empty) subset of {restriction, union, list}
+ </xs:documentation>
+ <xs:documentation>
+ A utility type, not for public use</xs:documentation>
+ </xs:annotation>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="#all"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:list>
+ <xs:simpleType>
+ <xs:restriction base="xs:derivationControl">
+ <xs:enumeration value="list"/>
+ <xs:enumeration value="union"/>
+ <xs:enumeration value="restriction"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:list>
+ </xs:simpleType>
+ </xs:union>
+ </xs:simpleType>
+
+ <xs:complexType name="simpleType" abstract="true">
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:group ref="xs:simpleDerivation"/>
+ <xs:attribute name="final" type="xs:simpleDerivationSet"/>
+ <xs:attribute name="name" type="xs:NCName">
+ <xs:annotation>
+ <xs:documentation>
+ Can be restricted to required or forbidden
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="topLevelSimpleType">
+ <xs:complexContent>
+ <xs:restriction base="xs:simpleType">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:group ref="xs:simpleDerivation"/>
+ </xs:sequence>
+ <xs:attribute name="name" use="required"
+ type="xs:NCName">
+ <xs:annotation>
+ <xs:documentation>
+ Required at the top level
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="localSimpleType">
+ <xs:complexContent>
+ <xs:restriction base="xs:simpleType">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ <xs:group ref="xs:simpleDerivation"/>
+ </xs:sequence>
+ <xs:attribute name="name" use="prohibited">
+ <xs:annotation>
+ <xs:documentation>
+ Forbidden when nested
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="final" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:element name="simpleType" type="xs:topLevelSimpleType" id="simpleType">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#element-simpleType"/>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:group name="facets">
+ <xs:annotation>
+ <xs:documentation>
+ We should use a substitution group for facets, but
+ that's ruled out because it would allow users to
+ add their own, which we're not ready for yet.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:choice>
+ <xs:element ref="xs:minExclusive"/>
+ <xs:element ref="xs:minInclusive"/>
+ <xs:element ref="xs:maxExclusive"/>
+ <xs:element ref="xs:maxInclusive"/>
+ <xs:element ref="xs:totalDigits"/>
+ <xs:element ref="xs:fractionDigits"/>
+ <xs:element ref="xs:length"/>
+ <xs:element ref="xs:minLength"/>
+ <xs:element ref="xs:maxLength"/>
+ <xs:element ref="xs:enumeration"/>
+ <xs:element ref="xs:whiteSpace"/>
+ <xs:element ref="xs:pattern"/>
+ </xs:choice>
+ </xs:group>
+
+ <xs:group name="simpleRestrictionModel">
+ <xs:sequence>
+ <xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/>
+ <xs:group ref="xs:facets" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:group>
+
+ <xs:element name="restriction" id="restriction">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#element-restriction">
+ base attribute and simpleType child are mutually
+ exclusive, but one or other is required
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:group ref="xs:simpleRestrictionModel"/>
+ <xs:attribute name="base" type="xs:QName" use="optional"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="list" id="list">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#element-list">
+ itemType attribute and simpleType child are mutually
+ exclusive, but one or other is required
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:sequence>
+ <xs:element name="simpleType" type="xs:localSimpleType"
+ minOccurs="0"/>
+ </xs:sequence>
+ <xs:attribute name="itemType" type="xs:QName" use="optional"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="union" id="union">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#element-union">
+ memberTypes attribute must be non-empty or there must be
+ at least one simpleType child
+ </xs:documentation>
+ </xs:annotation>
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:sequence>
+ <xs:element name="simpleType" type="xs:localSimpleType"
+ minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="memberTypes" use="optional">
+ <xs:simpleType>
+ <xs:list itemType="xs:QName"/>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:complexType name="facet">
+ <xs:complexContent>
+ <xs:extension base="xs:annotated">
+ <xs:attribute name="value" use="required"/>
+ <xs:attribute name="fixed" type="xs:boolean" use="optional"
+ default="false"/>
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="noFixedFacet">
+ <xs:complexContent>
+ <xs:restriction base="xs:facet">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ </xs:sequence>
+ <xs:attribute name="fixed" use="prohibited"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:element name="minExclusive" id="minExclusive" type="xs:facet">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#element-minExclusive"/>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="minInclusive" id="minInclusive" type="xs:facet">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#element-minInclusive"/>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:element name="maxExclusive" id="maxExclusive" type="xs:facet">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#element-maxExclusive"/>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="maxInclusive" id="maxInclusive" type="xs:facet">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#element-maxInclusive"/>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:complexType name="numFacet">
+ <xs:complexContent>
+ <xs:restriction base="xs:facet">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ </xs:sequence>
+ <xs:attribute name="value" type="xs:nonNegativeInteger" use="required"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:element name="totalDigits" id="totalDigits">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#element-totalDigits"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:restriction base="xs:numFacet">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ </xs:sequence>
+ <xs:attribute name="value" type="xs:positiveInteger" use="required"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="fractionDigits" id="fractionDigits" type="xs:numFacet">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#element-fractionDigits"/>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:element name="length" id="length" type="xs:numFacet">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#element-length"/>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="minLength" id="minLength" type="xs:numFacet">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#element-minLength"/>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="maxLength" id="maxLength" type="xs:numFacet">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#element-maxLength"/>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:element name="enumeration" id="enumeration" type="xs:noFixedFacet">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#element-enumeration"/>
+ </xs:annotation>
+ </xs:element>
+
+ <xs:element name="whiteSpace" id="whiteSpace">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#element-whiteSpace"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:restriction base="xs:facet">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ </xs:sequence>
+ <xs:attribute name="value" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:NMTOKEN">
+ <xs:enumeration value="preserve"/>
+ <xs:enumeration value="replace"/>
+ <xs:enumeration value="collapse"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="pattern" id="pattern">
+ <xs:annotation>
+ <xs:documentation
+ source="http://www.w3.org/TR/xmlschema-2/#element-pattern"/>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:complexContent>
+ <xs:restriction base="xs:noFixedFacet">
+ <xs:sequence>
+ <xs:element ref="xs:annotation" minOccurs="0"/>
+ </xs:sequence>
+ <xs:attribute name="value" type="xs:string" use="required"/>
+ <xs:anyAttribute namespace="##other" processContents="lax"/>
+ </xs:restriction>
+ </xs:complexContent>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
diff --git a/BKUOnline/src/main/custom-binding/stalservice-custom.xml b/BKUOnline/src/main/custom-binding/stalservice-custom.xml
new file mode 100644
index 00000000..384b04f7
--- /dev/null
+++ b/BKUOnline/src/main/custom-binding/stalservice-custom.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2008 Federal Chancellery Austria and
+ Graz University of Technology
+
+ 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.
+-->
+<!--
+ Binding customization for STAL service (stal.wsdl)
+ JAX-WS does not yet support "schema component designator"s (SCD, http://www.w3.org/TR/xmlschema-ref/)
+-->
+<bindings xmlns="http://java.sun.com/xml/ns/jaxws"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ wsdlLocation="../webapp/WEB-INF/wsdl/stal.wsdl">
+
+
+ <!-- default settings
+ <enableWrapperStyle>true</enableWrapperStyle>
+ <enableAsyncMapping>false</enableAsyncMapping-->
+ <package name="at.gv.egiz.stal.service" />
+
+ <!-- wsdl:portType customization -->
+ <bindings node="wsdl:definitions/wsdl:portType[@name='STALPortType']">
+ <!-- change generated SEI class -->
+ <!--class name="STALServiceI" /-->
+
+ <!-- override default settings -->
+ <enableWrapperStyle>true</enableWrapperStyle>
+ <enableAsyncMapping>false</enableAsyncMapping>
+ </bindings>
+
+ <!-- wsdl:portType operation customization -->
+ <bindings node="wsdl:definitions/wsdl:portType[@name='STALPortType']/wsdl:operation[@name='nextRequest']">
+ <!-- rename method name -->
+ <method name="getNextRequest">
+ <javadoc>Fetch the next request.</javadoc>
+ </method>
+
+ <!-- rename method params -->
+ <parameter part="wsdl:definitions/wsdl:message[@name='NextRequestRequest']/wsdl:part[@name='part1']" name="request" />
+
+ <!-- override default settings -->
+ <enableWrapperStyle>true</enableWrapperStyle>
+ <enableAsyncMapping>false</enableAsyncMapping>
+ </bindings>
+
+ <bindings node="wsdl:definitions/wsdl:portType[@name='STALPortType']/wsdl:operation[@name='getHashDataInput']">
+ <!-- rename method name -->
+ <method name="getHashDataInput">
+ <javadoc>Fetch the signed references corresponding to the previous SignatureRequest.</javadoc>
+ </method>
+
+ <!-- rename method params -->
+ <parameter part="wsdl:definitions/wsdl:message[@name='GetHashDataInputRequest']/wsdl:part[@name='part1']" name="request" />
+
+ <!-- override default settings -->
+ <enableWrapperStyle>true</enableWrapperStyle>
+ <enableAsyncMapping>false</enableAsyncMapping>
+ </bindings>
+
+ <!-- wsdl:service customization -->
+ <!--bindings node="wsdl:definitions/wsdl:service[@name='STALService']">
+ <class name="STALService"/>
+ </bindings-->
+
+ <!-- change the port accessor method -->
+ <!-- bindings node="wsdl:definitions/wsdl:service[@name='STALService']/wsdl:port[@name='STALPort']">
+ <method name="getSTALServicePort"/>
+ </bindings -->
+
+ <!-- INLINED SCHEMA CUSTOMIZATION
+ <bindings node="wsdl:definitions/wsdl:types/xsd:schema[@targetNamespace='http://danu.iaik.tugraz.at/xml']">
+ <jaxb:schemaBindings>
+ <jaxb:package name="iaik.ws.sample.sandbox.generated.service.jaxb" />
+ </jaxb:schemaBindings>
+ </bindings-->
+
+ <!-- EXTERNAL SCHEMA CUSTOMIZATION in custom-jaxb.xml -->
+
+ <!--bindings node="wsdl:definitions" xmlns:jws="http://java.sun.com/xml/ns/javaee">
+ <jws:handler-chains>
+ <jws:handler-chain>
+ <jws:handler>
+ <jws:handler-class>fromwsdlhandler.common.LoggingHandler</jws:handler-class>
+ </jws:handler>
+ </jws:handler-chain>
+ </jws:handler-chains>
+ </bindings-->
+
+</bindings> \ No newline at end of file
diff --git a/BKUOnline/src/main/custom-binding/staltypes-custom.xml b/BKUOnline/src/main/custom-binding/staltypes-custom.xml
new file mode 100644
index 00000000..2ea42082
--- /dev/null
+++ b/BKUOnline/src/main/custom-binding/staltypes-custom.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2008 Federal Chancellery Austria and
+ Graz University of Technology
+
+ 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.
+-->
+<!--
+ Binding customization for STAL schema (stal.xsd)
+ Use JAXB version 2.1 which supports "schema component designator" (SCD, http://www.w3.org/TR/xmlschema-ref/)
+
+ All request/response types are generated to at.gv.egiz.stal
+ and renamed (...Type suffix removed),
+ except for the base types of the modified implClasses ErrorResponse and SignRequest
+
+ IMPORTANT: WHEN REGENERATING CLASSES MAKE SURE TO BACKUP MODIFIED IMPLCLASSES (ErrorResponse and SignRequest)
+-->
+<bindings xmlns='http://java.sun.com/xml/ns/jaxb' version='2.1'
+ xmlns:xs='http://www.w3.org/2001/XMLSchema'
+ xmlns:stal="http://www.egiz.gv.at/stal"
+ xmlns:xjc='http://java.sun.com/xml/ns/jaxb/xjc'
+ xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xsi:schemaLocation='http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
+ http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd'>
+ <bindings scd="x-schema::stal" xmlns:stal="http://www.egiz.gv.at/stal">
+ <schemaBindings>
+ <!-- generate all classes to at.gv.egiz.stal, then move service-only classes to at.gv.egiz.stal.service -->
+ <package name="at.gv.egiz.stal"/>
+ </schemaBindings>
+ </bindings>
+ <bindings scd="/type::stal:RequestType">
+ <class name="STALRequest"/>
+ </bindings>
+ <bindings scd="/type::stal:ResponseType">
+ <class name="STALResponse"/>
+ </bindings>
+ <bindings scd="/type::stal:InfoboxReadResponseType">
+ <class name="InfoboxReadResponse"/>
+ </bindings>
+ <bindings scd="/type::stal:SignResponseType">
+ <class name="SignResponse"/>
+ </bindings>
+ <bindings scd="/type::stal:ErrorResponseType">
+ <class name="ErrorResponse"/>
+ <!--class implClass="at.gv.egiz.stal.types.ErrorResponse"/-->
+ </bindings>
+ <bindings scd="/type::stal:InfoboxReadRequestType" >
+ <class name="InfoboxReadRequest"/>
+ </bindings>
+ <bindings scd="/type::stal:SignRequestType" >
+ <class name="SignRequest"/>
+ <!--class implClass="at.gv.egiz.stal.types.SignRequest"/-->
+ </bindings>
+ <bindings scd="/type::stal:QuitRequestType" >
+ <class name="QuitRequest"/>
+ </bindings>
+ <!--bindings scd="/type::stal:GetHashDataInputFaultType" >
+ <class name="GetHashDataInputFault"/>
+ </bindings-->
+</bindings>
diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/Configurator.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/Configurator.java
new file mode 100644
index 00000000..0cb717c4
--- /dev/null
+++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/conf/Configurator.java
@@ -0,0 +1,69 @@
+/*
+* Copyright 2008 Federal Chancellery Austria and
+* Graz University of Technology
+*
+* 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 at.gv.egiz.bku.online.conf;
+
+import iaik.security.ecc.provider.ECCProvider;
+import iaik.xml.crypto.XSecProvider;
+
+import java.net.HttpURLConnection;
+import java.security.Provider;
+import java.security.Security;
+
+import javax.net.ssl.HttpsURLConnection;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import at.gv.egiz.bku.slcommands.impl.xsect.STALProvider;
+
+/**
+ *
+ * TODO currently only the code to get started.
+ */
+public class Configurator {
+ private Log log = LogFactory.getLog(Configurator.class);
+
+ public Configurator() {
+ configure();
+ }
+
+ protected void configUrlConnections() {
+ HttpsURLConnection.setFollowRedirects(false);
+ HttpURLConnection.setFollowRedirects(false);
+ }
+
+ protected void configureProviders() {
+ log.debug("Registering security providers");
+ Security.addProvider(new STALProvider());
+ XSecProvider.addAsProvider(false);
+ Security.insertProviderAt(new ECCProvider(false), 1);
+ StringBuffer sb = new StringBuffer();
+ sb.append("Following providers are now registered: ");
+ int i = 1;
+ for (Provider prov : Security.getProviders()) {
+ sb.append((i++) + ". : " + prov);
+ }
+ log.debug("Configured provider" + sb.toString());
+ }
+
+ public void configure() {
+ configureProviders();
+ configUrlConnections();
+
+ }
+
+}
diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/BKURequestHandler.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/BKURequestHandler.java
new file mode 100644
index 00000000..53a7c164
--- /dev/null
+++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/BKURequestHandler.java
@@ -0,0 +1,91 @@
+/*
+* Copyright 2008 Federal Chancellery Austria and
+* Graz University of Technology
+*
+* 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 at.gv.egiz.bku.online.webapp;
+
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import at.gv.egiz.bku.binding.HTTPBindingProcessor;
+import at.gv.egiz.bku.binding.HttpUtil;
+import at.gv.egiz.org.apache.tomcat.util.http.AcceptLanguage;
+
+/**
+ * Handles SL requests and instantiates BindingProcessors
+ *
+ */
+public class BKURequestHandler extends SpringBKUServlet {
+
+ public final static String REDIRECT_URL ="appletPage.jsp";
+
+ protected Log log = LogFactory.getLog(BKURequestHandler.class);
+
+ protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, java.io.IOException {
+ log.debug("Got new request");
+ String lang = req.getHeader("Accept-Language");
+ Locale locale = AcceptLanguage.getLocale(lang);
+ log.debug("Using locale: "+locale);
+ HttpSession session = req.getSession();
+ if (session != null) {
+ session.invalidate();
+ }
+ String id = req.getSession(true).getId();
+ log.debug("Using session id: "+id);
+ HTTPBindingProcessor bindingProcessor;
+ if (req.isSecure()) {
+ bindingProcessor = (HTTPBindingProcessor) getBindingProcessorManager()
+ .createBindingProcessor("https", id, locale);
+ } else {
+ bindingProcessor = (HTTPBindingProcessor) getBindingProcessorManager()
+ .createBindingProcessor("http", id, locale);
+ }
+ Map<String, String> headerMap = new HashMap<String, String>();
+ for (Enumeration<String> headerName = req.getHeaderNames(); headerName
+ .hasMoreElements();) {
+ String header = headerName.nextElement();
+ if (header != null) {
+ headerMap.put(header, req.getHeader(header));
+ }
+ }
+ String charset = req.getCharacterEncoding();
+ String contentType = req.getContentType();
+ if (charset != null) {
+ contentType += ";"+charset;
+ }
+ headerMap.put(HttpUtil.HTTP_HEADER_CONTENT_TYPE, contentType);
+ bindingProcessor.setHTTPHeaders(headerMap);
+ bindingProcessor.consumeRequestStream(req.getInputStream());
+ req.getInputStream().close();
+ getBindingProcessorManager().process(bindingProcessor);
+ resp.sendRedirect(REDIRECT_URL);
+ }
+
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, java.io.IOException {
+ doPost(req, resp);
+ }
+}
diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ResultServlet.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ResultServlet.java
new file mode 100644
index 00000000..6c1a4c3a
--- /dev/null
+++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/ResultServlet.java
@@ -0,0 +1,120 @@
+/*
+* Copyright 2008 Federal Chancellery Austria and
+* Graz University of Technology
+*
+* 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 at.gv.egiz.bku.online.webapp;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import at.gv.egiz.bku.binding.HTTPBindingProcessor;
+import at.gv.egiz.bku.binding.IdFactory;
+
+/**
+ * Delivers the result to the browser
+ *
+ */
+public class ResultServlet extends SpringBKUServlet {
+
+ private final static Log log = LogFactory.getLog(ResultServlet.class);
+
+ private String encoding = "UTF-8";
+ private String expiredPage = "./expiredError.jsp";
+
+ public ResultServlet() {
+ }
+
+ private void myInit() {
+ String enc = getServletContext().getInitParameter("responseEncoding");
+ if (enc != null) {
+ log.debug("Init default encoding to: "+enc);
+ encoding = enc;
+ }
+ String expP = getServletConfig().getInitParameter("expiredPage");
+ if (expP != null) {
+ log.debug("Init expired page to: "+expP);
+ expiredPage = expP;
+ }
+ }
+
+ @Override
+ public void init() throws ServletException {
+ super.init();
+ myInit();
+ }
+
+ @Override
+ public void init(ServletConfig config) throws ServletException {
+ super.init(config);
+ myInit();
+ }
+
+
+
+ protected void doPost(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, IOException {
+ doGet(req, resp);
+ }
+
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp)
+ throws ServletException, java.io.IOException {
+
+ HttpSession session = req.getSession(false);
+ if (session == null) {
+ resp.sendRedirect(expiredPage);
+ return;
+ }
+ String sessionId = session.getId();
+ if (sessionId == null) {
+ resp.sendRedirect(expiredPage);
+ return;
+ }
+ log.debug("Got a result request for session: " + sessionId);
+ HTTPBindingProcessor bp = (HTTPBindingProcessor) getBindingProcessorManager().getBindingProcessor(
+ IdFactory.getInstance().createId(sessionId));
+ if (bp == null) {
+ session.invalidate();
+ resp.sendRedirect(expiredPage);
+ return;
+ }
+
+ if (bp.getRedirectURL() != null) {
+ resp.sendRedirect(bp.getRedirectURL());
+ return;
+ }
+ resp.setStatus(bp.getResponseCode());
+ resp.setHeader("Cache-Control","no-store"); //HTTP 1.1
+ resp.setHeader("Pragma","no-cache"); //HTTP 1.0
+ resp.setDateHeader ("Expires", 0);
+ for (Iterator<String> it = bp.getResponseHeaders().keySet()
+ .iterator(); it.hasNext();) {
+ String header = it.next();
+ resp.setHeader(header, bp.getResponseHeaders().get(header));
+ }
+ resp.setContentType(bp.getResultContentType());
+ resp.setCharacterEncoding(encoding);
+ bp.writeResultTo(resp.getOutputStream(), encoding);
+ session.invalidate();
+ }
+}
diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/SessionTimeout.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/SessionTimeout.java
new file mode 100644
index 00000000..2b56166c
--- /dev/null
+++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/SessionTimeout.java
@@ -0,0 +1,49 @@
+/*
+* Copyright 2008 Federal Chancellery Austria and
+* Graz University of Technology
+*
+* 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 at.gv.egiz.bku.online.webapp;
+
+import javax.servlet.http.HttpSessionEvent;
+import javax.servlet.http.HttpSessionListener;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import at.gv.egiz.bku.binding.BindingProcessorManager;
+import at.gv.egiz.bku.binding.IdFactory;
+
+/**
+ * Session listener to trigger the removal of the BindingProcessor
+ *
+ */
+public class SessionTimeout implements HttpSessionListener {
+
+ private static Log log = LogFactory.getLog(SessionTimeout.class);
+
+ @Override
+ public void sessionCreated(HttpSessionEvent arg0) {
+ // TODO Auto-generated method stub
+
+ }
+
+ @Override
+ public void sessionDestroyed(HttpSessionEvent event) {
+ BindingProcessorManager manager = (BindingProcessorManager) event.getSession().getServletContext().getAttribute(SpringBKUServlet.BEAN_NAME);
+ log.info("Removing session: "+event.getSession().getId());
+ manager.removeBindingProcessor(IdFactory.getInstance().createId(event.getSession().getId()));
+ }
+
+}
diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/SpringBKUServlet.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/SpringBKUServlet.java
new file mode 100644
index 00000000..6ee537b1
--- /dev/null
+++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/SpringBKUServlet.java
@@ -0,0 +1,31 @@
+/*
+* Copyright 2008 Federal Chancellery Austria and
+* Graz University of Technology
+*
+* 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 at.gv.egiz.bku.online.webapp;
+
+import javax.servlet.http.HttpServlet;
+
+import at.gv.egiz.bku.binding.BindingProcessorManager;
+
+public abstract class SpringBKUServlet extends HttpServlet {
+
+ public final static String BEAN_NAME="bindingProcessorManager";
+
+ protected BindingProcessorManager getBindingProcessorManager() {
+ return (BindingProcessorManager) getServletContext().getAttribute(BEAN_NAME);
+ }
+
+}
diff --git a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/RequestBrokerSTALFactory.java b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/RequestBrokerSTALFactory.java
new file mode 100644
index 00000000..38c568ab
--- /dev/null
+++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/RequestBrokerSTALFactory.java
@@ -0,0 +1,38 @@
+/*
+* Copyright 2008 Federal Chancellery Austria and
+* Graz University of Technology
+*
+* 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.
+*/
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+package at.gv.egiz.stal.service.impl;
+
+import at.gv.egiz.stal.STAL;
+import at.gv.egiz.stal.STALFactory;
+
+/**
+ *
+ * @author clemens
+ */
+public class RequestBrokerSTALFactory implements STALFactory {
+
+ @Override
+ public STAL createSTAL() {
+ return new STALRequestBrokerImpl();
+ }
+
+}
diff --git a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBroker.java b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBroker.java
new file mode 100644
index 00000000..aad9b874
--- /dev/null
+++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBroker.java
@@ -0,0 +1,43 @@
+/*
+* Copyright 2008 Federal Chancellery Austria and
+* Graz University of Technology
+*
+* 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.
+*/
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package at.gv.egiz.stal.service.impl;
+
+import at.gv.egiz.stal.STAL;
+import at.gv.egiz.stal.STALRequest;
+import at.gv.egiz.stal.STALResponse;
+import at.gv.egiz.stal.HashDataInputCallback;
+import java.util.List;
+import java.util.concurrent.TimeoutException;
+
+/**
+ *
+ * @author clemens
+ */
+public interface STALRequestBroker extends STAL {
+
+ public static final int ERR_6000 = 6000;
+ public static final long TIMEOUT_MS = 1000*60*5; //300000;
+
+ public List<STALRequest> nextRequest(List<STALResponse> response);
+// public void setResponse(List<STALResponse> response) throws TimeoutException;
+// public void interruptRequestHandling(ErrorResponseType error);
+ public HashDataInputCallback getHashDataInput();
+}
diff --git a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java
new file mode 100644
index 00000000..19548247
--- /dev/null
+++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALRequestBrokerImpl.java
@@ -0,0 +1,554 @@
+/*
+* Copyright 2008 Federal Chancellery Austria and
+* Graz University of Technology
+*
+* 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.
+*/
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package at.gv.egiz.stal.service.impl;
+
+import at.gv.egiz.stal.ErrorResponse;
+import at.gv.egiz.stal.QuitRequest;
+import at.gv.egiz.stal.STALRequest;
+import at.gv.egiz.stal.STALResponse;
+import at.gv.egiz.stal.HashDataInputCallback;
+import at.gv.egiz.stal.SignRequest;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Locale;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * An instance of STALRequestBroker is shared between a producer threads (SLCommand)
+ * and multiple consumer threads (STALService).
+ * This implementation assures that handleRequest is executed only once the previous invocation returned.
+ * The BindingProcessor assures that a new SLCommand calls handleRequest() only once
+ * the bindingProcessor called handleRequest(QUIT) after the previous SLCommand's handleRequest() returned.
+ *
+ * Multiple STALService threads might call nextRequest()/getSignedReferences() in any order.
+ *
+ * @author clemens
+ */
+public class STALRequestBrokerImpl implements STALRequestBroker {
+
+ private static final Log log = LogFactory.getLog(STALRequestBrokerImpl.class);
+// protected RequestResponseBroker broker;
+ protected List<STALRequest> requests = null;
+ protected List<STALResponse> responses = null;
+ protected HashDataInputCallback currentHashDataInputCallback;
+ private boolean isHandlingRequest = false;
+ private boolean expectingResponse = false;
+// private Object handleRequestCondition = new Object();
+// private Object gotResponsesCondition = new Object();
+// public STALRequestBrokerImpl() {
+// broker = new RequestResponseBroker();
+// new Thread(handler).start();
+// }
+
+// @Override
+// public HashDataInputCallback getCurrentHashDataInputCallback() {
+// return broker.getCurrentHashDataInputCallback();
+// }
+ /**
+ * Produce requests (and HashDataInputCallback) and wait for responses.
+ * The next thread may enter once we consumed the responses.
+ *
+ * @param requests
+ * @return
+ *
+ * @pre requests either single SignRequest, QuitRequest or multiple ReadInfoboxRequests
+ */
+ @Override
+ public synchronized List<STALResponse> handleRequest(List<STALRequest> requests) {
+ while (isHandlingRequest) {
+ log.trace("waiting to produce request");
+ try {
+ long beforeWait = System.currentTimeMillis();
+ wait(TIMEOUT_MS);
+ if (System.currentTimeMillis() - beforeWait >= TIMEOUT_MS) {
+ log.warn("timeout while waiting to produce request");
+ return Collections.singletonList((STALResponse) new ErrorResponse(ERR_6000));
+ }
+ } catch (InterruptedException ex) {
+ log.warn("interrupt while waiting to produce request: " + ex.getMessage());
+ }
+ }
+ log.trace("produce request");
+ isHandlingRequest = true;
+
+ this.requests = requests;
+ currentHashDataInputCallback = null;
+ for (STALRequest request : requests) {
+ if (request instanceof SignRequest) {
+ log.trace("Received SignRequest, keep HashDataInput callback.");
+ currentHashDataInputCallback = ((SignRequest) request).getHashDataInput();
+ break;
+ } else if (request instanceof QuitRequest) {
+ //alternative1:
+ //for QUIT requests, do not wait for responses, but for request consumation
+ // (i.e. set isHandlingReq to false once QUIT is consumed)
+ log.trace("Received QuitRequest, do not wait for responses.");
+ log.trace("notifying request consumers");
+ notify();
+ //alternative2:
+ //wait for QUIT to be consumed
+ // (i.e. notify me noce QUIT is consumed)
+// while (this.requests != null) {
+// try {
+// long beforeWait = System.currentTimeMillis();
+// wait(TIMEOUT_MS);
+// if (System.currentTimeMillis() - beforeWait >= TIMEOUT_MS) {
+// log.warn("timeout while waiting for QUIT to be consumed");
+// this.requests = null;
+// isHandlingRequest = false;
+// return Collections.singletonList((STALResponse) new ErrorResponse(ERR_6000));
+// }
+// } catch (InterruptedException ex) {
+// log.warn("interrupt while waiting for QUIT to be consumed: " + ex.getMessage());
+// }
+// }
+// isHandlingRequest = false;
+ return new ArrayList<STALResponse>();
+ } else if (log.isTraceEnabled()) {
+ log.trace("Received STAL request: " + request.getClass().getName());
+ }
+ }
+ log.trace("notifying request consumers");
+ notify();
+
+ while (this.responses == null) {
+ log.trace("waiting to consume response");
+ try {
+ long beforeWait = System.currentTimeMillis();
+ wait(TIMEOUT_MS);
+ if (System.currentTimeMillis() - beforeWait >= TIMEOUT_MS) {
+ log.warn("timeout while waiting to consume response");
+ this.requests = null;
+ currentHashDataInputCallback = null;
+ isHandlingRequest = false;
+ return Collections.singletonList((STALResponse) new ErrorResponse(ERR_6000));
+ }
+ } catch (InterruptedException ex) {
+ log.warn("interrupt while waiting to consume response: " + ex.getMessage());
+ }
+ }
+ log.trace("consuming responses");
+ List<STALResponse> resps = responses;
+ responses = null;
+ log.trace("notifying response producers");
+ notify();
+
+ isHandlingRequest = false;
+ log.trace("notifying request producers");
+ notify();
+
+ return resps;
+ }
+
+ /**
+ *
+ * @param responses
+ * @return QUIT if expected responses are not provided
+ */
+ @Override
+ public synchronized List<STALRequest> nextRequest(List<STALResponse> responses) {
+ if (responses != null && responses.size() > 0) {
+ if (!expectingResponse) {
+ log.warn("Received unexpected response in nextRequest()");
+ return Collections.singletonList((STALRequest) new QuitRequest());
+ }
+ while (this.responses != null) {
+ log.trace("waiting to produce response");
+ try {
+ long beforeWait = System.currentTimeMillis();
+ wait(TIMEOUT_MS);
+ if (System.currentTimeMillis() - beforeWait >= TIMEOUT_MS) {
+ log.warn("timeout while waiting to produce response");
+ return Collections.singletonList((STALRequest) new QuitRequest());
+ }
+ } catch (InterruptedException ex) {
+ log.warn("interrupt while waiting to produce response: " + ex.getMessage());
+ }
+ }
+ log.trace("produce response");
+ this.responses = responses;
+ //reset HashDataInputCallback
+ if (log.isTraceEnabled()) {
+ for (STALResponse response : responses) {
+ log.trace("Received STAL response: " + response.getClass().getName());
+ }
+ }
+ log.trace("notifying response consumers");
+ notify();
+ } else {
+ if (expectingResponse) {
+ // while (expectingResponse) wait();
+ log.warn("No expected response received in nextRequest()");
+ return Collections.singletonList((STALRequest) new QuitRequest());
+ }
+ log.trace("expecting non-null response in next nextRequest(response)");
+ expectingResponse = true;
+ }
+ while (this.requests == null) {
+ log.trace("waiting to consume request");
+ try {
+ long beforeWait = System.currentTimeMillis();
+ wait(TIMEOUT_MS);
+ if (System.currentTimeMillis() - beforeWait >= TIMEOUT_MS) {
+ log.warn("timeout while waiting to consume request");
+ return Collections.singletonList((STALRequest) new QuitRequest());
+ }
+ } catch (InterruptedException ex) {
+ log.warn("interrupt while waiting to consume request: " + ex.getMessage());
+ }
+ }
+ log.trace("consume request");
+ List<STALRequest> reqs = requests;
+ //TODO check if QUIT and set isHandlingReq to false here?
+ // (rename isHandlingReq -> produce)
+ // handleReq(QUIT) doesn't wait() and returns immediately
+ // cf. handleReq(QUIT)
+ requests = null;
+ //no need to notify; request producer is waiting for isHandlingRequest
+ //(alt2: the QUIT producer returned immediately and didn't notify)
+ //(alt1: the QUIT producer is waiting for notification on QUIT consumption)
+ if (reqs.size() > 0 && reqs.get(0) instanceof QuitRequest) {
+ isHandlingRequest = false;
+ log.trace("consumed QUIT, notifying request producers");
+ notify();
+ log.trace("expecting no response in next nextRequest()");
+ expectingResponse = false;
+ //notify no-response request consumers
+ }
+ return reqs;
+ }
+
+ @Override
+ public synchronized HashDataInputCallback getHashDataInput() {
+ log.trace("return current HashDataInput callback");
+ return currentHashDataInputCallback;
+ }
+// /**
+// * Causes the calling thread to sleep until response is passed via nextRequest()
+// * (except for QUIT request, which returns immediately).
+// * The requestList may contain at most one signRequest.
+// * The signRequest's signedRefCallback is stored until a response to the signRequest is provided (2nd nextRequest() call),
+// * i.e. until handleRequest() returns.
+// *
+// * @param aRequestList
+// * @return
+// * @pre requestList contains at most one signRequest
+// */
+// @Override
+// public List<STALResponse> handleRequest(List<STALRequest> requestList) {
+// try {
+// if (log.isTraceEnabled()) {
+// log.trace("HandleRequest (" + requestList.size() + " requests)");
+// }
+//
+// broker.produceRequests(requestList);
+//
+// // QUIT returns immediately
+// if (requestList.size() == 1 && requestList.get(0) instanceof QuitRequest) {
+// log.trace("Received QUIT request, do not wait for responses.");
+// return new ArrayList<STALResponse>();
+// }
+// return broker.consumeResponses();
+// } catch (InterruptedException ex) {
+// log.error("Interrupted while handling STAL request list: " + ex.getMessage());
+// return Collections.singletonList((STALResponse) new ErrorResponse());
+// } catch (TimeoutException ex) {
+// log.error("Timeout during handle request: " + ex.getMessage());
+// ErrorResponse err = new ErrorResponse();
+// err.setErrorCode(ERR_6000);
+// return Collections.singletonList((STALResponse) err);
+// }
+// }
+//
+// @Override
+// public void setResponse(List<STALResponse> responses) {
+// try {
+//// if (responses != null && responses.size() > 0) {
+//// List<STALResponse> stalResponses = translateResponses(responses);
+// broker.produceResponses(responses);
+//// } else {
+//// log.trace("Received emtpy responses list, do not add.");
+//// }
+// } catch (InterruptedException ex) {
+// log.error("Interrupted while setting STAL response: " + ex.getMessage());
+//// broker.interrupt(new ErrorResponse());
+// } catch (TimeoutException ex) {
+// log.error("Timeout during setResponse: " + ex.getMessage());
+// }
+// }
+//
+// /**
+// * TODO split in nextRequest(void) and setResponses(responses)
+// * <br/>
+// * Translate (possibly empty) STAL-WS response list to STAL responses and
+// * wait until request(s) are available and translate to STAL-WS requests.
+// * @param prevResponse if null or zero-length, they are not passed to the handler
+// * @return
+// */
+// @Override
+// public List<STALRequest> nextRequest() { //List<ResponseType> responses) {
+// try {
+//// if (responses != null && responses.size() > 0) {
+//// List<STALResponse> stalResponses = translateResponses(responses);
+//// broker.produceResponses(stalResponses);
+//// } else {
+//// log.trace("Received emtpy responses list, do not add.");
+//// }
+//
+//// List<? extends STALRequest> stalRequests = broker.consumeRequests();
+//// List<RequestType> requests = translateRequests(stalRequests);
+// return broker.consumeRequests();
+//// } catch (InterruptedException ex) {
+//// log.error("Interrupted while requesting next STAL request: " + ex.getMessage());
+//// return Collections.singletonList((STALResponse) new ErrorResponse());
+// } catch (InterruptedException ex) {
+// log.error("Interrupted while requesting next STAL request: " + ex.getMessage());
+//// broker.interrupt(new ErrorResponse());
+// return new ArrayList<STALRequest>();
+// } catch (TimeoutException ex) {
+// log.error("Timeout during nextRequest: " + ex.getMessage());
+// return new ArrayList<STALRequest>();
+// }
+// }
+//
+//// @Override
+//// public void interruptRequestHandling(ErrorResponseType error) {
+//// if (log.isTraceEnabled()) {
+//// log.trace("Received Error: " + error.getErrorMessage());
+//// }
+//// broker.interrupt(new ErrorResponse(error.getErrorCode()));
+//// }
+//
+// //TODO
+//// private List<RequestType> translateRequests(List<? extends STALRequest> stalRequests) {
+//// List<RequestType> requests = new ArrayList<RequestType>(stalRequests.size());
+//// for (STALRequest stalRequest : stalRequests) {
+//// if (stalRequest instanceof InfoboxReadRequest) {
+//// InfoboxReadRequestType req = new InfoboxReadRequestType();
+//// req.setInfoboxIdentifier(((InfoboxReadRequest) stalRequest).getInfoboxIdentifier());
+//// log.warn("TODO consider domain identifier for infobox " + req.getInfoboxIdentifier());
+//// req.setDomainIdentifier("TODO");
+//// requests.add(req);
+//// } else if (stalRequest instanceof SignRequest) {
+//// //TODO
+//// //remember current sign request for getSignedReferences()
+//// throw new UnsupportedOperationException("SignRequest unsupported");
+//// } else if (stalRequest instanceof QuitRequest) {
+//// requests.add(new QuitRequestType());
+//// } else {
+//// log.error("Unknown STAL request: " + stalRequest.getClass().getName());
+//// }
+//// }
+//// return requests;
+//// }
+//
+//// private List<STALResponse> translateResponses(List<ResponseType> responses) {
+//// List<STALResponse> stalResponses = new ArrayList<STALResponse>(responses.size());
+//// for (ResponseType response : responses) {
+//// if (response instanceof InfoboxReadResponseType) {
+//// byte[] infoboxValue = ((InfoboxReadResponseType) response).getInfoboxValue();
+//// stalResponses.add(new InfoboxReadResponse(infoboxValue));
+//// } else if (response instanceof SignResponseType) {
+//// byte[] signatureValue = ((SignResponseType) response).getSignatureValue();
+//// stalResponses.add(new SignResponse(signatureValue));
+//// } else if (response instanceof ErrorResponseType) {
+//// int errorCode = ((ErrorResponseType) response).getErrorCode();
+//// log.warn("TODO consider error msg: " + ((ErrorResponseType) response).getErrorMessage());
+//// stalResponses.add(new ErrorResponse(errorCode));
+//// } else {
+//// log.error("Unknown STAL service response " + response.getId() + ": " + response.getClass().getName());
+//// }
+//// }
+//// return stalResponses;
+//// }
+// /**
+// * synchronize on this, not on request/response lists since they are nulled
+// */
+// // protected since outer handler field is protected
+// protected class RequestResponseBroker { //implements Runnable {
+//
+// protected List<STALRequest> requests = null;
+// protected List<STALResponse> responses = null;
+// protected HashDataInputCallback currentHashDataInputCallback;
+//
+//// @Override
+//// public void run() {
+//// while (true) {
+//// ;
+//// }
+//// //TODO handler lifecycle in run()?
+//// }
+// /**
+// * wait until requests are consumed,
+// * produce requests, remember sigRefCallback and notify consumer
+// * (no need for synchronized?)
+// * @param requests
+// */
+// public synchronized void produceRequests(List<STALRequest> requests) throws InterruptedException, TimeoutException {
+//// synchronized (requests) {
+//
+// // requests is null, since there's only one producer thread calling handleRequests()
+// // and handleRequest() returns only if nextRequest() was called
+// while (this.requests != null) {
+//// requests.wait();
+// long before = System.currentTimeMillis();
+// log.trace("waiting to produce requests ...");
+// wait(); //TIMEOUT_MS);
+// if (System.currentTimeMillis() - before >= TIMEOUT_MS) {
+// log.error("Timeout while waiting to produce requests.");
+// throw new TimeoutException();
+// }
+// }
+// log.trace("producing requests");
+// this.requests = requests;
+// // getSignedReferences does not produce responses,
+// // so the command thread will not continue (and no further signRequest can possibly be produced)
+// // once the ws-client sends nextRequest with responses to the signRequest, the callback is invalidated
+//
+// // reset callback if for some reason produceResponse() wasn't called
+// currentHashDataInputCallback = null;
+// for (STALRequest request : requests) {
+// if (request instanceof SignRequest) {
+// log.trace("keep hashdatainput callback");
+// currentHashDataInputCallback = ((SignRequest) request).getHashDataInput();
+// break;
+// }
+// }
+//
+//// requests.notify();
+// log.trace("notifying request consumers (TODO not only consumers)");
+// notify();
+//// }
+// }
+//
+// /**
+// * wait until requests are produced and consume them
+// * @return
+// */
+// public synchronized List<STALRequest> consumeRequests() throws InterruptedException, TimeoutException {
+// List<STALRequest> retVal = null;
+//// synchronized (requests) {
+// while (requests == null) {
+//// requests.wait();
+// long before = System.currentTimeMillis();
+// log.trace("waiting to consumer requests ...");
+// wait(); //TIMEOUT_MS);
+// if (System.currentTimeMillis() - before >= TIMEOUT_MS) {
+// log.error("Timeout while waiting to consume requests.");
+// throw new TimeoutException();
+// }
+// }
+// log.trace("consuming requests");
+// retVal = requests;
+// requests = null;
+//// }
+// log.trace("???notify request producers???");
+// return retVal;
+// }
+//
+// /**
+// * wait until previous responses are consumed,
+// * produce responses and notify consumer
+// * @param responses
+// */
+// public synchronized void produceResponses(List<STALResponse> responses) throws InterruptedException, TimeoutException {
+//// synchronized (responses) {
+// while (this.responses != null) {
+//// responses.wait();
+// long before = System.currentTimeMillis();
+// log.trace("waiting to produce responses ...");
+// wait(); //TIMEOUT_MS);
+// if (System.currentTimeMillis() - before >= TIMEOUT_MS) {
+// log.error("Timeout while waiting to produce responses.");
+// throw new TimeoutException();
+// }
+// }
+// log.trace("producing responses");
+// this.responses = responses;
+// //invalidate sigrefcallback (from now on handleRequest() may be called, producing new requests)
+// //make sure the provided responses are for the corresponding signrequest
+// if (this.requests == null) {//requests already consumed=>responses correspond to these
+// log.trace("resetting current hashdatainput");
+// currentHashDataInputCallback = null;
+// }
+//// responses.notify();
+// log.trace("notify response consumers (TODO only consumers?)");
+// notify();
+//// }
+// }
+//
+// /**
+// * wait until responses are available, consume them
+// * @return
+// * @throws java.lang.Exception
+// */
+// public synchronized List<STALResponse> consumeResponses() throws InterruptedException, TimeoutException {
+// List<STALResponse> retVal = null;
+//// synchronized (responses) {
+// while (responses == null) {
+//// responses.wait();
+// long before = System.currentTimeMillis();
+// log.trace("waiting to consume responses ...");
+// wait(); //TIMEOUT_MS);
+// if (System.currentTimeMillis() - before >= TIMEOUT_MS) {
+// log.error("Timeout while waiting to consume responses.");
+// throw new TimeoutException();
+// }
+// }
+// log.trace("consuming responses");
+// retVal = responses;
+// responses = null;
+//// }
+// log.trace("???notify response producers???");
+// return retVal;
+// }
+//
+// /**
+// * get the signrefcallback until handleRequest() is called the next time.
+// * @return null if last request was not a signRequest
+// */
+// public synchronized HashDataInputCallback getCurrentHashDataInputCallback() {
+// log.trace("obtain current hashdatainput");
+// return currentHashDataInputCallback;
+// }
+// /**
+// * add the error to responses and notify (response-) consumers
+// * @param error
+// */
+//// public synchronized void interrupt(ErrorResponse error) {
+////// synchronized (responses) {
+//// if (responses == null) {
+//// responses = Collections.singletonList((STALResponse) error);
+//// } else {
+//// responses.add(error);
+//// }
+////// responses.notify();
+//// notify();
+////// }
+//// }
+// }
+ @Override
+ public void setLocale(Locale locale) {
+ // TODO Auto-generated method stub
+ }
+}
diff --git a/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALServiceImpl.java b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALServiceImpl.java
new file mode 100644
index 00000000..3e8ad6f3
--- /dev/null
+++ b/BKUOnline/src/main/java/at/gv/egiz/stal/service/impl/STALServiceImpl.java
@@ -0,0 +1,220 @@
+/*
+* Copyright 2008 Federal Chancellery Austria and
+* Graz University of Technology
+*
+* 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.
+*/
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package at.gv.egiz.stal.service.impl;
+
+import at.gv.egiz.bku.binding.BindingProcessor;
+import at.gv.egiz.bku.binding.BindingProcessorManager;
+import at.gv.egiz.stal.service.*;
+import at.gv.egiz.bku.binding.Id;
+import at.gv.egiz.bku.binding.IdFactory;
+import at.gv.egiz.stal.ErrorResponse;
+import at.gv.egiz.stal.STALRequest;
+import at.gv.egiz.stal.STALResponse;
+import at.gv.egiz.stal.HashDataInputCallback;
+import at.gv.egiz.stal.InfoboxReadRequest;
+import at.gv.egiz.stal.QuitRequest;
+import at.gv.egiz.stal.SignRequest;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+import javax.annotation.Resource;
+import javax.jws.WebService;
+import javax.servlet.ServletContext;
+import javax.xml.ws.WebServiceContext;
+import javax.xml.ws.handler.MessageContext;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ *
+ * @author clemens
+ */
+@WebService(endpointInterface = "at.gv.egiz.stal.service.STALPortType")
+public class STALServiceImpl implements STALPortType {
+
+ public static final String BINDING_PROCESSOR_MANAGER = "bindingProcessorManager";
+ public static final String TEST_SESSION_ID = "TestSession";
+ protected static final Log log = LogFactory.getLog(STALServiceImpl.class);
+ @Resource
+ WebServiceContext wsContext;
+ protected IdFactory idF = IdFactory.getInstance();
+
+ @Override
+ public GetNextRequestResponseType getNextRequest(GetNextRequestType request) {
+
+ // HttpSession session = ((HttpServletRequest)
+ // mCtx.get(MessageContext.SERVLET_REQUEST)).getSession();
+ String sessId = request.getSessionId();
+ List<STALResponse> responses = request.getResponse();
+ if (log.isDebugEnabled()) {
+ log.debug("Received GetNextRequest for session " + sessId
+ + " containing " + responses.size() + " responses");
+ }
+
+ GetNextRequestResponseType response = new GetNextRequestResponseType();
+ response.setSessionId(sessId);
+
+ if (TEST_SESSION_ID.equals(sessId)) {
+ if (responses.size() > 0 && responses.get(0) instanceof ErrorResponse) {
+ log
+ .info("Received TestSession GetNextRequest(ErrorResponse), returning QuitRequest");
+ response.getRequest().add(new QuitRequest());
+ } else {
+ log
+ .info("Received TestSession GetNextRequest, returning InfoboxReadRequest ");
+ SignRequest sig = new SignRequest();
+ sig.setKeyIdentifier("SecureSignatureKeypair");
+ sig.setSignedInfo("<dsig:SignedInfo xmlns:dsig=\"http://www.w3.org/2000/09/xmldsig#\" xmlns:xpf=\"http://www.w3.org/2002/06/xmldsig-filter2\"><dsig:CanonicalizationMethod Algorithm=\"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\" /> <dsig:SignatureMethod Algorithm=\"http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1\" /> <dsig:Reference Id=\"signed-data-reference-0-1214921968-27971781-24309\" URI=\"#signed-data-object-0-1214921968-27971781-13578\"><dsig:Transforms> <dsig:Transform Algorithm=\"http://www.w3.org/2002/06/xmldsig-filter2\"> <xpf:XPath xmlns:xpf=\"http://www.w3.org/2002/06/xmldsig-filter2\" Filter=\"intersect\">id('signed-data-object-0-1214921968-27971781-13578')/node()</xpf:XPath></dsig:Transform></dsig:Transforms><dsig:DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\" /> <dsig:DigestValue>H1IePEEfGQ2SG03H6LTzw1TpCuM=</dsig:DigestValue></dsig:Reference><dsig:Reference Id=\"etsi-data-reference-0-1214921968-27971781-25439\" Type=\"http://uri.etsi.org/01903/v1.1.1#SignedProperties\" URI=\"#xmlns(etsi=http://uri.etsi.org/01903/v1.1.1%23)%20xpointer(id('etsi-data-object-0-1214921968-27971781-3095')/child::etsi:QualifyingProperties/child::etsi:SignedProperties)\"><dsig:DigestMethod Algorithm=\"http://www.w3.org/2000/09/xmldsig#sha1\" /><dsig:DigestValue>yV6Q+I60buqR4mMaxA7fi+CV35A=</dsig:DigestValue></dsig:Reference></dsig:SignedInfo>".getBytes());
+ response.getRequest().add(sig);
+ InfoboxReadRequest req = new InfoboxReadRequest();
+ req.setInfoboxIdentifier("IdentityLink");
+ req.setDomainIdentifier("hansiwurzel");
+ response.getRequest().add(req);
+ req = new InfoboxReadRequest();
+ req.setInfoboxIdentifier("CertifiedKeypair");
+ response.getRequest().add(req);
+ req = new InfoboxReadRequest();
+ req.setInfoboxIdentifier("SecureSignatureKeypair");
+ response.getRequest().add(req);
+ }
+ return response;
+ }
+
+ // get Session Id
+ Id sessionId = idF.createId(sessId);
+ STALRequestBroker stal = getStal(sessionId);
+
+ if (stal == null) {
+ log.error("Failed to get STAL for session " + sessId
+ + ", returning QuitRequest");
+ response.getRequest().add(new QuitRequest());
+ } else {
+ List<STALResponse> responsesIn = request.getResponse();
+ for (STALResponse resp : responsesIn) {
+ log.debug(resp);
+ }
+ List<STALRequest> requestsOut = ((STALRequestBroker) stal)
+ .nextRequest(responsesIn);
+ response.getRequest().addAll(requestsOut);
+ if (log.isDebugEnabled()) {
+ log.debug("Returning GetNextRequestResponse for session " + sessId
+ + " containing " + requestsOut.size() + " requests");
+ }
+ }
+ return response;
+ }
+
+ @Override
+ public GetHashDataInputResponseType getHashDataInput(
+ GetHashDataInputType request) throws GetHashDataInputFault {
+
+ String sessId = request.getSessionId();
+ if (log.isDebugEnabled()) {
+ log.debug("Received GetHashDataInputRequest for session " + sessId
+ + " containing " + request.getReference().size() + " referencese");
+ }
+
+ // get Session Id
+ Id sessionId = idF.createId(sessId);
+ STALRequestBroker stal = getStal(sessionId);
+
+ if (stal == null) {
+ String msg = "Failed to get STAL for session " + sessId;
+ log.error(msg);
+ GetHashDataInputFaultType faultInfo = new GetHashDataInputFaultType();
+ faultInfo.setErrorCode(1);
+ faultInfo.setErrorMessage(msg);
+ throw new GetHashDataInputFault(msg, faultInfo);
+ } else {
+ GetHashDataInputResponseType response = new GetHashDataInputResponseType();
+ response.setSessionId(sessId);
+
+ HashDataInputCallback hashDataInput = stal.getHashDataInput();
+ if (TEST_SESSION_ID.equals(sessId)) {
+ log
+ .debug("Received TestSession GetHashDataInput, setting dummy HashDataInputCallback");
+ hashDataInput = new HashDataInputCallback() {
+
+ @Override
+ public InputStream getHashDataInput(String referenceId) {
+ byte[] hd = ("dummyhashdatainput_" + referenceId).getBytes();
+ return new ByteArrayInputStream(hd);
+ }
+ };
+ }
+ if (hashDataInput != null) {
+ List<GetHashDataInputType.Reference> references = request
+ .getReference();
+ for (GetHashDataInputType.Reference reference : references) {
+ String refId = reference.getID();
+ if (log.isDebugEnabled()) {
+ log.debug("Resolving HashDataInput for reference " + refId);
+ }
+ ByteArrayOutputStream baos = null;
+ try {
+ InputStream hdi = hashDataInput.getHashDataInput(refId);
+ baos = new ByteArrayOutputStream(hdi.available());
+ int c;
+ while ((c = hdi.read()) != -1) {
+ baos.write(c);
+ }
+ GetHashDataInputResponseType.Reference ref = new GetHashDataInputResponseType.Reference();
+ ref.setID(refId);
+ ref.setValue(baos.toByteArray());
+ response.getReference().add(ref);
+ } catch (IOException ex) {
+ String msg = "Failed to get HashDataInput for reference " + refId;
+ log.error(msg, ex);
+ GetHashDataInputFaultType faultInfo = new GetHashDataInputFaultType();
+ faultInfo.setErrorCode(1);
+ faultInfo.setErrorMessage(msg);
+ throw new GetHashDataInputFault(msg, faultInfo, ex);
+ } finally {
+ try {
+ baos.close();
+ } catch (IOException ex) {
+ }
+ }
+ }
+ } else {
+ log.warn("Could not resolve any HashDataInputs for session " + sessId
+ + ", no callback provided.");
+ }
+ return response;
+ }
+ }
+
+ private STALRequestBroker getStal(Id sessionId) {
+ // log.warn("RETURNING DUMMY STAL REQUEST BROKER");
+ // return new STALRequestBrokerImpl();
+
+ MessageContext mCtx = wsContext.getMessageContext();
+ ServletContext sCtx = (ServletContext) mCtx
+ .get(MessageContext.SERVLET_CONTEXT);
+ BindingProcessorManager bpMgr = (BindingProcessorManager) sCtx
+ .getAttribute(BINDING_PROCESSOR_MANAGER);
+ BindingProcessor bp = bpMgr.getBindingProcessor(sessionId);
+ return (bp == null) ? null : (STALRequestBroker) bp.getSTAL();
+ }
+}
diff --git a/BKUOnline/src/main/resources/commons-logging.properties b/BKUOnline/src/main/resources/commons-logging.properties
new file mode 100644
index 00000000..0d497b1b
--- /dev/null
+++ b/BKUOnline/src/main/resources/commons-logging.properties
@@ -0,0 +1,16 @@
+# Copyright 2008 Federal Chancellery Austria and
+# Graz University of Technology
+#
+# 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.
+
+org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
diff --git a/BKUOnline/src/main/resources/log4j.properties b/BKUOnline/src/main/resources/log4j.properties
new file mode 100644
index 00000000..ed14b424
--- /dev/null
+++ b/BKUOnline/src/main/resources/log4j.properties
@@ -0,0 +1,34 @@
+# Copyright 2008 Federal Chancellery Austria and
+# Graz University of Technology
+#
+# 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.
+
+# loglever DEBUG, appender STDOUT
+log4j.rootLogger=TRACE, STDOUT
+#log4j.logger.at.gv.egiz.slbinding.RedirectEventFilter=DEBUG, STDOUT
+
+# STDOUT appender
+log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
+log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
+#log4j.appender.STDOUT.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20c | %10t | %m%n
+#log4j.appender.STDOUT.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
+log4j.appender.STDOUT.layout.ConversionPattern=%-5p | %t | %c %x - %m%n
+
+### FILE appender
+#log4j.appender.file=org.apache.log4j.RollingFileAppender
+#log4j.appender.file.maxFileSize=100KB
+#log4j.appender.file.maxBackupIndex=9
+#log4j.appender.file.File=egovbus_ca.log
+#log4j.appender.file.threshold=info
+#log4j.appender.file.layout=org.apache.log4j.PatternLayout
+#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n \ No newline at end of file
diff --git a/BKUOnline/src/main/webapp/HTTP-ohne.html b/BKUOnline/src/main/webapp/HTTP-ohne.html
new file mode 100644
index 00000000..9cdd67ab
--- /dev/null
+++ b/BKUOnline/src/main/webapp/HTTP-ohne.html
@@ -0,0 +1,85 @@
+<!--
+ Copyright 2008 Federal Chancellery Austria and
+ Graz University of Technology
+
+ 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.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Infobox Requests</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+</head>
+<body>
+<h1>Securitykapsel - HTTP-Bindung</h1>
+<style type="text/css">
+fieldset {
+ padding: 1em;
+ font: 80%/ 1 sans-serif;
+ background-color: #F2EFE9;
+ padding-left: 5em;
+}
+
+fieldset.submit {
+ float: none;
+ width: auto;
+ border: 0 none #FFF;
+ padding-left: 14em;
+ border-style: none;
+ background-color: transparent;
+}
+
+label {
+ float: left;
+ width: 8em;
+ margin-right: 0.5em;
+ padding-top: 0.2em;
+ text-align: right;
+ font-weight: bold;
+ color: #000;
+ padding-top: 0.2em;
+}
+
+legend {
+ border: 1px solid;
+ padding: 2px 6px
+}
+</style>
+
+<p>
+<form action="./http-security-layer-request" method="Post"
+ enctype="application/x-www-form-urlencoded">
+<fieldset><legend>Enter XML Request</legend>
+<p><label for="XMLRequest">XML Request</label> <textarea
+ name="XMLRequest" rows=15 cols="60" id="XMLRequest">
+<?xml version="1.0" encoding="UTF-8" ?>
+<sl:InfoboxReadRequest
+ xmlns:sl="http://www.buergerkarte.at/namespaces/securitylayer/1.2#">
+<sl:InfoboxIdentifier>IdentityLink</sl:InfoboxIdentifier>
+<sl:BinaryFileParameters ContentIsXMLEntity="true" />
+</sl:InfoboxReadRequest>
+</textarea></p>
+<!--
+<p><label for="RedirectURL">RedirectURL</label> <input
+ name="RedirectURL" value="" id="RedirectURL"></p>
+<p><label for="DataURL">DataURL</label> <input name="DataURL"
+ value="" id="DataURL"></p>
+<p><label for="StyleSheetURL">StyleSheetURL</label> <input
+ name="StyleSheetURL" value="" id="StyleSheetURL"></p>
+<p>
+ --></fieldset>
+<fieldset class="submit"><input type="submit" class="submit"></fieldset>
+</form>
+
+</body>
+</html>
diff --git a/BKUOnline/src/main/webapp/META-INF/MANIFEST.MF b/BKUOnline/src/main/webapp/META-INF/MANIFEST.MF
new file mode 100644
index 00000000..5e949512
--- /dev/null
+++ b/BKUOnline/src/main/webapp/META-INF/MANIFEST.MF
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
diff --git a/BKUOnline/src/main/webapp/META-INF/context.xml b/BKUOnline/src/main/webapp/META-INF/context.xml
new file mode 100644
index 00000000..3568c9ec
--- /dev/null
+++ b/BKUOnline/src/main/webapp/META-INF/context.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2008 Federal Chancellery Austria and
+ Graz University of Technology
+
+ 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.
+-->
+<Context path="/bkuonline"/>
diff --git a/BKUOnline/src/main/webapp/WEB-INF/applicationContext.xml b/BKUOnline/src/main/webapp/WEB-INF/applicationContext.xml
new file mode 100644
index 00000000..7a2f12b8
--- /dev/null
+++ b/BKUOnline/src/main/webapp/WEB-INF/applicationContext.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2008 Federal Chancellery Austria and
+ Graz University of Technology
+
+ 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
+ <bean id="STALFactory" class="at.gv.egiz.stal.service.impl.RequestBrokerSTALFactory"
+ scope="singleton" />
+ <bean id="commandInvoker" class="at.gv.egiz.bku.binding.SLCommandInvokerImpl" />
+ <bean id="bindingProcessorManager" class="at.gv.egiz.bku.binding.BindingProcessorManagerImpl"
+ scope="singleton">
+ <constructor-arg ref="STALFactory"></constructor-arg>
+ <constructor-arg ref="commandInvoker"></constructor-arg>
+ </bean>
+ <bean
+ class="org.springframework.web.context.support.ServletContextAttributeExporter">
+ <property name="attributes">
+ <map>
+ <entry key="bindingProcessorManager">
+ <ref bean="bindingProcessorManager" />
+ </entry>
+ </map>
+ </property>
+ </bean>
+ <!-- Configure Configuration -->
+ <bean id="configurator" class="at.gv.egiz.bku.online.conf.Configurator"
+ scope="singleton">
+ </bean>
+</beans> \ No newline at end of file
diff --git a/BKUOnline/src/main/webapp/WEB-INF/sun-jaxws.xml b/BKUOnline/src/main/webapp/WEB-INF/sun-jaxws.xml
new file mode 100644
index 00000000..6e8f8b69
--- /dev/null
+++ b/BKUOnline/src/main/webapp/WEB-INF/sun-jaxws.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2008 Federal Chancellery Austria and
+ Graz University of Technology
+
+ 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.
+-->
+
+<!--
+ Description: tomcat deployement
+-->
+
+<endpoints
+ xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime"
+ version="2.0">
+
+ <endpoint
+ name="STALPort"
+ interface="at.gv.egiz.stal.service.STALPortType"
+ implementation="at.gv.egiz.stal.service.impl.STALServiceImpl"
+ wsdl="WEB-INF/wsdl/stal.wsdl"
+ service="{http://www.egiz.gv.at/wsdl/stal}STALService"
+ port="{http://www.egiz.gv.at/wsdl/stal}STALPort"
+ url-pattern="/stal" />
+
+</endpoints>
diff --git a/BKUOnline/src/main/webapp/WEB-INF/web.xml b/BKUOnline/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 00000000..417dabb8
--- /dev/null
+++ b/BKUOnline/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2008 Federal Chancellery Austria and
+ Graz University of Technology
+
+ 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.
+-->
+<web-app id="bkuonline" version="2.5"
+ xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+ <display-name>http-security-layer-request</display-name>
+
+ <!-- Begin Spring Config -->
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>/WEB-INF/applicationContext.xml</param-value>
+ </context-param>
+ <listener>
+ <listener-class>
+ org.springframework.web.context.ContextLoaderListener
+ </listener-class>
+ </listener>
+ <!-- End Spring Config -->
+
+ <!-- Begin BKU Config -->
+ <listener>
+ <listener-class>at.gv.egiz.bku.online.webapp.SessionTimeout</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>BKUServlet</servlet-name>
+ <servlet-class>at.gv.egiz.bku.online.webapp.BKURequestHandler</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>ResultServlet</servlet-name>
+ <servlet-class>at.gv.egiz.bku.online.webapp.ResultServlet</servlet-class>
+ <init-param>
+ <param-name>responseEncoding</param-name>
+ <param-value>UTF-8</param-value>
+ </init-param>
+ <init-param>
+ <param-name>expiredPage</param-name>
+ <!-- FIXME -->
+ <param-value>expired.html</param-value>
+ </init-param>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>BKUServlet</servlet-name>
+ <url-pattern>/http-security-layer-request</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>BKUServlet</servlet-name>
+ <url-pattern>/https-security-layer-request</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ResultServlet</servlet-name>
+ <url-pattern>/bkuResult</url-pattern>
+ </servlet-mapping>
+ <!-- End BKU Config -->
+
+
+
+ <!-- Begin STAL Config -->
+ <listener>
+ <listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
+ </listener>
+ <servlet>
+ <servlet-name>STALPort</servlet-name>
+ <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>STALPort</servlet-name>
+ <url-pattern>/stal</url-pattern>
+ </servlet-mapping>
+ <!-- End STAL Config -->
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>default.html</welcome-file>
+ <welcome-file>default.htm</welcome-file>
+ <welcome-file>default.jsp</welcome-file>
+ </welcome-file-list>
+ <session-config>
+ <session-timeout>3</session-timeout>
+ </session-config>
+</web-app> \ No newline at end of file
diff --git a/BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.wsdl b/BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.wsdl
new file mode 100644
index 00000000..a9f16a12
--- /dev/null
+++ b/BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.wsdl
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2008 Federal Chancellery Austria and
+ Graz University of Technology
+
+ 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.
+-->
+<definitions name="stal" targetNamespace="http://www.egiz.gv.at/wsdl/stal"
+ xmlns="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.egiz.gv.at/wsdl/stal" xmlns:ns="http://www.egiz.gv.at/stal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
+ <types>
+ <xsd:schema targetNamespace="http://www.egiz.gv.at/wsdl/stal">
+ <xsd:import namespace="http://www.egiz.gv.at/stal" schemaLocation="stal.xsd"/>
+ </xsd:schema>
+ </types>
+ <message name="NextRequestRequest">
+ <part name="part1" element="ns:GetNextRequest"/>
+ </message>
+ <message name="NextRequestResponse">
+ <part name="part1" element="ns:GetNextRequestResponse"/>
+ </message>
+ <message name="GetHashDataInputRequest">
+ <part name="part1" element="ns:GetHashDataInput"/>
+ </message>
+ <message name="GetHashDataInputResponse">
+ <part name="part1" element="ns:GetHashDataInputResponse"/>
+ </message>
+ <message name="GetHashDataInputFault">
+ <part name="part1" element="ns:GetHashDataInputFault"/>
+ </message>
+ <portType name="STALPortType">
+ <operation name="nextRequest">
+ <input name="input1" message="tns:NextRequestRequest"/>
+ <output name="output1" message="tns:NextRequestResponse"/>
+ </operation>
+ <operation name="getHashDataInput">
+ <input name="input2" message="tns:GetHashDataInputRequest"/>
+ <output name="output2" message="tns:GetHashDataInputResponse"/>
+ <fault name="fault1" message="tns:GetHashDataInputFault"/>
+ </operation>
+ </portType>
+ <binding name="STALBinding" type="tns:STALPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="nextRequest">
+ <soap:operation/>
+ <input name="input1">
+ <soap:body use="literal"/>
+ </input>
+ <output name="output1">
+ <soap:body use="literal"/>
+ </output>
+ </operation>
+ <operation name="getHashDataInput">
+ <soap:operation/>
+ <input name="input2">
+ <soap:body use="literal"/>
+ </input>
+ <output name="output2">
+ <soap:body use="literal"/>
+ </output>
+ <fault name="fault1">
+ <soap:fault name="fault1"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="STALService">
+ <port name="STALPort" binding="tns:STALBinding">
+ <soap:address location="http://localhost:${HttpDefaultPort}/stal"/>
+ </port>
+ </service>
+</definitions>
diff --git a/BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.xsd b/BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.xsd
new file mode 100644
index 00000000..6627db00
--- /dev/null
+++ b/BKUOnline/src/main/webapp/WEB-INF/wsdl/stal.xsd
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2008 Federal Chancellery Austria and
+ Graz University of Technology
+
+ 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.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.egiz.gv.at/stal"
+ xmlns:tns="http://www.egiz.gv.at/stal"
+ elementFormDefault="qualified">
+ <element name="GetNextRequest" type="tns:GetNextRequestType"/>
+ <element name="GetNextRequestResponse" type="tns:GetNextRequestResponseType"/>
+ <element name="GetHashDataInput" type="tns:GetHashDataInputType"/>
+ <element name="GetHashDataInputResponse" type="tns:GetHashDataInputResponseType"/>
+ <element name="GetHashDataInputFault" type="tns:GetHashDataInputFaultType"/>
+ <complexType name="GetNextRequestType">
+ <sequence>
+ <element name="Response" type="tns:ResponseType" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="sessionId" type="string"/>
+ <!--choice maxOccurs="unbounded">
+ <element name="InfoboxReadResponse" type="tns:InfoboxReadResponseType"/>
+ <element name="SignResponse" type="tns:SignResponseType"/>
+ <element name="ErrorResponse" type="tns:ErrorResponseType"/>
+ </choice-->
+ </complexType>
+ <complexType name="ResponseType" abstract="true">
+ <attribute name="Id" type="ID"/>
+ </complexType>
+ <complexType name="InfoboxReadResponseType">
+ <complexContent>
+ <extension base="tns:ResponseType">
+ <sequence>
+ <element name="InfoboxValue" type="base64Binary"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <complexType name="SignResponseType">
+ <complexContent>
+ <extension base="tns:ResponseType">
+ <sequence>
+ <element name="SignatureValue" type="base64Binary"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <complexType name="ErrorResponseType">
+ <complexContent>
+ <extension base="tns:ResponseType">
+ <sequence>
+ <element name="ErrorCode" type="int"/>
+ <element name="ErrorMessage" type="string"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <complexType name="GetNextRequestResponseType">
+ <sequence>
+ <element name="Request" type="tns:RequestType" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="sessionId" type="string"/>
+ <!--choice maxOccurs="unbounded">
+ <element name="InfoboxReadRequest" type="tns:InfoboxReadRequestType"/>
+ <element name="SignRequest" type="tns:SignRequestType"/>
+ <element name="QuitRequest" type="tns:QuitRequestType"/>
+ </choice-->
+ </complexType>
+ <complexType name="RequestType" abstract="true"/>
+ <complexType name="InfoboxReadRequestType">
+ <complexContent>
+ <extension base="tns:RequestType">
+ <sequence>
+ <element name="InfoboxIdentifier" type="string"/>
+ <element name="DomainIdentifier" type="string" minOccurs="0"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <complexType name="SignRequestType">
+ <complexContent>
+ <extension base="tns:RequestType">
+ <sequence>
+ <element name="KeyIdentifier" type="string"/>
+ <element name="SignedInfo" type="base64Binary"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <complexType name="QuitRequestType">
+ <complexContent>
+ <extension base="tns:RequestType"/>
+ </complexContent>
+ </complexType>
+ <complexType name="GetHashDataInputType">
+ <sequence>
+ <element name="Reference" maxOccurs="unbounded">
+ <complexType>
+ <attribute name="ID" type="string"/>
+ </complexType>
+ </element>
+ </sequence>
+ <attribute name="sessionId" type="string"/>
+ </complexType>
+ <complexType name="GetHashDataInputResponseType">
+ <sequence>
+ <element name="Reference" maxOccurs="unbounded">
+ <complexType>
+ <simpleContent>
+ <extension base="base64Binary">
+ <attribute name="ID" type="ID"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+ </element>
+ </sequence>
+ <attribute name="sessionId" type="string"/>
+ </complexType>
+ <complexType name="GetHashDataInputFaultType">
+ <sequence>
+ <element name="ErrorCode" type="int"/>
+ <element name="ErrorMessage" type="string"/>
+ </sequence>
+ </complexType>
+</schema>
diff --git a/BKUOnline/src/main/webapp/appletPage.jsp b/BKUOnline/src/main/webapp/appletPage.jsp
new file mode 100644
index 00000000..684a8dca
--- /dev/null
+++ b/BKUOnline/src/main/webapp/appletPage.jsp
@@ -0,0 +1,65 @@
+<!--
+ Copyright 2008 Federal Chancellery Austria and
+ Graz University of Technology
+
+ 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.
+-->
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+ pageEncoding="UTF-8"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Applet BKU Test</title>
+</head>
+<body>
+<script src="./js/deployJava.js"></script>
+<script>
+ if (!deployJava.versionCheck('1.6.0')) {
+ document
+ .write('<b>Diese Anwendung benötigt die Java Platform Version 1.6.0 oder höher.</b>' + '<input type="submit" value="Java Platform 1.6.0 installieren" onclick="deployJava.installLatestJRE();">');
+ } else {
+ var attributes = {
+ codebase :'applet',
+ code :'at.gv.egiz.bku.online.applet.BKUApplet.class',
+ archive :'BKUApplet-1.0-SNAPSHOT.jar, commons-logging-1.1.1.jar, iaik_jce_me4se-3.04.jar',
+ width :500,
+ height :200
+ };
+ var parameters = {
+ WSDL_URL :'../stal?wsdl',
+ SessionID : '<%= session.getId() %>',
+ redirectURL : '../bkuResult'
+ };
+ var version = '1.6.0';
+ deployJava.runApplet(attributes, parameters, version);
+ }
+</script>
+<br />
+<script>
+ document.write('App Name: ' + navigator.appName + '<BR>');
+ document.write('User Agent: ' + navigator.userAgent + '<BR>');
+ var list = deployJava.getJREs();
+ if (list.length == 0) {
+ document.write('No Detectable Java Platforms are Installed<BR>');
+ } else {
+ var result = list[0];
+ for ( var i = 1; i < list.length; i++) {
+ result += ", " + list[i];
+ }
+ document.write("You have the following Java Platform(s) installed:"
+ + result + "<BR>");
+ }
+</script>
+</body>
+</html>
diff --git a/BKUOnline/src/main/webapp/expired.html b/BKUOnline/src/main/webapp/expired.html
new file mode 100644
index 00000000..67ca94bc
--- /dev/null
+++ b/BKUOnline/src/main/webapp/expired.html
@@ -0,0 +1,28 @@
+<!--
+ Copyright 2008 Federal Chancellery Austria and
+ Graz University of Technology
+
+ 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.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Session Expired</title>
+</head>
+<body>
+ <p>
+ Ihre Sitzung ist abgelaufen. Ein neuer BKU request kann im <a href="HTTP-ohne.html">Requestformular</a> erstellt werden.
+ </p>
+</body>
+</html> \ No newline at end of file
diff --git a/BKUOnline/src/main/webapp/index.html b/BKUOnline/src/main/webapp/index.html
new file mode 100644
index 00000000..8f1a338e
--- /dev/null
+++ b/BKUOnline/src/main/webapp/index.html
@@ -0,0 +1,59 @@
+<!--
+ Copyright 2008 Federal Chancellery Austria and
+ Graz University of Technology
+
+ 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.
+-->
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>BKU Online</title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<body>
+<style type="text/css">
+ .box {
+ margin-top: 10px;
+ color: #292929;
+ width: 300px;
+ border: 1px solid #BABABA;
+ background-color: #ddd;
+ padding-left: 10px;
+ padding-right: 10px;
+ margin-left: 10px;
+ margin-bottom: 1em;
+ -o-border-radius: 10px;
+ -moz-border-radius: 12px;
+ -webkit-border-radius: 10px;
+ -webkit-box-shadow: 0px 3px 7px #adadad;
+ border-radius: 10px;
+ -moz-box-sizing: border-box;
+ -opera-sizing: border-box;
+ -webkit-box-sizing: border-box;
+ -khtml-box-sizing: border-box;
+ box-sizing: border-box;
+ overflow: hidden;
+ }
+</style>
+<div id="animDiv" class="box">
+<p>
+<h1>TestRequest</h1>
+<a href="HTTP-ohne.html">Security Layer Request</a>
+<h1>STAL Service</h1>
+<a href="stal">STAL Service Endpoint Information</a>
+</p>
+</div>
+
+
+</body>
+</html>
diff --git a/BKUOnline/src/main/webapp/js/deployJava.js b/BKUOnline/src/main/webapp/js/deployJava.js
new file mode 100644
index 00000000..4d8a0ca3
--- /dev/null
+++ b/BKUOnline/src/main/webapp/js/deployJava.js
@@ -0,0 +1,886 @@
+/*
+ * Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of Sun Microsystems nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * deployJava.js
+ *
+ * This file is part of the Deployment Toolkit. It provides functions for web
+ * pages to detect the presence of a JRE, install the latest JRE, and easily run
+ * applets or Web Start programs. Usage guide may be found at http://<TBD>/.
+ *
+ * The "live" copy of this file may be found at
+ * http://java.com/js/deployJava.js.
+ * You are encouraged to link directly to the live copy of the file.
+ *
+ * @version @(#)deployJava.js 1.11 08/07/11
+ */
+
+var deployJava = {
+ debug: null,
+
+ myInterval: null,
+ preInstallJREList: null,
+ returnPage: null,
+ brand: null,
+ locale: null,
+ installType: null,
+
+ EAInstallEnabled: false,
+ EarlyAccessURL: null,
+
+ // GetJava page
+ getJavaURL: 'http://java.sun.com/webapps/getjava/BrowserRedirect?host=java.com',
+
+ // Apple redirect page
+ appleRedirectPage: 'http://www.apple.com/support/downloads/',
+
+ // mime-type of the DeployToolkit plugin object
+ mimeType: 'application/npruntime-scriptable-plugin;DeploymentToolkit',
+
+ // location of the Java Web Start launch button graphic
+ launchButtonPNG: 'http://java.sun.com/products/jfc/tsc/articles/swing2d/webstart.png',
+
+
+ /**
+ * Returns an array of currently-installed JRE version strings.
+ * Version strings are of the form #.#[.#[_#]], with the function returning
+ * as much version information as it can determine, from just family
+ * versions ("1.4.2", "1.5") through the full version ("1.5.0_06").
+ *
+ * Detection is done on a best-effort basis. Under some circumstances
+ * only the highest installed JRE version will be detected, and
+ * JREs older than 1.4.2 will not always be detected.
+ */
+ getJREs: function() {
+ var list = new Array();
+ if (deployJava.isPluginInstalled()) {
+ var plugin = deployJava.getPlugin();
+ for (var i = 0; i < plugin.jvms.getLength(); i++) {
+ list[i] = plugin.jvms.get(i).version;
+ }
+ } else {
+ var browser = deployJava.getBrowser();
+
+ if (browser == 'MSIE') {
+ if (deployJava.testUsingActiveX('1.8.0')) {
+ list[0] = '1.8.0';
+ } else if (deployJava.testUsingActiveX('1.7.0')) {
+ list[0] = '1.7.0';
+ } else if (deployJava.testUsingActiveX('1.6.0')) {
+ list[0] = '1.6.0';
+ } else if (deployJava.testUsingActiveX('1.5.0')) {
+ list[0] = '1.5.0';
+ } else if (deployJava.testUsingActiveX('1.4.2')) {
+ list[0] = '1.4.2';
+ } else if (deployJava.testForMSVM()) {
+ list[0] = '1.1';
+ }
+ }
+ else if (browser == 'Netscape Family') {
+ if (deployJava.testUsingMimeTypes('1.8')) {
+ list[0] = '1.8.0';
+ } else if (deployJava.testUsingMimeTypes('1.7')) {
+ list[0] = '1.7.0';
+ } else if (deployJava.testUsingMimeTypes('1.6')) {
+ list[0] = '1.6.0';
+ } else if (deployJava.testUsingMimeTypes('1.5')) {
+ list[0] = '1.5.0';
+ } else if (deployJava.testUsingMimeTypes('1.4.2')) {
+ list[0] = '1.4.2';
+ }
+ } else if (browser == 'Safari') {
+ if (deployJava.testUsingPluginsArray('1.8.0')) {
+ list[0] = '1.8.0';
+ } else if (deployJava.testUsingPluginsArray('1.7.0')) {
+ list[0] = '1.7.0';
+ } else if (deployJava.testUsingPluginsArray('1.6.0')) {
+ list[0] = '1.6.0';
+ } else if (deployJava.testUsingPluginsArray('1.5.0')) {
+ list[0] = '1.5.0';
+ } else if (deployJava.testUsingPluginsArray('1.4.2')) {
+ list[0] = '1.4.2';
+ }
+ }
+ }
+
+ if (deployJava.debug) {
+ for (var i = 0; i < list.length; ++i) {
+ alert('We claim to have detected Java SE ' + list[i]);
+ }
+ }
+
+ return list;
+ },
+
+ /**
+ * Triggers a JRE installation. The exact effect of triggering an
+ * installation varies based on platform, browser, and if the
+ * Deployment Toolkit plugin is installed.
+ *
+ * The requestVersion string is of the form #[.#[.#[_#]]][+|*],
+ * which includes strings such as "1.4", "1.5.0*", and "1.6.0_02+".
+ * A star (*) means "any version starting within this family" and
+ * a plus (+) means "any version greater or equal to this".
+ * "1.5.0*" * matches 1.5.0_06 but not 1.6.0_01, whereas
+ * "1.5.0+" matches both.
+ *
+ * If the Deployment Toolkit plugin is not present, this will just call
+ * deployJava.installLatestJRE().
+ */
+ installJRE: function(requestVersion) {
+ var ret = false;
+ if (deployJava.isPluginInstalled()) {
+ if (deployJava.getPlugin().installJRE(requestVersion)) {
+ deployJava.refresh();
+ if (deployJava.returnPage != null) {
+ document.location = deployJava.returnPage;
+ }
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ return deployJava.installLatestJRE();
+ }
+ },
+
+
+ /**
+ * Triggers a JRE installation. The exact effect of triggering an
+ * installation varies based on platform, browser, and if the
+ * Deployment Toolkit plugin is installed.
+ *
+ * In the simplest case, the browser window will be redirected to the
+ * java.com JRE installation page, and (if possible) a redirect back to
+ * the current URL upon successful installation. The return redirect is
+ * not always possible, as the JRE installation may require the browser to
+ * be restarted.
+ *
+ * In the best case (when the Deployment Toolkit plugin is present), this
+ * function will immediately cause a progress dialog to be displayed
+ * as the JRE is downloaded and installed.
+ */
+ installLatestJRE: function() {
+ if (deployJava.isPluginInstalled()) {
+ if (deployJava.getPlugin().installLatestJRE()) {
+ deployJava.refresh();
+ if (deployJava.returnPage != null) {
+ document.location = deployJava.returnPage;
+ }
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ var browser = deployJava.getBrowser();
+ var platform = navigator.platform.toLowerCase();
+ if ((deployJava.EAInstallEnabled == 'true') &&
+ (platform.indexOf('win') != -1) &&
+ (deployJava.EarlyAccessURL != null)) {
+
+ deployJava.preInstallJREList = deployJava.getJREs();
+ if (deployJava.returnPage != null) {
+ deployJava.myInterval =
+ setInterval("deployJava.poll()", 3000);
+ }
+
+ location.href = deployJava.EarlyAccessURL;
+
+ // we have to return false although there may be an install
+ // in progress now, when complete it may go to return page
+ return false;
+ } else {
+ if (browser == 'MSIE') {
+ return deployJava.IEInstall();
+ } else if ((browser == 'Netscape Family') &&
+ (platform.indexOf('win32') != -1)) {
+ return deployJava.FFInstall();
+ } else {
+ location.href = deployJava.getJavaURL +
+ ((deployJava.returnPage != null) ?
+ ('&returnPage=' + deployJava.returnPage) : '') +
+ ((deployJava.locale != null) ?
+ ('&locale=' + deployJava.locale) : '') +
+ ((deployJava.brand != null) ?
+ ('&brand=' + deployJava.brand) : '');
+ }
+ // we have to return false although there may be an install
+ // in progress now, when complete it may go to return page
+ return false;
+ }
+ }
+ },
+
+
+ /**
+ * Ensures that an appropriate JRE is installed and then runs an applet.
+ * minimumVersion is of the form #[.#[.#[_#]]], and is the minimum
+ * JRE version necessary to run this applet. minimumVersion is optional,
+ * defaulting to the value "1.1" (which matches any JRE).
+ * If an equal or greater JRE is detected, runApplet() will call
+ * writeAppletTag(attributes, parameters) to output the applet tag,
+ * otherwise it will call installJRE(minimumVersion + '+').
+ *
+ * After installJRE() is called, the script will attempt to detect that the
+ * JRE installation has completed and begin running the applet, but there
+ * are circumstances (such as when the JRE installation requires a browser
+ * restart) when this cannot be fulfilled.
+ *
+ * As with writeAppletTag(), this function should only be called prior to
+ * the web page being completely rendered. Note that version wildcards
+ * (star (*) and plus (+)) are not supported, and including them in the
+ * minimumVersion will result in an error message.
+ */
+ runApplet: function(attributes, parameters, minimumVersion) {
+ if (minimumVersion == 'undefined' || minimumVersion == null) {
+ minimumVersion = '1.1';
+ }
+
+ var regex = "^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$";
+
+ var matchData = minimumVersion.match(regex);
+
+ if (deployJava.returnPage == null) {
+ // if there is an install, come back here and run the applet
+ deployJava.returnPage = document.location;
+ }
+
+ if (matchData != null) {
+ var browser = deployJava.getBrowser();
+ if ((browser != '?') && (browser != 'Safari')) {
+ if (deployJava.versionCheck(minimumVersion + '+')) {
+ deployJava.writeAppletTag(attributes, parameters);
+ } else if (deployJava.installJRE(minimumVersion + '+')) {
+ // after successfull install we need to refresh page to pick
+ // pick up new plugin
+ deployJava.refresh();
+ location.href = document.location;
+ deployJava.writeAppletTag(attributes, parameters);
+ }
+ } else {
+ // for unknown or Safari - just try to show applet
+ deployJava.writeAppletTag(attributes, parameters);
+ }
+ } else {
+ if (deployJava.debug) {
+ alert('Invalid minimumVersion argument to runApplet():' +
+ minimumVersion);
+ }
+ }
+ },
+
+
+ /**
+ * Outputs an applet tag with the specified attributes and parameters, where
+ * both attributes and parameters are associative arrays. Each key/value
+ * pair in attributes becomes an attribute of the applet tag itself, while
+ * key/value pairs in parameters become <PARAM> tags. No version checking
+ * or other special behaviors are performed; the tag is simply written to
+ * the page using document.writeln().
+ *
+ * As document.writeln() is generally only safe to use while the page is
+ * being rendered, you should never call this function after the page
+ * has been completed.
+ */
+ writeAppletTag: function(attributes, parameters) {
+ var s = '<' + 'applet ';
+ for (var attribute in attributes) {
+ s += (' ' + attribute + '="' + attributes[attribute] + '"');
+ }
+ s += '>';
+ document.write(s);
+
+ if (parameters != 'undefined' && parameters != null) {
+ for (var parameter in parameters) {
+ s = '<param name="' + parameter + '" value="' +
+ parameters[parameter] + '">';
+ document.write(s);
+ }
+ }
+ document.write('<' + '/' + 'applet' + '>');
+ },
+
+
+ /**
+ * Returns true if there is a matching JRE version currently installed
+ * (among those detected by getJREs()). The versionPattern string is
+ * of the form #[.#[.#[_#]]][+|*], which includes strings such as "1.4",
+ * "1.5.0*", and "1.6.0_02+".
+ * A star (*) means "any version within this family" and a plus (+) means
+ * "any version greater or equal to the specified version". "1.5.0*"
+ * matches 1.5.0_06 but not 1.6.0_01, whereas "1.5.0+" matches both.
+ *
+ * If the versionPattern does not include all four version components
+ * but does not end with a star or plus, it will be treated as if it
+ * ended with a star. "1.5" is exactly equivalent to "1.5*", and will
+ * match any version number beginning with "1.5".
+ *
+ * If getJREs() is unable to detect the precise version number, a match
+ * could be ambiguous. For example if getJREs() detects "1.5", there is
+ * no way to know whether the JRE matches "1.5.0_06+". versionCheck()
+ * compares only as much of the version information as could be detected,
+ * so versionCheck("1.5.0_06+") would return true in in this case.
+ *
+ * Invalid versionPattern will result in a JavaScript error alert.
+ * versionPatterns which are valid but do not match any existing JRE
+ * release (e.g. "32.65+") will always return false.
+ */
+ versionCheck: function(versionPattern)
+ {
+ var index = 0;
+ var regex = "^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?(\\*|\\+)?$";
+
+ var matchData = versionPattern.match(regex);
+
+ if (matchData != null) {
+ var familyMatch = true;
+
+ var patternArray = new Array();
+
+ for (var i = 1; i < matchData.length; ++i) {
+ // browser dependency here.
+ // Fx sets 'undefined', IE sets '' string for unmatched groups
+ if ((typeof matchData[i] == 'string') && (matchData[i] != '')) {
+ patternArray[index] = matchData[i];
+ index++;
+ }
+ }
+
+ if (patternArray[patternArray.length-1] == '+') {
+ familyMatch = false;
+ patternArray.length--;
+ } else {
+ if (patternArray[patternArray.length-1] == '*') {
+ patternArray.length--;
+ }
+ }
+
+ var list = deployJava.getJREs();
+ for (var i = 0; i < list.length; ++i) {
+ if (deployJava.compareVersionToPattern(list[i], patternArray,
+ familyMatch)) {
+ return true;
+ }
+ }
+
+ return false;
+ } else {
+ alert('Invalid versionPattern passed to versionCheck: ' +
+ versionPattern);
+ return false;
+ }
+ },
+
+
+ /**
+ * Returns true if an installation of Java Web Start of the specified
+ * minimumVersion can be detected. minimumVersion is optional, and
+ * if not specified, '1.4.2' will be used.
+ * (Versions earlier than 1.4.2 may not be detected.)
+ */
+ isWebStartInstalled: function(minimumVersion) {
+
+ var browser = deployJava.getBrowser();
+ if ((browser == '?') || (browser == 'Safari')) {
+ // we really don't know - better to try to use it than reinstall
+ return true;
+ }
+
+ if (minimumVersion == 'undefined' || minimumVersion == null) {
+ minimumVersion = '1.4.2';
+ }
+
+ var retval = false;
+ var regex = "^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$";
+ var matchData = minimumVersion.match(regex);
+
+ if (matchData != null) {
+ retval = deployJava.versionCheck(minimumVersion + '+');
+ } else {
+ if (deployJava.debug) {
+ alert('Invalid minimumVersion argument to isWebStartInstalled(): ' + minimumVersion);
+ }
+ retval = deployJava.versionCheck('1.4.2+');
+ }
+ return retval;
+ },
+
+
+ /**
+ * Outputs a launch button for the specified JNLP URL. When clicked, the
+ * button will ensure that an appropriate JRE is installed and then launch
+ * the JNLP application. minimumVersion is of the form #[.#[.#[_#]]], and
+ * is the minimum JRE version necessary to run this JNLP application.
+ * minimumVersion is optional, and if it is not specified, '1.4.2'
+ * will be used.
+ * If an appropriate JRE or Web Start installation is detected,
+ * the JNLP application will be launched, otherwise installLatestJRE()
+ * will be called.
+ *
+ * After installLatestJRE() is called, the script will attempt to detect
+ * that the JRE installation has completed and launch the JNLP application,
+ * but there are circumstances (such as when the JRE installation
+ * requires a browser restart) when this cannot be fulfilled.
+ */
+ createWebStartLaunchButton: function(jnlp, minimumVersion) {
+
+ if (deployJava.returnPage == null) {
+ // if there is an install, come back and run the jnlp file
+ deployJava.returnPage = jnlp;
+ }
+
+ var url = 'javascript:' +
+ 'if (!deployJava.isWebStartInstalled(&quot;' +
+ minimumVersion + '&quot;)) {' +
+ 'if (deployJava.installLatestJRE()) {' +
+ 'if (deployJava.launch(&quot;' + jnlp + '&quot;)) {}' +
+ '}' +
+ '} else {' +
+ 'if (deployJava.launch(&quot;' + jnlp + '&quot;)) {}' +
+ '}';
+
+ document.write('<' + 'a href="' + url +
+ '" onMouseOver="window.status=\'\'; ' +
+ 'return true;"><' + 'img ' +
+ 'src="' + deployJava.launchButtonPNG + '" ' +
+ 'border="0" /><' + '/' + 'a' + '>');
+ },
+
+
+ /**
+ * Launch a JNLP application, (using the plugin if available)
+ */
+ launch: function(jnlp) {
+ if (deployJava.isPluginInstalled()) {
+ return deployJava.getPlugin().launch(jnlp);
+ } else {
+ document.location=jnlp;
+ return true;
+ }
+ },
+
+
+ /*
+ * returns true if the ActiveX or XPI plugin is installed
+ */
+ isPluginInstalled: function() {
+ var plugin = deployJava.getPlugin();
+ if (plugin && plugin.jvms) {
+ return true;
+ } else {
+ return false;
+ }
+ },
+
+ /*
+ * returns true if the plugin is installed and AutoUpdate is enabled
+ */
+ isAutoUpdateEnabled: function() {
+ if (deployJava.isPluginInstalled()) {
+ return deployJava.getPlugin().isAutoUpdateEnabled();
+ }
+ return false;
+ },
+
+ /*
+ * sets AutoUpdate on if plugin is installed
+ */
+ setAutoUpdateEnabled: function() {
+ if (deployJava.isPluginInstalled()) {
+ return deployJava.getPlugin().setAutoUpdateEnabled();
+ }
+ return false;
+ },
+
+ /*
+ * sets the preferred install type : null, online, kernel
+ */
+ setInstallerType: function(type) {
+ deployJava.installType = type;
+ if (deployJava.isPluginInstalled()) {
+ return deployJava.getPlugin().setInstallerType(type);
+ }
+ return false;
+ },
+
+ /*
+ * sets additional package list - to be used by kernel installer
+ */
+ setAdditionalPackages: function(packageList) {
+ if (deployJava.isPluginInstalled()) {
+ return deployJava.getPlugin().setAdditionalPackages(
+ packageList);
+ }
+ return false;
+ },
+
+ /*
+ * sets preference to install Early Access versions if available
+ */
+ setEarlyAccess: function(enabled) {
+ deployJava.EAInstallEnabled = enabled;
+ },
+
+ /*
+ * Determines if the next generation plugin (Plugin II) is default
+ */
+ isPlugin2: function() {
+ if (deployJava.isPluginInstalled()) {
+ try {
+ return deployJava.getPlugin().isPlugin2();
+ } catch (err) {
+ // older plugin w/o isPlugin2() function - just fall through
+ }
+ }
+ return false;
+ },
+
+
+ getPlugin: function() {
+ deployJava.refresh();
+ var ret = document.getElementById('deployJavaPlugin');
+ return ret;
+ },
+
+ compareVersionToPattern: function(version, patternArray, familyMatch) {
+ var regex = "^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+)(?:_(\\d+))?)?)?$";
+ var matchData = version.match(regex);
+
+ if (matchData != null) {
+ var index = 0;
+ var result = new Array();
+
+ for (var i = 1; i < matchData.length; ++i) {
+ if ((typeof matchData[i] == 'string') && (matchData[i] != ''))
+ {
+ result[index] = matchData[i];
+ index++;
+ }
+ }
+
+ var l = Math.min(result.length, patternArray.length);
+
+ if (familyMatch) {
+ for (var i = 0; i < l; ++i) {
+ if (result[i] != patternArray[i]) return false;
+ }
+
+ return true;
+ } else {
+ for (var i = 0; i < l; ++i) {
+ if (result[i] < patternArray[i]) {
+ return false;
+ } else if (result[i] > patternArray[i]) {
+ return true;
+ }
+ }
+
+ return true;
+ }
+ } else {
+ return false;
+ }
+ },
+
+
+ getBrowser: function() {
+ var browser = navigator.userAgent.toLowerCase();
+
+ if (deployJava.debug) {
+ alert('userAgent -> ' + browser);
+ }
+
+ if ((navigator.vendor) &&
+ (navigator.vendor.toLowerCase().indexOf('apple') != -1) &&
+ (browser.indexOf('safari') != -1)) {
+ if (deployJava.debug) {
+ alert('We claim to have detected "Safari".');
+ }
+ return 'Safari';
+ } else if (browser.indexOf('msie') != -1) {
+ if (deployJava.debug) {
+ alert('We claim to have detected "IE".');
+ }
+ return 'MSIE';
+ } else if ((browser.indexOf('mozilla') != -1) ||
+ (browser.indexOf('firefox') != -1)) {
+ if (deployJava.debug) {
+ alert('We claim to have detected a Netscape family browser.');
+ }
+ return 'Netscape Family';
+ } else {
+ if (deployJava.debug) {
+ alert('We claim to have failed to detect a browser.');
+ }
+ return '?';
+ }
+ },
+
+
+ testUsingActiveX: function(version) {
+ var objectName = 'JavaWebStart.isInstalled.' + version + '.0';
+
+ if (!ActiveXObject) {
+ if (deployJava.debug) {
+ alert ('Browser claims to be IE, but no ActiveXObject object?');
+ }
+ return false;
+ }
+
+ try {
+ return (new ActiveXObject(objectName) != null);
+ } catch (exception) {
+ return false;
+ }
+ },
+
+
+ testForMSVM: function() {
+ var clsid = '{08B0E5C0-4FCB-11CF-AAA5-00401C608500}';
+
+ if (typeof oClientCaps != 'undefined') {
+ var v = oClientCaps.getComponentVersion(clsid, "ComponentID");
+ if ((v == '') || (v == '5,0,5000,0')) {
+ return false;
+ } else {
+ return true;
+ }
+ } else {
+ return false;
+ }
+ },
+
+
+ testUsingMimeTypes: function(version) {
+ if (!navigator.mimeTypes) {
+ if (deployJava.debug) {
+ alert ('Browser claims to be Netscape family, but no mimeTypes[] array?');
+ }
+ return false;
+ }
+
+ for (var i = 0; i < navigator.mimeTypes.length; ++i) {
+ s = navigator.mimeTypes[i].type;
+ var m = s.match(/^application\/x-java-applet\x3Bversion=(1\.8|1\.7|1\.6|1\.5|1\.4\.2)$/);
+ if (m != null) {
+ if (deployJava.compareVersions(m[1], version)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ },
+
+
+ testUsingPluginsArray: function(version) {
+ if ((!navigator.plugins) || (!navigator.plugins.length)) {
+ if (deployJava.debug) {
+ alert ('Browser claims to be Safari, but no plugins[] array?');
+ }
+ return false;
+ }
+
+ for (var i = 0; i < navigator.plugins.length; ++i) {
+ s = navigator.plugins[i].description;
+
+ if (s.search(/^Java Switchable Plug-in/) != -1) {
+ return true;
+ }
+
+ m = s.match(/^Java (1\.4\.2|1\.5|1\.6|1\.7).* Plug-in/);
+ if (m != null) {
+ if (deployJava.compareVersions(m[1], version)) return true;
+ }
+ }
+ return false;
+ },
+
+ IEInstall: function() {
+
+ location.href = deployJava.getJavaURL +
+ ((deployJava.returnPage != null) ?
+ ('&returnPage=' + deployJava.returnPage) : '') +
+ ((deployJava.locale != null) ?
+ ('&locale=' + deployJava.locale) : '') +
+ ((deployJava.brand != null) ? ('&brand=' + deployJava.brand) : '') +
+ ((deployJava.installType != null) ?
+ ('&type=' + deployJava.installType) : '');
+
+ // should not actually get here
+ return false;
+ },
+
+ done: function (name, result) {
+ },
+
+ FFInstall: function() {
+
+ location.href = deployJava.getJavaURL +
+ ((deployJava.returnPage != null) ?
+ ('&returnPage=' + deployJava.returnPage) : '') +
+ ((deployJava.locale != null) ?
+ ('&locale=' + deployJava.locale) : '') +
+ ((deployJava.brand != null) ? ('&brand=' + deployJava.brand) : '') +
+ ((deployJava.installType != null) ?
+ ('&type=' + deployJava.installType) : '');
+
+ // should not actually get here
+ return false;
+ },
+
+ // return true if 'installed' (considered as a JRE version string) is
+ // greater than or equal to 'required' (again, a JRE version string).
+ compareVersions: function(installed, required) {
+
+ var a = installed.split('.');
+ var b = required.split('.');
+
+ for (var i = 0; i < a.length; ++i) {
+ a[i] = Number(a[i]);
+ }
+ for (var i = 0; i < b.length; ++i) {
+ b[i] = Number(b[i]);
+ }
+ if (a.length == 2) {
+ a[2] = 0;
+ }
+
+ if (a[0] > b[0]) return true;
+ if (a[0] < b[0]) return false;
+
+ if (a[1] > b[1]) return true;
+ if (a[1] < b[1]) return false;
+
+ if (a[2] > b[2]) return true;
+ if (a[2] < b[2]) return false;
+
+ return true;
+ },
+
+
+ enableAlerts: function() {
+ deployJava.debug = true;
+ },
+
+ poll: function() {
+
+ deployJava.refresh();
+ var postInstallJREList = deployJava.getJREs();
+
+ if ((deployJava.preInstallJREList.length == 0) &&
+ (postInstallJREList.length != 0)) {
+ clearInterval(deployJava.myInterval);
+ if (deployJava.returnPage != null) {
+ location.href = deployJava.returnPage;
+ };
+ }
+
+ if ((deployJava.preInstallJREList.length != 0) &&
+ (postInstallJREList.length != 0) &&
+ (deployJava.preInstallJREList[0] != postInstallJREList[0])) {
+ clearInterval(deployJava.myInterval);
+ if (deployJava.returnPage != null) {
+ location.href = deployJava.returnPage;
+ }
+ }
+
+ },
+
+ writePluginTag: function() {
+ var browser = deployJava.getBrowser();
+ if (browser == 'MSIE') {
+ document.write('<' +
+ 'object classid="clsid:CAFEEFAC-DEC7-0000-0000-ABCDEFFEDCBA" ' +
+ 'id="deployJavaPlugin" width="0" height="0">' +
+ '<' + '/' + 'object' + '>');
+ } else if (browser == 'Netscape Family') {
+ if (navigator.mimeTypes != null) for (var i=0;
+ i < navigator.mimeTypes.length; i++) {
+ if (navigator.mimeTypes[i].type == deployJava.mimeType) {
+ if (navigator.mimeTypes[i].enabledPlugin) {
+ document.write('<' +
+ 'embed id="deployJavaPlugin" type="' +
+ deployJava.mimeType + '" hidden="true" />');
+ }
+ }
+ }
+ }
+ },
+
+ refresh: function() {
+ navigator.plugins.refresh(false);
+
+ var browser = deployJava.getBrowser();
+ if (browser == 'Netscape Family') {
+ var plugin = document.getElementById('deployJavaPlugin');
+ // only do this again if no plugin
+ if (plugin == null) {
+ if (navigator.mimeTypes != null) for (var i=0;
+ i < navigator.mimeTypes.length; i++) {
+ if (navigator.mimeTypes[i].type == deployJava.mimeType) {
+ if (navigator.mimeTypes[i].enabledPlugin) {
+ document.write('<' +
+ 'embed id="deployJavaPlugin" type="' +
+ deployJava.mimeType + '" hidden="true" />');
+ }
+ }
+ }
+ }
+ }
+ },
+
+ do_initialize: function() {
+ deployJava.writePluginTag();
+ if (deployJava.locale == null) {
+ var loc = null;
+
+ if (loc == null) try {
+ loc = navigator.userLanguage;
+ } catch (err) { }
+
+ if (loc == null) try {
+ loc = navigator.systemLanguage;
+ } catch (err) { }
+
+ if (loc == null) try {
+ loc = navigator.language;
+ } catch (err) { }
+
+ if (loc != null) {
+ loc.replace("-","_")
+ deployJava.locale = loc;
+ }
+ }
+ }
+
+};
+deployJava.do_initialize();
+
diff --git a/BKUOnline/src/test/java/at/gv/egiz/stal/service/STALRequestBrokerTest.java b/BKUOnline/src/test/java/at/gv/egiz/stal/service/STALRequestBrokerTest.java
new file mode 100644
index 00000000..cd321c71
--- /dev/null
+++ b/BKUOnline/src/test/java/at/gv/egiz/stal/service/STALRequestBrokerTest.java
@@ -0,0 +1,362 @@
+/*
+* Copyright 2008 Federal Chancellery Austria and
+* Graz University of Technology
+*
+* 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.
+*/
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package at.gv.egiz.stal.service;
+
+import at.gv.egiz.stal.service.impl.STALRequestBrokerImpl;
+import at.gv.egiz.stal.service.impl.RequestBrokerSTALFactory;
+import at.gv.egiz.stal.service.impl.STALRequestBroker;
+import at.gv.egiz.stal.ErrorResponse;
+import at.gv.egiz.stal.HashDataInputCallback;
+import at.gv.egiz.stal.InfoboxReadRequest;
+import at.gv.egiz.stal.InfoboxReadResponse;
+import at.gv.egiz.stal.QuitRequest;
+import at.gv.egiz.stal.STALRequest;
+import at.gv.egiz.stal.STALResponse;
+import at.gv.egiz.stal.SignResponse;
+import at.gv.egiz.stal.SignRequest;
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ *
+ * @author clemens
+ */
+public class STALRequestBrokerTest {
+
+ private static final Log log = LogFactory.getLog(STALRequestBrokerTest.class);
+ protected static STALRequestBroker stal;
+
+ @BeforeClass
+ public static void setUp() {
+ RequestBrokerSTALFactory fac = new RequestBrokerSTALFactory();
+ stal = (STALRequestBrokerImpl) fac.createSTAL();
+ log.debug("Created STAL " + stal.getClass().getName());
+ }
+
+ @Ignore
+ public void testInfoboxRead() {
+// try {
+
+ log.debug("*************** test ReadInfoboxRequest for two infoboxes");
+ List<STALRequest> requests = new ArrayList<STALRequest>();
+ InfoboxReadRequest r1 = new InfoboxReadRequest();
+ r1.setInfoboxIdentifier("infobox1");
+ requests.add(r1);
+ InfoboxReadRequest r2 = new InfoboxReadRequest();
+ r2.setInfoboxIdentifier("infobox2");
+ requests.add(r2);
+
+ BindingProcessorSimulator bp = new BindingProcessorSimulator();
+ bp.setRequests(Collections.singletonList(requests));
+
+ new Thread(bp, "BindingProcessor").start();
+ new Thread(new ServiceSimulator(), "STALService").start();
+
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException ex) {
+ log.error("interrupted: " + ex.getMessage());
+ }
+ }
+
+ @Ignore
+ public void testSign() {
+ log.debug("**************** test SignRequest");
+ List<STALRequest> requests = new ArrayList<STALRequest>();
+ SignRequest r1 = new SignRequest();
+ r1.setKeyIdentifier("keybox1");
+ r1.setSignedInfo("1234".getBytes());
+ r1.setHashDataInput(new HashDataInputCallback() {
+
+ @Override
+ public InputStream getHashDataInput(String referenceId) {
+ return new ByteArrayInputStream("hashdatainput1234".getBytes());
+ }
+ });
+ requests.add(r1);
+
+ BindingProcessorSimulator bp = new BindingProcessorSimulator();
+ bp.setRequests(Collections.singletonList(requests));
+
+ new Thread(bp, "BindingProcessor").start();
+// new Thread(bp2, "BindingProcessor2").start();
+ new Thread(new ServiceSimulator(), "STALService").start();
+
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException ex) {
+ log.error("interrupted: " + ex.getMessage());
+ }
+ }
+
+ @Ignore
+ public void testResponseTimeout() {
+ log.debug("**************** test SignRequest with responses timeout");
+ List<STALRequest> requests = new ArrayList<STALRequest>();
+ SignRequest r1 = new SignRequest();
+ r1.setKeyIdentifier("keybox1");
+ r1.setSignedInfo("1234".getBytes());
+ r1.setHashDataInput(new HashDataInputCallback() {
+
+ @Override
+ public InputStream getHashDataInput(String referenceId) {
+ return new ByteArrayInputStream("hashdatainput1234".getBytes());
+ }
+ });
+ requests.add(r1);
+
+ BindingProcessorSimulator bp = new BindingProcessorSimulator();
+ bp.setRequests(Collections.singletonList(requests));
+
+ new Thread(bp, "BindingProcessor").start();
+ new Thread(new TimeoutServiceSimulator(), "STALService").start();
+
+ try {
+ Thread.sleep(STALRequestBroker.TIMEOUT_MS + 1);
+ } catch (InterruptedException ex) {
+ log.error("interrupted: " + ex.getMessage());
+ }
+ }
+
+ @Ignore
+ public void testRequestTimeout() {
+ log.debug("**************** test requests timeout");
+ TimeoutBindingProcessorSimulator bp = new TimeoutBindingProcessorSimulator();
+
+ new Thread(bp, "BindingProcessor").start();
+ new Thread(new ServiceSimulator(), "STALService").start();
+
+ try {
+ Thread.sleep(STALRequestBroker.TIMEOUT_MS + 1);
+ } catch (InterruptedException ex) {
+ log.error("interrupted: " + ex.getMessage());
+ }
+ }
+
+ @Test
+ public void testMultipleServices() {
+ log.debug("**************** test multiple SignRequests");
+ List<STALRequest> requests = new ArrayList<STALRequest>();
+ SignRequest r1 = new SignRequest();
+ r1.setKeyIdentifier("keybox1");
+ r1.setSignedInfo("1234".getBytes());
+ r1.setHashDataInput(new HashDataInputCallback() {
+
+ @Override
+ public InputStream getHashDataInput(String referenceId) {
+ return new ByteArrayInputStream("hashdatainput1234".getBytes());
+ }
+ });
+ requests.add(r1);
+
+ List<STALRequest> requests2 = new ArrayList<STALRequest>();
+ SignRequest r2 = new SignRequest();
+ r2.setKeyIdentifier("keybox2");
+ r2.setSignedInfo("6789".getBytes());
+ r2.setHashDataInput(new HashDataInputCallback() {
+
+ @Override
+ public InputStream getHashDataInput(String referenceId) {
+ return new ByteArrayInputStream("hashdatainput6789".getBytes());
+ }
+ });
+ requests2.add(r2);
+
+ BindingProcessorSimulator bp = new BindingProcessorSimulator();
+ List<List<STALRequest>> requestList = new ArrayList<List<STALRequest>>();
+ requestList.add(requests);
+ requestList.add(requests2);
+ bp.setRequests(requestList);
+
+ new Thread(bp, "BindingProcessor").start();
+// new Thread(bp2, "BindingProcessor2").start();
+ new Thread(new ServiceSimulator(), "STALService1").start();
+ new Thread(new ServiceSimulator(), "STALService2").start();
+
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException ex) {
+ log.error("interrupted: " + ex.getMessage());
+ }
+ }
+
+ class ServiceSimulator implements Runnable {
+
+ @Override
+ public void run() {
+ try {
+ // first call w/ empty response list
+ log.debug("calling stal.nextRequest");
+ List<STALRequest> requests = stal.nextRequest(null); //new ArrayList<ResponseType>());
+ log.debug("got " + requests.size() + " requests. processing...");
+ Thread.sleep(1);
+ List<STALResponse> responses = new ArrayList<STALResponse>();
+ for (STALRequest request : requests) {
+ if (request instanceof InfoboxReadRequest) {
+ InfoboxReadResponse r = new InfoboxReadResponse();
+ r.setInfoboxValue("dummyInfobox".getBytes());
+ responses.add(r);
+ } else if (request instanceof SignRequest) {
+
+ log.debug("calling stal.getCurrentHashDataInputCallback");
+ HashDataInputCallback cb = stal.getHashDataInput();
+ assertNotNull(cb);
+ InputStream hd = cb.getHashDataInput("1234");
+ byte[] data = new byte[hd.available()];
+ hd.read(data);
+ log.debug("got HashDataInput " + new String(data));
+
+
+ SignResponse r = new SignResponse();
+ r.setSignatureValue("dummySignature".getBytes());
+ responses.add(r);
+ } else if (request instanceof QuitRequest) {
+ log.debug("received UNEXPECTED QUIT request");
+ return;
+ }
+ }
+
+// if (requests.size() > 0) {
+// log.debug("calling stal.setResponse with " + requests.size() + " responses");
+// stal.setResponse(responses);
+// }
+ log.debug("calling stal.nextRequest with " + responses.size() + " responses");
+ requests = stal.nextRequest(responses);
+ for (STALRequest request : requests) {
+ if (request instanceof QuitRequest) {
+ log.debug("got QUIT request");
+ } else {
+ log.debug("expected QUIT request, got " + request.getClass().getName());
+ }
+ }
+ } catch (IOException ex) {
+ log.error(ex.getMessage());
+ } catch (InterruptedException ex) {
+ log.error(ex.getMessage());
+ }
+ }
+ }
+
+ class TimeoutServiceSimulator implements Runnable {
+
+ @Override
+ public void run() {
+ try {
+ // first call w/ empty response list
+ log.debug("calling stal.nextRequest");
+ List<STALRequest> requests = stal.nextRequest(null); //new ArrayList<ResponseType>());
+ log.debug("got " + requests.size() + " requests. processing...");
+ Thread.sleep(1);
+ for (STALRequest request : requests) {
+// if (request instanceof InfoboxReadRequest) {
+ if (request instanceof SignRequest) {
+ log.debug("calling stal.getCurrentHashDataInputCallback");
+ HashDataInputCallback cb = stal.getHashDataInput();
+ assertNotNull(cb);
+ InputStream hd = cb.getHashDataInput("1234");
+ byte[] data = new byte[hd.available()];
+ hd.read(data);
+ log.debug("got HashDataInput " + new String(data));
+ } else if (request instanceof QuitRequest) {
+ log.debug("received UNEXPECTED QUIT requests");
+ return;
+ }
+ }
+ log.debug("simulating timeout ...");
+ } catch (IOException ex) {
+ log.error(ex.getMessage());
+ } catch (InterruptedException ex) {
+ log.error(ex.getMessage());
+ }
+ }
+ }
+
+ class BindingProcessorSimulator implements Runnable {
+
+ List<List<STALRequest>> requestsLists;
+
+ public void setRequests(List<List<STALRequest>> requests) {
+ this.requestsLists = requests;
+ }
+
+ @Override
+ public void run() {
+
+ //simulate SLCommand execution
+ for (List<STALRequest> requests : requestsLists) {
+ execSLCommand(requests);
+
+ log.debug("SLCommand finished, calling stal.handleReqeusts(QUIT)");
+ stal.handleRequest(Collections.singletonList((STALRequest) new QuitRequest()));
+ log.debug("QUIT returned (waiting for applet reload)");
+ }
+
+ }
+
+ public void execSLCommand(List<STALRequest> requests) {
+ int numReq = requests.size();
+ log.debug("SLCommand calling stal.handleRequests " + numReq + " requests");
+ List<STALResponse> responses = stal.handleRequest(requests);
+ assertEquals(numReq, responses.size());
+ for (int i = 0; i < numReq; i++) {
+ STALRequest request = requests.get(i);
+ STALResponse response = responses.get(i);
+
+ if (response instanceof ErrorResponse) {
+ log.warn("SLCommand received unexpected error response from STAL: " + ((ErrorResponse) response).getErrorCode());
+ } else if (request instanceof InfoboxReadRequest) {
+ assertTrue(response instanceof InfoboxReadResponse);
+ String infobox = new String(((InfoboxReadResponse) response).getInfoboxValue());
+ log.debug("SLCommand received expected InfoboxReadResponse from STAL: " + infobox);
+ } else if (request instanceof SignRequest) {
+ assertTrue(response instanceof SignResponse);
+ String signVal = new String(((SignResponse) response).getSignatureValue());
+ log.debug("SLCommand received expected SignResponse from STAL: " + signVal);
+ } else {
+ log.error("***** RequestType: " + request.getClass() + " TODO");
+ }
+ //TODO
+ }
+
+ }
+ }
+
+ class TimeoutBindingProcessorSimulator implements Runnable {
+
+ @Override
+ public void run() {
+
+ //simulate SLCommand execution
+ log.debug("simulating timeout ...");
+ }
+ }
+}