Could not find destination factory for transport

在使用cxf開發webservice時,啓動Server時遇到Could not find destination factory for transport http://schemas.xmlsoap.org/soap/http錯誤。Server代碼以下:java

public static Object[] invokeRemoteMethod(String url, String method, Object[] parameters) {
        JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
        if (!url.endsWith("wsdl") && !url.endsWith("WSDL")) {
            url += "?wsdl";
        }
        org.apache.cxf.endpoint.Client client = dcf.createClient(url);
        try {
            Object[] objects = client.invoke(method, parameters);
            return objects;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null;
    }

調用時按照順序設置參數。web

加入cxf-rt-transports-http-jetty包解決。apache

相關文章
相關標籤/搜索