Unable to create JAXBContext creating my wsdl

前端 未结 8 1036
旧巷少年郎
旧巷少年郎 2020-11-27 22:20

I am trying to generate my WSDL for webservices but I get this error:

Note:   ap round: 2
Exception in thread \"main\" javax.xml.ws.WebServiceException: Unable to         


        
8条回答
  •  春和景丽
    2020-11-27 22:39

    Throwable objects (that means exceptions and errors) can't be transferred directly, because they can't be serialized to XML (the StackTraceElement doesn't have a no-arg constructor, which is required by JAXB).

    You have to use SOAP faults for that. See this question. It points you to the @WebFault annotation which you should put on your exception class. (Also probably check this and this)

提交回复
热议问题