我有一个无状态会话 bean,它作为 web 服务公开。有两种方法,并且都有@webmethod 注释。但是,只有一种方法公开为 web 服务。谁能指出这种行为的原因,请在下面找到代码:
@WebService(portName = "interfaceSoapHTTPPort", serviceName = "interfaceService", targetNamespace = "http://com.demo.service/interfaceservice", endpointInterface = "com.demo.service.interfacePortType")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT)
@Stateless(mappedName = "InterfaceBean")
public class InterfaceBean {
@PostConstruct
@PostActivate
public void initializeBean() {
}
@WebMethod
public void processPathEvent(XngEvent pathXngEvent) throws WSException {
}
@WebMethod
public void portAssignmentUpdate(WSHeader wsHeader,
PortAssignmentUpdateRequest portAssignmentUpdateRequest,
Holder<WSResponseHeader> wsResponseHeader,
Holder<PortAssignmentUpdateResponse> portAssignmentUpdateResponse)
throws WSException {
}
}
只有 portAssignmentUpdate 方法被暴露为 webservice,而不是 processPathEvent 方法。
谢谢你。