From 9db6fe83cf8858b35d2a4fde4dff3f5bc6dbf823 Mon Sep 17 00:00:00 2001 From: Pavol Mederly Date: Wed, 1 Oct 2014 23:24:54 +0200 Subject: [PATCH] Made model WSDL processable by CXF 3.0 by stripping "#" from publicId/systemId of xmlenc and xmldsig. --- .../evolveum/midpoint/prism/schema/SchemaRegistry.java | 5 ++++- .../prism/src/main/resources/META-INF/catalog-runtime.xml | 6 ++---- infra/prism/src/main/resources/xml/ns/public/types-3.xsd | 2 +- .../src/main/resources/xml/ns/standard/xenc-schema.xsd | 2 +- infra/prism/src/main/resources/xml/ns/test/foo-1.xsd | 2 +- .../src/main/resources/META-INF/catalog-compile-time.xml | 8 ++++---- .../src/main/resources/META-INF/catalog-runtime.xml | 8 ++++---- .../resources/META-INF/jax-ws-catalog-model-context.xml | 8 ++++---- .../src/main/resources/xml/ns/public/common/common-3.xsd | 2 +- .../xml/ns/public/model/context/model-context-3.xsd | 2 +- .../src/main/resources/xml/ns/standard/xenc-schema.xsd | 2 +- model/model-client/src/compile/resources/catalog.xml | 8 ++++---- .../model-client/src/main/resources/META-INF/catalog.xml | 8 ++++---- 13 files changed, 32 insertions(+), 31 deletions(-) diff --git a/infra/prism/src/main/java/com/evolveum/midpoint/prism/schema/SchemaRegistry.java b/infra/prism/src/main/java/com/evolveum/midpoint/prism/schema/SchemaRegistry.java index d946270d323..1355bee0c5e 100644 --- a/infra/prism/src/main/java/com/evolveum/midpoint/prism/schema/SchemaRegistry.java +++ b/infra/prism/src/main/java/com/evolveum/midpoint/prism/schema/SchemaRegistry.java @@ -564,7 +564,10 @@ public InputSource resolveResourceUsingBuiltinResolver(String type, String names // The systemId will be populated by schema location, not namespace URI. // As we use catalog resolver as the default one, we need to pass it the namespaceURI in place of systemId inputSource = builtinSchemaResolver.resolveEntity(publicId, namespaceURI); - } else { + } + // however, there are cases where systemId differs from namespaceURI (e.g. when namespace ends with '#') + // so, give systemId a try... + if (inputSource == null) { inputSource = builtinSchemaResolver.resolveEntity(publicId, systemId); } } catch (SAXException e) { diff --git a/infra/prism/src/main/resources/META-INF/catalog-runtime.xml b/infra/prism/src/main/resources/META-INF/catalog-runtime.xml index c7aced5077a..785f7a98b77 100644 --- a/infra/prism/src/main/resources/META-INF/catalog-runtime.xml +++ b/infra/prism/src/main/resources/META-INF/catalog-runtime.xml @@ -42,8 +42,8 @@ - - + + @@ -51,8 +51,6 @@ - - diff --git a/infra/prism/src/main/resources/xml/ns/public/types-3.xsd b/infra/prism/src/main/resources/xml/ns/public/types-3.xsd index 454ca4409b3..35196d374c8 100644 --- a/infra/prism/src/main/resources/xml/ns/public/types-3.xsd +++ b/infra/prism/src/main/resources/xml/ns/public/types-3.xsd @@ -45,7 +45,7 @@ - + The XML Encryption schema. Used for "protected" data types (property encryption). diff --git a/infra/prism/src/main/resources/xml/ns/standard/xenc-schema.xsd b/infra/prism/src/main/resources/xml/ns/standard/xenc-schema.xsd index 015d6ba9eeb..e5aa6e34723 100644 --- a/infra/prism/src/main/resources/xml/ns/standard/xenc-schema.xsd +++ b/infra/prism/src/main/resources/xml/ns/standard/xenc-schema.xsd @@ -31,7 +31,7 @@ targetNamespace='http://www.w3.org/2001/04/xmlenc#' elementFormDefault='qualified'> - + diff --git a/infra/prism/src/main/resources/xml/ns/test/foo-1.xsd b/infra/prism/src/main/resources/xml/ns/test/foo-1.xsd index c17cdf5261a..617c041e096 100644 --- a/infra/prism/src/main/resources/xml/ns/test/foo-1.xsd +++ b/infra/prism/src/main/resources/xml/ns/test/foo-1.xsd @@ -52,7 +52,7 @@ - + The XML Encryption schema. Used for "protected" data types (property encryption). diff --git a/infra/schema/src/main/resources/META-INF/catalog-compile-time.xml b/infra/schema/src/main/resources/META-INF/catalog-compile-time.xml index 924e882521b..def1a643198 100644 --- a/infra/schema/src/main/resources/META-INF/catalog-compile-time.xml +++ b/infra/schema/src/main/resources/META-INF/catalog-compile-time.xml @@ -82,8 +82,8 @@ - - + + @@ -91,8 +91,8 @@ - - + + diff --git a/infra/schema/src/main/resources/META-INF/catalog-runtime.xml b/infra/schema/src/main/resources/META-INF/catalog-runtime.xml index af38fd4848d..cdee73d5ec6 100644 --- a/infra/schema/src/main/resources/META-INF/catalog-runtime.xml +++ b/infra/schema/src/main/resources/META-INF/catalog-runtime.xml @@ -79,8 +79,8 @@ - - + + @@ -88,8 +88,8 @@ - - + + diff --git a/infra/schema/src/main/resources/META-INF/jax-ws-catalog-model-context.xml b/infra/schema/src/main/resources/META-INF/jax-ws-catalog-model-context.xml index d8619b4c235..015a4a28548 100644 --- a/infra/schema/src/main/resources/META-INF/jax-ws-catalog-model-context.xml +++ b/infra/schema/src/main/resources/META-INF/jax-ws-catalog-model-context.xml @@ -58,8 +58,8 @@ - - + + @@ -67,7 +67,7 @@ - - + + diff --git a/infra/schema/src/main/resources/xml/ns/public/common/common-3.xsd b/infra/schema/src/main/resources/xml/ns/public/common/common-3.xsd index ac1f922f9cd..42c368038bc 100644 --- a/infra/schema/src/main/resources/xml/ns/public/common/common-3.xsd +++ b/infra/schema/src/main/resources/xml/ns/public/common/common-3.xsd @@ -69,7 +69,7 @@ + schemaLocation="http://www.w3.org/2001/04/xmlenc"> The XML Encryption schema. Used for "protected" data types (property encryption). diff --git a/infra/schema/src/main/resources/xml/ns/public/model/context/model-context-3.xsd b/infra/schema/src/main/resources/xml/ns/public/model/context/model-context-3.xsd index d0a33563f96..9640aa13c98 100644 --- a/infra/schema/src/main/resources/xml/ns/public/model/context/model-context-3.xsd +++ b/infra/schema/src/main/resources/xml/ns/public/model/context/model-context-3.xsd @@ -47,7 +47,7 @@ + schemaLocation="http://www.w3.org/2001/04/xmlenc"> The XML Encryption schema. Used for "protected" data types (property encryption). diff --git a/infra/schema/src/main/resources/xml/ns/standard/xenc-schema.xsd b/infra/schema/src/main/resources/xml/ns/standard/xenc-schema.xsd index 015d6ba9eeb..e5aa6e34723 100644 --- a/infra/schema/src/main/resources/xml/ns/standard/xenc-schema.xsd +++ b/infra/schema/src/main/resources/xml/ns/standard/xenc-schema.xsd @@ -31,7 +31,7 @@ targetNamespace='http://www.w3.org/2001/04/xmlenc#' elementFormDefault='qualified'> - + diff --git a/model/model-client/src/compile/resources/catalog.xml b/model/model-client/src/compile/resources/catalog.xml index 66377719663..7925ff64a4b 100644 --- a/model/model-client/src/compile/resources/catalog.xml +++ b/model/model-client/src/compile/resources/catalog.xml @@ -69,8 +69,8 @@ - - + + @@ -78,8 +78,8 @@ - - + + diff --git a/model/model-client/src/main/resources/META-INF/catalog.xml b/model/model-client/src/main/resources/META-INF/catalog.xml index 635888cba97..ec23dd83159 100644 --- a/model/model-client/src/main/resources/META-INF/catalog.xml +++ b/model/model-client/src/main/resources/META-INF/catalog.xml @@ -72,8 +72,8 @@ - - + + @@ -81,8 +81,8 @@ - - + +