[ 
https://issues.apache.org/jira/browse/CXF-4493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447088#comment-13447088
 ] 

Freeman Fang edited comment on CXF-4493 at 9/3/12 1:41 PM:
-----------------------------------------------------------

Hi,

Per JAXWS spec, if it's a oneway operaiton, it shouldn't throw any fault. So if 
your operation have oneway and faults at the same time, basically it's invalid 
interface per JAXWS spec.

Anyway we should be able to throw an exception if oneway and faults co-exist 
when build service module from the class

Freeman
                
      was (Author: ffang):
    Hi,

Per JAXWS spec, if it's a oneway operaiton, it shouldn't throw any fault. So if 
your operation have oneway and faults at the same time, basically it's invalid 
interface per JAXWS spec.

Freeman
                  
> If javax.jws.Oneway annotation is specified for a SOAP interface method a NPE 
> occurs
> ------------------------------------------------------------------------------------
>
>                 Key: CXF-4493
>                 URL: https://issues.apache.org/jira/browse/CXF-4493
>             Project: CXF
>          Issue Type: Bug
>          Components: WS-* Components
>    Affects Versions: 2.6.2
>            Reporter: Thorben Betten
>            Priority: Minor
>
> If javax.jws.Oneway annotation is specified for a SOAP interface method a NPE 
> occurs. The passed OperationInfo "faults" member is left to null and thus 
> causes a NPE by calling:
> faultInfo.addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME, 
> faultAction.value());
> If javax.jws.Oneway annotation is removed the endpoint gets registered 
> without problems.
> java.lang.NullPointerException
>       at 
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildWSAActions(JaxWsServiceFactoryBean.java:578)
>       at 
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.createOperation(JaxWsServiceFactoryBean.java:625)
>       at 
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createInterface(ReflectionServiceFactoryBean.java:955)
>       at 
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:465)
>       at 
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:685)
>       at 
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:536)
>       at 
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:248)
>       at 
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
>       at 
> org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
>       at 
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159)
>       at 
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:207)
>       at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:442)
>       at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:329)
>       ... 42 more

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to