[
https://issues.apache.org/jira/browse/CXF-7428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yoshitaka Shibusawa updated CXF-7428:
-------------------------------------
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.
#############################################
was:
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.
#############################################
I will attach Junit in the above two cases.
【JUnit】
1.Original WSDL
ftp://ftp.ihe.net/TF_Implementation_Material/ITI/wsdl/PIXManager.wsdl
A case where the namespace can not be recognized correctly
Try running Junit
mvn test -Dtest=ihe.iti.pixv3.manager.FailTest
2.The modified PIXManager.wsdl has the same meaning as the schema definition.
A case where the namespace can be recognized correctly
Try running Junit
mvn test -Dtest=ihe.iti.pixv3.manager.SuccessTest
> 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
> Labels: client, operation, schema, validation
>
> 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)