You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2017/08/01 18:54:00 UTC

[jira] [Resolved] (CXF-7428) Enabling schema validation and running it can not resolve namespace.(cvc-elt.1)

     [ https://issues.apache.org/jira/browse/CXF-7428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-7428.
------------------------------
       Resolution: Won't Fix
         Assignee: Daniel Kulp
    Fix Version/s: Invalid


This is more or less working as designed and no plans to change.   There are many places in the code that require a 1:1 relationship of schema URI <--> namespace.  More specifically, if given a namespace URI, we need to map that to a particular schema object based on the schema's URI.   The proper fix is exactly what you did in the FixedPIXManager.wsdl of making sure there is a single "schema"  for that namespace and xsd:include the others into it.   That is the proper WSDL. for this case.

> Enabling schema validation and running it can not resolve namespace.(cvc-elt.1)
> -------------------------------------------------------------------------------
>
>                 Key: CXF-7428
>                 URL: https://issues.apache.org/jira/browse/CXF-7428
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>         Environment: Java 1.8.0_51,
> Spring Framework 4.0.6,
> Windows 10
>            Reporter: Yoshitaka Shibusawa
>            Assignee: Daniel Kulp
>              Labels: client, operation, schema, validation
>             Fix For: Invalid
>
>         Attachments: ihe-pixv3.zip
>
>
> Depending on how WSDL is defined, it is the same namespace ("urn: hl7 - org: v3"), but schema validation does not recognize the xsd file.
> The way of defining WSDL is the way to include "schema file (xsd)" for each file as follows and the way to include it together.
> It seems that you can recognize namespace only for the first file (PRPA_IN201301UV02.xsd).
> For the same namespace, I think it is correct to merge the schema information ("urn:hl7-org:v3") and store it in "schemaSourcesMap 2" and execute the schema validation.
> Probably to fix it:
> org.apache.cxf.ws.addressing.EndpointReferenceUtils#createSchema(ServiceInfo, Bus)
> 「si.getSystemId()」→Type(types1...)
> ------------------------------------------------------------
> PIXManager.wsdl#types1:urn:hl7-org:v3
> PIXManager.wsdl#types2:urn:hl7-org:v3
> PIXManager.wsdl#types3:urn:hl7-org:v3
> PIXManager.wsdl#types4:urn:hl7-org:v3
> PIXManager.wsdl#types5:urn:hl7-org:v3
> PIXManager.wsdl#types6:urn:hl7-org:v3
>  ↓ merge key is "urn:hl7-org:v3"
> PIXManager.wsdl#types1:urn:hl7-org:v3
> ------------------------------------------------------------
> The meanings of the WSDL definitions of the failing case and the succeeding case are the same as shown below.
> A case where the namespace can not be recognized correctly
> An example of defining a schema element for each xsd file(※1)
> <types>
>     <xsd:schema elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3" xmlns:hl7="urn:hl7-org:v3">
>         <xsd:include schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201301UV02.xsd"/>
>     </xsd:schema>
>     <xsd:schema elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3" xmlns:hl7="urn:hl7-org:v3">
>         <xsd:include schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201302UV02.xsd"/>
>     </xsd:schema>
>     <xsd:schema elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3" xmlns:hl7="urn:hl7-org:v3">
>         <xsd:include schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201304UV02.xsd"/>
>     </xsd:schema>
>     <xsd:schema elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3" xmlns:hl7="urn:hl7-org:v3">
>         <xsd:include schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/MCCI_IN000002UV01.xsd"/>
>     </xsd:schema>
>     <xsd:schema elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3" xmlns:hl7="urn:hl7-org:v3">
>         <xsd:include   schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201309UV02.xsd"/>
>     </xsd:schema>
>     <xsd:schema elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3" xmlns:hl7="urn:hl7-org:v3">
>         <xsd:include schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201310UV02.xsd"/>
>     </xsd:schema>
> </types>
> A case where the namespace can be recognized correctly
> An example of defining a schema element by combining xsd files
> <types>
> 	<xsd:schema elementFormDefault="qualified" targetNamespace="urn:hl7-org:v3" xmlns:hl7="urn:hl7-org:v3">
> 	    <!-- Include the message schema -->
> 	    <xsd:include schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201301UV02.xsd"/>
> 	    <xsd:include schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201302UV02.xsd"/>
> 	    <xsd:include schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201304UV02.xsd"/>
> 	    <xsd:include schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/MCCI_IN000002UV01.xsd"/>
> 	    <xsd:include schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201309UV02.xsd"/>
> 	    <xsd:include schemaLocation="../schema/HL7V3/NE2008/multicacheschemas/PRPA_IN201310UV02.xsd"/>
> 	</xsd:schema>
> </types>
> (※1)
> WSDL is shared worldwide
> 【IHE Technical Frameworks】
> #############################################
> Appendix W: Implementation Material
> Implementation material for ITI profiles such as XDS, XCA, RFD, and others can be found on the IHE FTP site under ftp://ftp.ihe.net/TF_Implementation_Material/ITI/.
> Some of the types of implementation material available are schema, examples and informative WSDL.
> #############################################



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)