【问题标题】:Could not find definition for webservice at wildfly 9在 wildfly 9 中找不到 Web 服务的定义
【发布时间】:2016-12-13 20:07:18
【问题描述】:

我写了一个webservice,构建maven一切正常,但是在wildfly 9上部署收到错误:

Could not find definition for service {http://ws.sieciowyandroid.rogal.com/soap/Map}MapService.

所有日志服务器:here

wsdl 是:here 和架构:here

和我的代码:

@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@WebService(name = "MapWebServiceEJB", targetNamespace = "http://ws.sieciowyandroid.rogal.com/soap/Map",
        serviceName = "MapService", portName = "MapPort", wsdlLocation = "wsdl/api.wsdl")
public class MapWebService implements MapPort {
    @Override
    public GetThumbnailResp getThumbnail(@WebParam(partName = "in0", name = "GetThumbnailReq", targetNamespace = "http://ws.sieciowyandroid.rogal.com/soap/GetThumbnail") GetThumbnailReq in0) {
        GetThumbnailResp response = new GetThumbnailResp();
        try {
            response.setResult("czesc "+ in0.getName());
        } catch (Exception e) {
            response.setResult("ERROR");
        }
        return response;
    }
}

我没有注意到可能导致此异常的故障。

感谢您的帮助

【问题讨论】:

    标签: web-services maven wildfly


    【解决方案1】:

    这可能相关也可能不相关,但如果您使用 Maven 打包依赖项,那么您可能会剥离架构文件映射。我在 Spring Framework 上遇到了类似的问题,此处发布的答案解决了我的问题。您可以将弹簧参考替换为适合您问题的资源。

    Idea to avoid that spring.handlers/spring.schemas get overwritten when merging multiple spring dependencies in a single jar

    【讨论】:

      猜你喜欢
      • 2017-01-08
      • 2010-11-28
      • 1970-01-01
      • 2011-07-30
      • 1970-01-01
      • 1970-01-01
      • 2016-05-13
      • 2017-08-02
      • 1970-01-01
      相关资源
      最近更新 更多