我有一个wsdl第一个项目,并通过Java的Endpoint API部署了我的Web服务。我可以导航到我使用浏览器通过Web服务发布的原始wsdl。但是我注意到,wsdl不会更新我的wsdl / xsd工件,可以通过Web访问,也不会在相对路径中提供StockQuote.wsdl。如何通过Endpoint API获取我的xsd / wsdl依赖项?
WSDL片段:
<!-- === Import Interface === -->
<wsdl:import namespace="http://company.com/StockQuote/v1" location="StockQuote.wsdl"/>
这是我的服务提示:
@WebService(endpointInterface = "com.mycompany.v1.StockQuotePortType",
wsdlLocation = "META-INF/wsdl/StockQuoteService.wsdl",
portName = "StockQuotePortType",
serviceName = "StockQuoteService",
targetNamespace = "http://company.com/StockQuote/v1")
public class StockQuotePortTypeImpl implements StockQuotePortType
端点创建:
Endpoint endpoint = Endpoint.create(new StockQuotePortTypeImpl());
String bindingUrl = "http://0.0.0.0:" + port + "/" + serviceName + "/service";
endpoint.publish(bindingUrl);