cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bains <>
Subject NPE while invoking a CXF Soap Service
Date Wed, 01 Apr 2009 01:16:43 GMT


I am using CXF 2.2 to expose the same service supporting both SOAP and
REST-based invocations with the help of JAX-WS and JAX-RS. My beans.xml is
attached. beans.xml 

When I invoke the service using REST client, I get a successful response,
but when I use a SOAP client, I get a NPE (Stacktrace.txt attached) while
processing the response. Stacktrace.txt 

While debugging, I found that the exception occurs after my service returns
a successful response while the CXFServlet is processing a chain of
interceptors. Having looked at the source code, the exception is thrown from
SwAOutInterceptor.callSWARefMethod(JAXBContext ctx) since the following line
of code returns null method and we can't add null values to

Method m = ctx.getClass().getMethod("hasSwaRef", new Class[0]);

Is JAXBContext class supposed to have that method ("hasSwaRef") in it? I
don't have any attachments in the return java type. Am I missing any
configuration or annotations here? Any help would be greatly appreciated.

Thanks Benu.

View this message in context:
Sent from the cxf-user mailing list archive at

View raw message