我已经使用Apache CXF将大约10个java类公开为web服务。
我已经使用CXF、Axis和.NET生成了客户端。
在Axis和CXF中,会生成"Service“或"Locator”。从这个服务中你可以得到一个“端口”。"Port“用于对web服务公开的方法进行单独调用。
在.NET中,“服务”直接公开对web服务的调用。
当涉及到web服务时,有人能解释端口、服务、定位器和端点之间的区别吗?
轴:
PatientServiceImplServiceLocator locator =
new PatientServiceImplServiceLocator();
PatientService service = locator.getPatientServiceImplPort();
CXF:
PatientServiceImplService locator = new PatientServiceImplService();
PatientService service = locator.getPatientServiceImplPort();
.net:
PatientServiceImplService service = new PatientServiceImplService();
发布于 2008-08-14 19:54:24
我会跳到http://www.w3.org/TR/wsdl.html上,我认为它很好地解释了端口、服务和端点。定位器是特定于实现的机制,一些WS堆栈使用它来提供对服务端点的访问。
发布于 2014-04-15 01:23:32
我想补充的是,<port>
和<endpoint>
具有相同的用途,但是WSDL1.1使用port
,WSDL2.0使用endpoint
。
发布于 2008-08-14 19:26:36
正如您已经提到的,这些术语在不同的堆栈中意味着不同的东西-对于web服务来说,没有一个正确的通用答案。
https://stackoverflow.com/questions/11561
复制相似问题