wsdl2java
(maven axistools로 래핑 됨)을 사용하는 축으로 Java 클라이언트를 생성하려고합니다.축 wsdl2java가 특수 문자로 스키마 읽기에 실패했습니다
wsdl 및 해당 스키마를 다운로드했습니다.
WSDL의 다음 스키마 정의가 있습니다 한마디로
<wsdl:types>
<xsd:schema
targetNamespace="http://example.com/CM_IntegrationService/"
xmlns:pref="http://example.com/CM_IntegrationService"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://example.com//CM_IntegrationService"
schemaLocation="CM_IntegrationService?xsd=ServiceModel_CM_IntegrationService.xsd"/>
을 :
schemaLocation="CM_IntegrationService?xsd=ServiceModel_CM_IntegrationService.xsd"
으로 오류가 보여줍니다 찾을 수 없습니다 짧은 파일에서
[ERROR] Failed to execute goal org.codehaus.mojo:axistools-maven-plugin:1.4:wsdl2java (default) on project wsclient-cm: Error generating Java code from WSDL. error running file:/C:/workspace/ws/wsclient-reactor/wsclient-wsdl/src/main/wsdl/CM_IntegrationService.wsdl:
WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at 'CM_IntegrationService?xsd=ServiceModel_CM_IntegrationService.xsd', relative to 'file:/C:/workspace/ws/wsclient-reactor/shop-wsclient-wsdl/src/main/wsdl/CM_IntegrationService.wsdl'.:
This file was not found: file:/C:/workspace/ws/wsclient-reactor/wsclient-wsdl/src/main/wsdl/CM_IntegrationService?xsd=ServiceModel_CM_IntegrationService.xsd -> [Help 1]
:
/C:/workspace/ws/wsclient-reactor/wsclient-wsdl/src/main/wsdl/CM_IntegrationService?xsd=ServiceModel_CM_IntegrationService.xsd
사용할 스키마를 지정하는 방법이 있습니까? 스키마를 ServiceModel_CM_IntegrationService.xsd
으로 저장했습니다. 그러나 파일 시스템에서 에뮬레이트 할 수없는 =
및 ?
을 포함한 전체 경로를 검색합니다.
에 제안 나는 WSDL을 수정하지 않습니다 WSDL to Java -client creation error
Why is axistools-maven-plugin trying to access this relative schema location?하지만 도움이되지 않았다 useEmitter=true
옵션을 사용하여 비슷합니다.
아이디어는 파일을 직접 다운로드하고 maven으로 서비스 생성을 시작하는 것입니다. 수동 상호 작용은 오류 소스가 아닌 최소한으로 유지되어야합니다. 피해야 할 단계는 오류를 생성하지 않습니다. 링크를 가져 주셔서 감사합니다. –
그러면 wsdl2java에 HTTP URL을 직접 공급하지 마십시오. –
그것에 대해서도 생각해보십시오. 그러나 웹 서비스가있는 서버는 항상 최신 버전이 아닌 항상 최신 버전입니다. –