在wildfly 9找不到webservice的定义

时间:2016-12-13 20:07:19

标签: web-services maven wildfly

我写了一个web服务并且构建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;
    }
}

我没有注意到可能导致此异常的错误。

我将非常感谢你的帮助

1 个答案:

答案 0 :(得分:0)

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

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