Re: CXF exceptions

2012-03-22 Thread Barry Hathaway
Thanks Mark the article helped a lot. I just needed to create 2 new class files on the service side (exception and bean) for each exception and it worked like a charm. Barry On 3/20/2012 5:08 PM, Mark Streit wrote: There is a great article by Eben Hewitt that helped us deal with this in a sta

Re: CXF exceptions

2012-03-21 Thread Daniel Kulp
Is the client using Exception types generated from the wsdl or the original Exception types from the server?If not from the wsdl, I would suggest grabbing the wsdl, generating the faults in a kind of "one off", and updating the server side exception to look like it. The constructors and

Re: CXF exceptions

2012-03-20 Thread Mark Streit
There is a great article by Eben Hewitt that helped us deal with this in a standard way... perhaps this will help: http://io.typepad.com/eben_hewitt_on_java/2009/07/using-soap-faults-and-exceptions-in-java-jaxws-web-services.html On Tue, Mar 20, 2012 at 4:41 PM, Barry Hathaway wrote: > I'm havi

CXF exceptions

2012-03-20 Thread Barry Hathaway
I'm having a problem getting my custom exceptions to map to something other than SOAPFaultExceptions. Being kind of a newbie I'm sure it is something simple. In my service interface I have: @WebMethod(operationName="getUniqueInstanceUri", action="urn:getUniqueInstanceUri") public Stri

Re: Capturing CXF Exceptions

2011-02-08 Thread Andrew
Yeah, it does get handled by the container. Here's the result of my test (condensed): 2011-02-08 11:13:41,702 [http-8080-2] WARN org.apache.cxf.phase.PhaseInterceptorChain[369] - Application { http://controller.foo.com/}CommandResourceImpl has thrown exception, unwinding now org.apache.cxf.interc

Re: Capturing CXF Exceptions

2011-02-07 Thread Sergey Beryozkin
Hi Dan On Mon, Feb 7, 2011 at 4:35 PM, Daniel Kulp wrote: > On Sunday 06 February 2011 11:36:55 am Sergey Beryozkin wrote: > > I believe using CXF interceptors has always been possible, alternatively, > > registering a custom JAX-RS RuntimeException ExceptionMapper is a > > possibility. > > > >

Re: Capturing CXF Exceptions

2011-02-07 Thread Daniel Kulp
On Sunday 06 February 2011 11:36:55 am Sergey Beryozkin wrote: > I believe using CXF interceptors has always been possible, alternatively, > registering a custom JAX-RS RuntimeException ExceptionMapper is a > possibility. > > The only thing I'm not sure about is why the uncaught exception is not >

Re: Capturing CXF Exceptions

2011-02-06 Thread Sergey Beryozkin
Hi On Fri, Feb 4, 2011 at 11:05 PM, Daniel Kulp wrote: > > I'm not sure with 2.2.11. With 2.3.2 you can definitely stick an > interceptor > early in the "in" chain and in the handleFault method, you can grab the > exception and change it to a different exception: > > Exception ex = msg.getCont

Re: Capturing CXF Exceptions

2011-02-04 Thread Daniel Kulp
I'm not sure with 2.2.11. With 2.3.2 you can definitely stick an interceptor early in the "in" chain and in the handleFault method, you can grab the exception and change it to a different exception: Exception ex = msg.getContent(Exception.class); if (ex is Read timed out) { msg.setContent(

Capturing CXF Exceptions

2011-02-04 Thread Andrew
Hi, I'm doing some basic stress testing of my JAX-RS service and getting back some 500 responses, with body: JAXBException occurred : Read timed out. Read timed out. and http://cxf.apache.org/bindings/xformat";>http://cxf.apache.org/bindings/xformat";>java.net.SocketTimeoutException: Read tim

Re: Custom CXF Exceptions/Faults

2009-07-03 Thread Taras Matyashovsky
Cheers, Sergey >> >> P.S. If it's a JAX-RS question - then please consider adding JAX-RS: >> prefix in the future to avoid any confusions... >> >> - Original Message - >> From: "Daniel Kulp" >> To: >> Sent: Thursday, July 1

Re: Custom CXF Exceptions/Faults

2008-07-17 Thread David Castro
gt; From: "Daniel Kulp" <[EMAIL PROTECTED]> > To: > Sent: Thursday, July 17, 2008 12:32 PM > Subject: Re: Custom CXF Exceptions/Faults > > > > > > In both cases, the easiest thing to do would probably to put an > > interceptor early in the Fa

Re: Custom CXF Exceptions/Faults

2008-07-17 Thread Sergey Beryozkin
prefix in the future to avoid any confusions... - Original Message - From: "Daniel Kulp" <[EMAIL PROTECTED]> To: Sent: Thursday, July 17, 2008 12:32 PM Subject: Re: Custom CXF Exceptions/Faults In both cases, the easiest thing to do would probably to put an intercepto

Re: Custom CXF Exceptions/Faults

2008-07-17 Thread Daniel Kulp
In both cases, the easiest thing to do would probably to put an interceptor early in the FaultOut chain that pulls the Fault/ Exception out of the chain and replaces it with a SoapFault that you've built up with your needed codes and such. In the second case, you could subclass our invoke

Custom CXF Exceptions/Faults

2008-07-16 Thread David Castro
So my problem is twofold. I need to be able to: a) Catch all exceptions that CXF sends back to the client and replace the exception with a custom exception. Do I use an interceptor for this? How do I basically return a Response object with custom XML and a status code? b) Have a standard way t