我有带有以下标记的CXF配置文件:
<jaxws:endpoint id="..." implementor="..." address="..." wsdlLocation="RESOURCES/someWsdl.wsdl">
...
<jaxws:schemaLocations>
<jaxws:schemaLocation>RESOURCES/types.xsd</jaxws:schemaLocation>
<jaxws:schemaLocation>RESOURCES/schema.xsd</jaxws:schemaLocation>
</jaxws:schemaLocations>
...
</jaxws:endpoint>.
Q:如何指定 someWsdl.wsdl , types.xsd 和 schema.xsd 在资源中文件夹:
PROJECT_HOME\src\main\resources
答案 0 :(得分:0)
解决方案是:
<jaxws:endpoint id="..." implementor="..." address="..." wsdlLocation="classpath:someWsdl.wsdl">
...
<jaxws:schemaLocations>
<jaxws:schemaLocation>classpath:types.xsd</jaxws:schemaLocation>
<jaxws:schemaLocation>classpath:schema.xsd</jaxws:schemaLocation>
</jaxws:schemaLocations>
...
。