aspose file tools
The moose likes Web Services and the fly likes Jaxws Exceptions Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Jaxws Exceptions" Watch "Jaxws Exceptions" New topic
Author

Jaxws Exceptions

Stefan Gerber
Ranch Hand

Joined: Mar 08, 2008
Posts: 33
Hello,
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:


thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Jaxws Exceptions
 
Similar Threads
How do I catch a user define exception on the client (SOAP/JAX-RPC/WSDL)
Concept on coding for Exception Handling
Exception handling question
JAX-WS Custom Exceptions