I have a stateless session bean which is exposed as webservice. There are two methods and both have @webmethod annotation. But, only one of the method is exposed as webservice. Could anyone point out reason for this behaviour, please find the code below:
@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 {
}
}
Only portAssignmentUpdate method is exposed as webservice, but not the processPathEvent method.
Thank you.
I was able to solve the problem.
We have set “endpointInterface” property in @webservice annotation. I had forgotten to added the processPathEvent() method to this interface. Hence, the method was not exposed even when @webmethod annotation is added.