[
https://issues.apache.org/jira/browse/CXF-2129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alessio Soldano updated CXF-2129:
---------------------------------
Attachment: CXF-2129.txt
I'm attaching a patch file for simply checking for the fault class being null.
Please evaluate the patch. Thanks.
> Provider endpoint causes NPE in AbstractPolicyInterceptor
> ---------------------------------------------------------
>
> Key: CXF-2129
> URL: https://issues.apache.org/jira/browse/CXF-2129
> Project: CXF
> Issue Type: Sub-task
> Components: JAX-WS Runtime
> Affects Versions: 2.2
> Reporter: Alessio Soldano
> Assignee: Alessio Soldano
> Attachments: CXF-2129.txt
>
>
> I've a web service provider returning a custom fault as follows (the fault is
> correctly declared in the wsdl deployed along with the endpoint):
> @Local
> @Stateless
> @WebServiceProvider(serviceName = "MyTestService",
> portName = "MyTestPort",
> targetNamespace = "http://www.my-company.it/ws/my-test",
> wsdlLocation = "META-INF/wsdl/my-service.wsdl")
> @WebContext(contextRoot = "/jaxws-jbws1815")
> @ServiceMode(value = Service.Mode.MESSAGE)
> public class ProviderImpl implements Provider<SOAPMessage>
> {
> public SOAPMessage invoke(SOAPMessage requestSoapMessage)
> {
> SOAPFault theSOAPFault;
> try {
> theSOAPFault = SOAPFactory.newInstance().createFault();
> Detail soapFaultDetail = theSOAPFault.addDetail();
> SOAPElement myFaultElement = soapFaultDetail.addChildElement(new
> QName("http://www.my-company.it/ws/my-test", "MyWSException"));
> SOAPElement myMessageElement = myFaultElement.addChildElement(new
> QName("http://www.my-company.it/ws/my-test", "message"));
> myMessageElement.setValue("This is a faked error"); //right: this
> creates a text node and gives it a text value
> } catch (SOAPException se) {
> se.printStackTrace();
> throw new RuntimeException("Something unexpected happened!");
> }
> throw new SOAPFaultException(theSOAPFault);
> }
> }
> This causes the AbstractPolicyInterceptor to throw a NPE during the
> BindingFaultInfo retrieval as no class can found that maps the fault.
> Further information about the testcase are available here
> https://jira.jboss.org/jira/browse/JBWS-1815 (scm links there point to the
> testcase sources).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.