[JAX-WS] is an interface, and JAXB can't handle interfaces.



역시나 한방에 재대로 되는 것은 없는 것 같습니다.

Spring-Webservices 를 통해서 구현된 웹서비스인데 JDK 6 + Tomcat 6.x 환경에서는 무리없이 돌아갔으나

앞에서의 무수한 역경을 헤치고 나왔으나 또 문제가 발생합니다.


이번에는 아래와 같은 문제를 뿜어내었습니다.




com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions












[your interface]







is an interface, and JAXB can't handle interfaces.





this problem is related to the following location:





at






[your interface]















[your interface]




does not have a no-arg default constructor.





this problem is related to the following location:





at






[your interface]











당연히 인터페이스는 생성자를 갖을 수 없습니다. 하지만 spring framework 의 DI 를 이용하다보니 인터페이스를

통해 파라미터를 넘기기에... 문제가 발생하는 것이었습니다.





apt 툴을 통해서 생성된 웹메소드 구현체와 Response 파일에서 인터페이스가 파라미터로 넘어가는 경우에서 발생하는 것인데

발생되는 메소드가 웹메소드도 아니고 스프링에서 사용하는 setter 메소드여서



[java.net forum 검색]



을 통해 해결책을 찾았습니다.


사용되지 않는 메소드에 아래와 같은 Annotation 을 설정해줍니다.



@WebMethod(exclude = true)







후훗... 잘 됩니다. 원래 어제 새벽에 저렇게 했었는데 재대로 갱신을 안해서 -_ㅜ...


여튼 이제 실서버에 배포할 일만 남았다습니다~ ㅋㅋㅋ






댓글

가장 많이 본 글