저는 WebService를 JAX-WS로 개발하고 있습니다. (저는 jaxws-maven-plugin에서 wsimport goal을 사용하고 있습니다). XSD 스키마를 가져 오는 WSDL을 작성했습니다.xsd 스키마가 wsdl로 표시되지 않았습니다.
WEB-INF/wsdl/service.wsdl
WEB-INF/wsdl/service.xsd
또한 웹 서비스 클래스를 생성하고 엔드 포인트를 생성했습니다. 지금까지 모든 것이 훌륭했습니다. Tomcat 7에서 서비스를 실행했을 때 모든 것이 정상입니다. 나는에서 내 브라우저에서 WSDL에 액세스 할 수 있습니다
http://localhost:8080/webService/servlet-url?wsdl
그러나 나는 XSD 스키마에 액세스 할 수 없습니다. 클래스 WSDL 및 XSD의 생성 중에
물론<xsd:schema>
<xsd:import namespace="http://ws.service/domain/1.0" schemaLocation="service.xsd"/>
</xsd:schema>
는 로컬 경로에 있지만 나는 웹 서비스가 실행 중일 때이를 원격으로 액세스하려면, : 문제는이 WSDL이다. schemaLocation은 "http : // localhost : 8080/webService/servlet-url? xsd = 1"과 같아야합니다.
<xsd:schema>
<xsd:import namespace="http://ws.service/domain/1.0" schemaLocation="http://localhost:8080/webService/servlet-url?wsdl&resource=service.xsd"/>
</xsd:schema>
로컬 호스트 : 8080/웹 서비스/서블릿 WSDL이 날 수 있습니다 :? 등등
wsdl:definitions targetNamespace="http://ws.serv.com/Service/1.0" name="emuiaService">
<wsdl:types>
<xsd:schema>
<xsd:import namespace="http://ws.serv.com/Service/domain/1.0" schemaLocation="schema.xsd"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="halloMsg">
<wsdl:part name="parameters" element="dom:halloRequest"/>
</wsdl:message>
<wsdl:message name="halloResponseMsg">
<wsdl:part name="return" element="dom:halloResponse"/>
</wsdl:message>
와 ...
나는 내가 한 일을 기억하지 못한다. 아마 계약을 마쳤을 지 모르지만 그것을 해결해 주셔서 감사합니다. 언젠가 누군가를 돕기를 바랍니다.) – bemol