Unable to create JAXBContext creating my wsdl

前端 未结 8 1053
旧巷少年郎
旧巷少年郎 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:54

    I had this problem too! EXACTLY the same one!

    SEE THIS ERROR,

     at java.lang.StackTraceElement
                 at public java.lang.StackTraceElement[] java.lang.Throwable.getStackTrace()
                 at java.lang.Throwable
                 at java.lang.Exception
                 at java.sql.SQLException
                 at private java.sql.SQLException wsdb.jaxws.SQLExceptionBean.nextException
                 at wsdb.jaxws.SQLExceptionBean
    

    I went through my code,and checked out the reason is

     @WebMethod(operationName = "reportnewplace")
     public String reportnewplace(@WebParam(name = "xcmc") String xcmc, 
             @WebParam(name = "address") String address, 
             @WebParam(name = "lon") String lon, 
             @WebParam(name = "lat") String lat, 
             @WebParam(name = "UID") String UID) throws SQLException{
    

    A web method should not throw a Exception,remove will solve this problem simplely,if u insist to do that,follow the first answer by @Bozho .

提交回复
热议问题