MTOM Policy Assertion not able to get recognized in CXF

Solution Verified - Updated -

Issue

  • We have this WSDL policy defined in the wsdl:
<wsp:Policy wsu:Id="ForceMTOM" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
    <wsoma:OptimizedMimeSerialization xmlns:wsoma="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization" />
</wsp:Policy>
...
<wsdl:binding>
  ...
  <wsdl:operation name="sayHelloToName">
    <wsp:PolicyReference URI="#ForceMTOM" wsdl:required="true"/>
    ...
  </wsdl:operation>
</wsdl:binding>
  • This worked in EAP 6.0.1, but when deploying the WS that uses this WSDL, getting the below error in EAP 6.1.1:
21:07:21,752 ERROR [fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."xxx-ws.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."xxx-ws.war".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "xxx-ws.war"
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
    at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
Caused by: javax.xml.ws.WebServiceException: java.lang.NullPointerException
    at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:368)
    at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:66)
    at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:250)
    at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:536)
    at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:116)
    at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:128)
    at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:67)
    at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.2.1.Final-redhat-10.jar:7.2.1.Final-redhat-10]
    ... 5 more
Caused by: java.lang.NullPointerException
    at org.apache.cxf.jaxws.support.JaxWsEndpointImpl.checkRespectBindingFeature(JaxWsEndpointImpl.java:266)
    at org.apache.cxf.jaxws.support.JaxWsEndpointImpl.extractWsdlExtensibilities(JaxWsEndpointImpl.java:226)
    at org.apache.cxf.jaxws.support.JaxWsEndpointImpl.<init>(JaxWsEndpointImpl.java:204)
    at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.createEndpoint(JaxWsServiceFactoryBean.java:238)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.createEndpoints(ReflectionServiceFactoryBean.java:339)
    at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:271)
    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:211)
    at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:453)
    at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:333)
    ... 13 more

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 6.1.1
  • JBossWS-CXF

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.