2012-04-17 3 views
0

webservice로 노출되는 Stateless 세션 Bean이 있습니다. 두 가지 방법이 있으며 둘 다 @webmethod 주석이 있습니다. 그러나이 방법 중 하나만 웹 서비스로 노출됩니다. 사람이 행동에 대한 이유를 지적 할 수 코드를 검색 :@webmethod - 메서드를 webservice (JAX-WS)로 공개하지 않습니다.

@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 방법은 processPathEvent 방법을 웹 서비스로 노출되는 것이 아니라.

감사합니다.

답변

0

나는이 문제를 해결할 수 있었다.

@webservice 주석에 "endpointInterface"속성을 설정했습니다. 이 인터페이스에 processPathEvent() 메서드를 추가하는 것을 잊었습니다. 따라서 @webmethod 주석을 추가하더라도 메서드가 노출되지 않았습니다.

관련 문제