找不到名称空间http://schemas.xmlsoap.org/soap/https的DestinationFactory。

时间:2018-11-14 03:39:10

标签: java web-services wildfly netbeans-8

我已经使用Netbeans构建了这个简单的Web服务,该服务在使用tomcat服务器时可以成功部署。我正在尝试使用wildfly 14部署它,但出现此错误:

org.apache.cxf.BusException: No DestinationFactory was found for the namespace http://schemas.xmlsoap.org/soap/https.

经过一番研究,我发现我应该在我的类路径中添加cxf-rt-transports-http-xx-xxx的建议,但是错误变为:

  

Apache CXF库(cxf-rt-transports-http-3.2.5-jbossorg-1.jar)   在ws端点部署中检测到;要么提供适当的部署   用容器模块依赖项替换嵌入式库或   禁用当前部署的webservices子系统,添加一个   正确的jboss-deployment-structure.xml描述符。前者   建议使用此方法,因为后一种方法会导致大多数   webservices Java EE和任何JBossWS特定功能   禁用。

这是我的服务

@WebService(serviceName = "Estatements")
public class Estatements {

    @Resource
    private WebServiceContext context;
    private static final Log log = LogFactory.getLog("origlogger");

    @WebMethod(operationName = "generateStatement")
    public List<ServiceBean> generateStatement(@WebParam(name = "accountNumber") String accountNumber, @WebParam(name = "fromDate_dd-MMM-yyyy") String fromDate, @WebParam(name = "toDate_dd-MMM-yyyy") String toDate) {
        List<ServiceBean> srvs = new ArrayList<ServiceBean>();
        ServiceBean srv = new ServiceBean();
        ServletContext servletContext
                = (ServletContext) context.getMessageContext().get(MessageContext.SERVLET_CONTEXT);
        if (Customer.accountIsValid(accountNumber, (String) servletContext.getAttribute("propfile"))) {
            if (isValidDate(fromDate)) {
                if (isValidDate(toDate)) {
                    Statement st = new Statement();
                    st.formatreport(accountNumber, fromDate, toDate, (String) servletContext.getAttribute("propfile"), (String) servletContext.getAttribute("logopath"), (String) servletContext.getAttribute("pdfdir"));
                    srv.setCode("000");
                    srv.setMessage("Statement Generated Successfully");
                    srvs.add(srv);
                } else {
                    srv.setCode("999");
                    srv.setMessage("To Date is Invalid");
                    srvs.add(srv);
                }

            } else {
                srv.setCode("999");
                srv.setMessage("From Date is Invalid");
                srvs.add(srv);
            }

        } else {
            srv.setCode("999");
            srv.setMessage("Account Number is Invalid");
            srvs.add(srv);
        }
        return srvs;
    }

}

还有什么我可以尝试的吗?

0 个答案:

没有答案