Skip to content

Commit

Permalink
Made model WSDL processable by CXF 3.0 by stripping "#" from publicId…
Browse files Browse the repository at this point in the history
…/systemId of xmlenc and xmldsig.
  • Loading branch information
mederly committed Oct 1, 2014
1 parent 71c16b0 commit 9db6fe8
Show file tree
Hide file tree
Showing 13 changed files with 32 additions and 31 deletions.
Expand Up @@ -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) {
Expand Down
6 changes: 2 additions & 4 deletions infra/prism/src/main/resources/META-INF/catalog-runtime.xml
Expand Up @@ -42,17 +42,15 @@
<public publicId="XMLSchema.dtd" uri="../xml/ns/standard/XMLSchema.dtd" />
<system systemId="XMLSchema.dtd" uri="../xml/ns/standard/XMLSchema.dtd" />

<public publicId="http://www.w3.org/2001/04/xmlenc#" uri="../xml/ns/standard/xenc-schema.xsd" />
<system systemId="http://www.w3.org/2001/04/xmlenc#" uri="../xml/ns/standard/xenc-schema.xsd" />
<public publicId="http://www.w3.org/2001/04/xmlenc" uri="../xml/ns/standard/xenc-schema.xsd" />
<system systemId="http://www.w3.org/2001/04/xmlenc" uri="../xml/ns/standard/xenc-schema.xsd" />

<public publicId="http://www.w3.org/2001/XMLSchema" uri="../xml/ns/standard/XMLSchema.xsd" />
<system systemId="http://www.w3.org/2001/XMLSchema" uri="../xml/ns/standard/XMLSchema.xsd" />

<public publicId="http://www.w3.org/XML/1998/namespace" uri="../xml/ns/standard/xml.xsd" />
<system systemId="http://www.w3.org/XML/1998/namespace" uri="../xml/ns/standard/xml.xsd" />

<public publicId="http://www.w3.org/2000/09/xmldsig#" uri="../xml/ns/standard/xmldsig-core-schema.xsd" />
<system systemId="http://www.w3.org/2000/09/xmldsig#" uri="../xml/ns/standard/xmldsig-core-schema.xsd" />
<public publicId="http://www.w3.org/2000/09/xmldsig" uri="../xml/ns/standard/xmldsig-core-schema.xsd" />
<system systemId="http://www.w3.org/2000/09/xmldsig" uri="../xml/ns/standard/xmldsig-core-schema.xsd" />
</catalog>
2 changes: 1 addition & 1 deletion infra/prism/src/main/resources/xml/ns/public/types-3.xsd
Expand Up @@ -45,7 +45,7 @@
</xsd:annotation>
</xsd:import>

<xsd:import namespace="http://www.w3.org/2001/04/xmlenc#" schemaLocation="http://www.w3.org/2001/04/xmlenc#">
<xsd:import namespace="http://www.w3.org/2001/04/xmlenc#" schemaLocation="http://www.w3.org/2001/04/xmlenc">
<xsd:annotation>
<xsd:documentation>
The XML Encryption schema. Used for "protected" data types (property encryption).
Expand Down
Expand Up @@ -31,7 +31,7 @@
targetNamespace='http://www.w3.org/2001/04/xmlenc#'
elementFormDefault='qualified'>

<import namespace='http://www.w3.org/2000/09/xmldsig#' schemaLocation='xmldsig-core-schema.xsd' />
<import namespace='http://www.w3.org/2000/09/xmldsig#' schemaLocation='http://www.w3.org/2000/09/xmldsig' />

<complexType name='EncryptedType' abstract='true'>
<sequence>
Expand Down
2 changes: 1 addition & 1 deletion infra/prism/src/main/resources/xml/ns/test/foo-1.xsd
Expand Up @@ -52,7 +52,7 @@
</xsd:annotation>
</xsd:import>

<xsd:import namespace="http://www.w3.org/2001/04/xmlenc#" schemaLocation="http://www.w3.org/2001/04/xmlenc#">
<xsd:import namespace="http://www.w3.org/2001/04/xmlenc#" schemaLocation="http://www.w3.org/2001/04/xmlenc">
<xsd:annotation>
<xsd:documentation>
The XML Encryption schema. Used for "protected" data types (property encryption).
Expand Down
Expand Up @@ -82,17 +82,17 @@
<public publicId="XMLSchema.dtd" uri="../xml/ns/standard/XMLSchema.dtd" />
<system systemId="XMLSchema.dtd" uri="../xml/ns/standard/XMLSchema.dtd" />

<public publicId="http://www.w3.org/2001/04/xmlenc#" uri="../xml/ns/standard/xenc-schema.xsd" />
<system systemId="http://www.w3.org/2001/04/xmlenc#" uri="../xml/ns/standard/xenc-schema.xsd" />
<public publicId="http://www.w3.org/2001/04/xmlenc" uri="../xml/ns/standard/xenc-schema.xsd" />
<system systemId="http://www.w3.org/2001/04/xmlenc" uri="../xml/ns/standard/xenc-schema.xsd" />

<public publicId="http://www.w3.org/2001/XMLSchema" uri="../xml/ns/standard/XMLSchema.xsd" />
<system systemId="http://www.w3.org/2001/XMLSchema" uri="../xml/ns/standard/XMLSchema.xsd" />

<public publicId="http://www.w3.org/XML/1998/namespace" uri="../xml/ns/standard/xml.xsd" />
<system systemId="http://www.w3.org/XML/1998/namespace" uri="../xml/ns/standard/xml.xsd" />

<public publicId="http://www.w3.org/2000/09/xmldsig#" uri="../xml/ns/standard/xmldsig-core-schema.xsd" />
<system systemId="http://www.w3.org/2000/09/xmldsig#" uri="../xml/ns/standard/xmldsig-core-schema.xsd" />
<public publicId="http://www.w3.org/2000/09/xmldsig" uri="../xml/ns/standard/xmldsig-core-schema.xsd" />
<system systemId="http://www.w3.org/2000/09/xmldsig" uri="../xml/ns/standard/xmldsig-core-schema.xsd" />


</catalog>
8 changes: 4 additions & 4 deletions infra/schema/src/main/resources/META-INF/catalog-runtime.xml
Expand Up @@ -79,17 +79,17 @@
<public publicId="XMLSchema.dtd" uri="../xml/ns/standard/XMLSchema.dtd" />
<system systemId="XMLSchema.dtd" uri="../xml/ns/standard/XMLSchema.dtd" />

<public publicId="http://www.w3.org/2001/04/xmlenc#" uri="../xml/ns/standard/xenc-schema.xsd" />
<system systemId="http://www.w3.org/2001/04/xmlenc#" uri="../xml/ns/standard/xenc-schema.xsd" />
<public publicId="http://www.w3.org/2001/04/xmlenc" uri="../xml/ns/standard/xenc-schema.xsd" />
<system systemId="http://www.w3.org/2001/04/xmlenc" uri="../xml/ns/standard/xenc-schema.xsd" />

<public publicId="http://www.w3.org/2001/XMLSchema" uri="../xml/ns/standard/XMLSchema.xsd" />
<system systemId="http://www.w3.org/2001/XMLSchema" uri="../xml/ns/standard/XMLSchema.xsd" />

<public publicId="http://www.w3.org/XML/1998/namespace" uri="../xml/ns/standard/xml.xsd" />
<system systemId="http://www.w3.org/XML/1998/namespace" uri="../xml/ns/standard/xml.xsd" />

<public publicId="http://www.w3.org/2000/09/xmldsig#" uri="../xml/ns/standard/xmldsig-core-schema.xsd" />
<system systemId="http://www.w3.org/2000/09/xmldsig#" uri="../xml/ns/standard/xmldsig-core-schema.xsd" />
<public publicId="http://www.w3.org/2000/09/xmldsig" uri="../xml/ns/standard/xmldsig-core-schema.xsd" />
<system systemId="http://www.w3.org/2000/09/xmldsig" uri="../xml/ns/standard/xmldsig-core-schema.xsd" />


</catalog>
Expand Up @@ -58,16 +58,16 @@
<public publicId="XMLSchema.dtd" uri="../../../../../../infra/prism/src/main/resources/xml/ns/standard/XMLSchema.dtd" />
<system systemId="XMLSchema.dtd" uri="../../../../../../infra/prism/src/main/resources/xml/ns/standard/XMLSchema.dtd" />

<public publicId="http://www.w3.org/2001/04/xmlenc#" uri="../../../../../../infra/prism/src/main/resources/xml/ns/standard/xenc-schema.xsd" />
<system systemId="http://www.w3.org/2001/04/xmlenc#" uri="../../../../../../infra/prism/src/main/resources/xml/ns/standard/xenc-schema.xsd" />
<public publicId="http://www.w3.org/2001/04/xmlenc" uri="../../../../../../infra/prism/src/main/resources/xml/ns/standard/xenc-schema.xsd" />
<system systemId="http://www.w3.org/2001/04/xmlenc" uri="../../../../../../infra/prism/src/main/resources/xml/ns/standard/xenc-schema.xsd" />

<public publicId="http://www.w3.org/2001/XMLSchema" uri="../../../../../../infra/prism/src/main/resources/xml/ns/standard/XMLSchema.xsd" />
<system systemId="http://www.w3.org/2001/XMLSchema" uri="../../../../../../infra/prism/src/main/resources/xml/ns/standard/XMLSchema.xsd" />

<public publicId="http://www.w3.org/XML/1998/namespace" uri="../../../../../../infra/prism/src/main/resources/xml/ns/standard/xml.xsd" />
<system systemId="http://www.w3.org/XML/1998/namespace" uri="../../../../../../infra/prism/src/main/resources/xml/ns/standard/xml.xsd" />

<public publicId="http://www.w3.org/2000/09/xmldsig#" uri="../../../../../../infra/prism/src/main/resources/xml/ns/standard/xmldsig-core-schema.xsd" />
<system systemId="http://www.w3.org/2000/09/xmldsig#" uri="../../../../../../infra/prism/src/main/resources/xml/ns/standard/xmldsig-core-schema.xsd" />
<public publicId="http://www.w3.org/2000/09/xmldsig" uri="../../../../../../infra/prism/src/main/resources/xml/ns/standard/xmldsig-core-schema.xsd" />
<system systemId="http://www.w3.org/2000/09/xmldsig" uri="../../../../../../infra/prism/src/main/resources/xml/ns/standard/xmldsig-core-schema.xsd" />

</catalog>
Expand Up @@ -69,7 +69,7 @@
</xsd:import>

<xsd:import namespace="http://www.w3.org/2001/04/xmlenc#"
schemaLocation="http://www.w3.org/2001/04/xmlenc#">
schemaLocation="http://www.w3.org/2001/04/xmlenc">
<xsd:annotation>
<xsd:documentation>
The XML Encryption schema. Used for "protected" data types (property encryption).
Expand Down
Expand Up @@ -47,7 +47,7 @@
</xsd:import>

<xsd:import namespace="http://www.w3.org/2001/04/xmlenc#"
schemaLocation="http://www.w3.org/2001/04/xmlenc#">
schemaLocation="http://www.w3.org/2001/04/xmlenc">
<xsd:annotation>
<xsd:documentation>
The XML Encryption schema. Used for "protected" data types (property encryption).
Expand Down
Expand Up @@ -31,7 +31,7 @@
targetNamespace='http://www.w3.org/2001/04/xmlenc#'
elementFormDefault='qualified'>

<import namespace='http://www.w3.org/2000/09/xmldsig#' schemaLocation='xmldsig-core-schema.xsd' />
<import namespace='http://www.w3.org/2000/09/xmldsig#' schemaLocation='http://www.w3.org/2000/09/xmldsig' />

<complexType name='EncryptedType' abstract='true'>
<sequence>
Expand Down
8 changes: 4 additions & 4 deletions model/model-client/src/compile/resources/catalog.xml
Expand Up @@ -69,17 +69,17 @@
<public publicId="XMLSchema.dtd" uri="../../../target/midpoint-schema/xml/ns/standard/XMLSchema.dtd" />
<system systemId="XMLSchema.dtd" uri="../../../target/midpoint-schema/xml/ns/standard/XMLSchema.dtd" />

<public publicId="http://www.w3.org/2001/04/xmlenc#" uri="../../../target/midpoint-schema/xml/ns/standard/xenc-schema.xsd" />
<system systemId="http://www.w3.org/2001/04/xmlenc#" uri="../../../target/midpoint-schema/xml/ns/standard/xenc-schema.xsd" />
<public publicId="http://www.w3.org/2001/04/xmlenc" uri="../../../target/midpoint-schema/xml/ns/standard/xenc-schema.xsd" />
<system systemId="http://www.w3.org/2001/04/xmlenc" uri="../../../target/midpoint-schema/xml/ns/standard/xenc-schema.xsd" />

<public publicId="http://www.w3.org/2001/XMLSchema" uri="../../../target/midpoint-schema/xml/ns/standard/XMLSchema.xsd" />
<system systemId="http://www.w3.org/2001/XMLSchema" uri="../../../target/midpoint-schema/xml/ns/standard/XMLSchema.xsd" />

<public publicId="http://www.w3.org/XML/1998/namespace" uri="../../../target/midpoint-schema/xml/ns/standard/xml.xsd" />
<system systemId="http://www.w3.org/XML/1998/namespace" uri="../../../target/midpoint-schema/xml/ns/standard/xml.xsd" />

<public publicId="http://www.w3.org/2000/09/xmldsig#" uri="../../../target/midpoint-schema/xml/ns/standard/xmldsig-core-schema.xsd" />
<system systemId="http://www.w3.org/2000/09/xmldsig#" uri="../../../target/midpoint-schema/xml/ns/standard/xmldsig-core-schema.xsd" />
<public publicId="http://www.w3.org/2000/09/xmldsig" uri="../../../target/midpoint-schema/xml/ns/standard/xmldsig-core-schema.xsd" />
<system systemId="http://www.w3.org/2000/09/xmldsig" uri="../../../target/midpoint-schema/xml/ns/standard/xmldsig-core-schema.xsd" />


</catalog>
8 changes: 4 additions & 4 deletions model/model-client/src/main/resources/META-INF/catalog.xml
Expand Up @@ -72,17 +72,17 @@
<public publicId="XMLSchema.dtd" uri="../xml/ns/standard/XMLSchema.dtd" />
<system systemId="XMLSchema.dtd" uri="../xml/ns/standard/XMLSchema.dtd" />

<public publicId="http://www.w3.org/2001/04/xmlenc#" uri="../xml/ns/standard/xenc-schema.xsd" />
<system systemId="http://www.w3.org/2001/04/xmlenc#" uri="../xml/ns/standard/xenc-schema.xsd" />
<public publicId="http://www.w3.org/2001/04/xmlenc" uri="../xml/ns/standard/xenc-schema.xsd" />
<system systemId="http://www.w3.org/2001/04/xmlenc" uri="../xml/ns/standard/xenc-schema.xsd" />

<public publicId="http://www.w3.org/2001/XMLSchema" uri="../xml/ns/standard/XMLSchema.xsd" />
<system systemId="http://www.w3.org/2001/XMLSchema" uri="../xml/ns/standard/XMLSchema.xsd" />

<public publicId="http://www.w3.org/XML/1998/namespace" uri="../xml/ns/standard/xml.xsd" />
<system systemId="http://www.w3.org/XML/1998/namespace" uri="../xml/ns/standard/xml.xsd" />

<public publicId="http://www.w3.org/2000/09/xmldsig#" uri="../xml/ns/standard/xmldsig-core-schema.xsd" />
<system systemId="http://www.w3.org/2000/09/xmldsig#" uri="../xml/ns/standard/xmldsig-core-schema.xsd" />
<public publicId="http://www.w3.org/2000/09/xmldsig" uri="../xml/ns/standard/xmldsig-core-schema.xsd" />
<system systemId="http://www.w3.org/2000/09/xmldsig" uri="../xml/ns/standard/xmldsig-core-schema.xsd" />


</catalog>

0 comments on commit 9db6fe8

Please sign in to comment.