Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7428

Enabling schema validation and running it can not resolve namespace.(cvc-elt.1)

    XMLWordPrintableJSON

    Details

    • Estimated Complexity:
      Unknown

      Description

      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.
      #############################################

        Attachments

        1. ihe-pixv3.zip
          2.93 MB
          Yoshitaka Shibusawa

          Activity

            People

            • Assignee:
              dkulp Daniel Kulp
              Reporter:
              Yoshitaka Yoshitaka Shibusawa
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: