• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jaxws Exceptions

Stefan Gerber
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have defined a server side exception that i want catch on client side. Now there are two things i don't understand:

1. When i generate the source code for the client side, the name of the exception is TestException_Exception. Why is the "_Exception" there?
2. On the TestException class i have to define the function getErrorCode() that calls the same function on the FaultDetailBean. If i don't define
this method i get the following exception. Why must i define the bean methods on the Exception class?

com.sun.xml.ws.encoding.soap.SerializationException: java.lang.NoSuchMethodException: TestException .getErrorCode()
at com.sun.xml.ws.fault.SOAPFaultBuilder.createDetailFromUserDefinedException(SOAPFaultBuilder.java:357)
at com.sun.xml.ws.fault.SOAPFaultBuilder.getFaultDetail(SOAPFaultBuilder.java:329)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAPFaultMessage(SOAPFaultBuilder.java:193)
at com.sun.xml.ws.fault.SOAPFaultBuilder.createSOAPFaultMessage(SOAPFaultBuilder.java:184)
at com.sun.xml.ws.server.sei.EndpointMethodHandler.invoke(EndpointMethodHandler.java:265)
at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:95)

The exception class look like this:

  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic