Maw*_*wia 5 java rest soap web-services
我已成功使用SOAP服务.
假设有一个Web服务公开了一个返回学生列表的方法.
public Student[] listAllStudents(){
//some code that return Student array
}
Run Code Online (Sandbox Code Playgroud)
使用SOAP将需要以下步骤:
http://127.0.0.1/web/service/location/soap.php?wsdl使用适当的存根类/接口来调用服务.
Student[] students = theStub.list_All_Students();
使用REST服务将是这样的.
http://127.0.0.1/web/service/student/list?sort=true作为Java程序员,我使用SOAP没有问题,因为有为它设计的框架.此外,我只需要知道一个用于访问Web服务的URL.
使用REST有点令人困惑.我需要知道所有特定的URL以及需要传递的查询字符串.从这个角度来看,使用REST非常麻烦.
我的问题: