web services 接口测试方法

Posted Vip灬cnblog

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了web services 接口测试方法相关的知识,希望对你有一定的参考价值。

public class Test {

    public static void main(String[] args) {
                JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();    
                factory.getInInterceptors().add(new LoggingInInterceptor());    
                factory.getOutInterceptors().add(new LoggingOutInterceptor());    
                factory.setServiceClass(IhlWebservice.class);    
                factory.setAddress("http://localhost:8080/charge/services/reportStatusService");    
                IhlWebservice client = (IhlWebservice) factory.create();  
                String reply = client.receiveUpdateReportStatusForApply("R2016052800001", "20");
                System.out.println("Server said: " + reply);  
            }  
}

 

以上是关于web services 接口测试方法的主要内容,如果未能解决你的问题,请参考以下文章