I had a very similar question a couple days ago. I have been unable to get the exception in a different namespace. I can change the name space of the fault bean (return value of getFaultnfo()), but I can not affect the name space of the web fault itself.
In the mail archives look for the thread titled 'Exceptions ignore namespace configuration' - if you want to see the discussion thread around my issue: http://mail-archives.apache.org/mod_mbox/cxf-users/201207.mbox/browser Either I am missing something or this is a deficiency of CXF. cheers rouble On Thu, Jul 12, 2012 at 1:35 PM, Mark Streit <[email protected]> wrote: > Perhaps you might want to look at this article: > > http://io.typepad.com/eben_hewitt_on_java/2009/07/using-soap-faults-and-exceptions-in-java-jaxws-web-services.html > > ....just to make sure the annotations are correct. > > Mark > On Jul 12, 2012 11:41 AM, "Avner Levy" <[email protected]> wrote: > >> Hi, >> I'm using jax-ws with cxf implementation to implement web services. >> I have several services annotated with the @WebService annotation. >> In a different package I defined the exceptions (which inherit from >> RuntimeException) and annotated them with @WebFault with a unique namespace. >> Each exception class holds a single bean with the exception data >> (faultInfo) which resides in the same namespace and package as the fault >> and is annotated with @XMlType. >> When I run the server CXF complain with the following error: >> >> ERROR >> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.fillInSchemaCrossreferences:305 >> [main] - Schema element { >> http://www.example.com/schema}ValidationRemoteFault references undefined >> type >> {http://www.example.com/schema}ValidationRemoteFaultException for >> service {http://web_services.example.com/}ValidationService >> >> The ValidationRemoteFault is the class annotated with the WebFault and >> ValidationRemoteFaultException is the bean class annotated with XmlType. >> >> Any insight about solving the error will be appreciated. >> >> Thanks, >> Avner >>
