SpringBoot+CXF調用webservice

<dependency>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-spring-boot-starter-jaxws</artifactId>
    <version>3.3.5</version>
</dependency>

public class WsClientUtil{

    public static Object[] invokeWs(String url,String method,Object[] params){

        JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();

        Client client = dcf.createClient(url);

        Object[] response = client.invoke(method,params);

        return response;

    }

}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章