Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-3300

MTOM WSDL Binding policy rejects all non MTOM requests when attribute required=false

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Won't Fix
    • jbossws-cxf-3.4.1
    • None
    • jbossws-cxf
    • None
    • Hide

      Add the following MTOM Policy to the WSDL to any existing JAX-WS web service running on JBOSS 6.0 Final.

      <wsp:Policy wsu:Id="MTOM_BindingPolicy" >
      <wsoma:OptimizedMimeSerialization />
      </wsp:Policy>

      Then add the policy reference in the binding within the same WSDL:

      <wsp:PolicyReference URI="#MTOM_BindingPolicy" wsdl:required="false" />

      Send a non MTOM request and you should get the same exception I reported.

      Send an MTOM request and it should work.

      I think the non MTOM request should also work since the Policy Reference uses required=false.

      Show
      Add the following MTOM Policy to the WSDL to any existing JAX-WS web service running on JBOSS 6.0 Final. <wsp:Policy wsu:Id="MTOM_BindingPolicy" > <wsoma:OptimizedMimeSerialization /> </wsp:Policy> Then add the policy reference in the binding within the same WSDL: <wsp:PolicyReference URI="#MTOM_BindingPolicy" wsdl:required="false" /> Send a non MTOM request and you should get the same exception I reported. Send an MTOM request and it should work. I think the non MTOM request should also work since the Policy Reference uses required=false.

    Description

      The MTOM WSDL Binding policy rejects all non MTOM requests when attribute required=false.

      Here is the MTOM policy and binding reference:

      <wsp:Policy wsu:Id="MTOM_BindingPolicy" >
      <wsoma:OptimizedMimeSerialization />
      </wsp:Policy>

      <wsp:PolicyReference URI="#MTOM_BindingPolicy" wsdl:required="false" />

      Non MTOM requests are rejected with this exception:

      11:12:33,307 WARN [org.apache.cxf.phase.PhaseInterceptorChain] Interceptor for

      {oracle/documaker/schema/ws/publishing}PublishingService#{oracle/documaker/schema/ws/publishing}

      blishFromImport has thrown exception, unwinding now: org.apache.cxf.interceptor.Fault: These policy alternatives can not be satisfied:

      {http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization}

      OptimizedMimeSerialization
      at org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(AbstractPolicyInterceptor.java:47) [:2.3.1]
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255) [:2.3.1]
      at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:113) [:2.3.1]
      at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:97) [:2.3.1]
      at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:461) [:2.3.1]
      at org.jboss.wsf.stack.cxf.ServletControllerExt.invoke(ServletControllerExt.java:172) [:3.4.1.GA]
      at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:57) [:3.4.1.GA]
      at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:156) [:3.4.1.GA]
      at org.jboss.wsf.stack.cxf.CXFNonSpringServletExt.invoke(CXFNonSpringServletExt.java:90) [:3.4.1.GA]
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179) [:2.3.1]
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103) [:2.3.1]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [:1.0.0.Final]
      at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159) [:2.3.1]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
      at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
      at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
      at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
      at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
      Caused by: org.apache.cxf.ws.policy.PolicyException: These policy alternatives can not be satisfied:

      {http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization}

      OptimizedMimeSerialization
      at org.apache.cxf.ws.policy.AssertionInfoMap.checkEffectivePolicy(AssertionInfoMap.java:140) [:2.3.1]
      at org.apache.cxf.ws.policy.PolicyVerificationInInterceptor.handle(PolicyVerificationInInterceptor.java:99) [:2.3.1]
      at org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(AbstractPolicyInterceptor.java:45) [:2.3.1]

      Per my understanding of required=false attribute, what should occur is that non MTOM requests should still come through and be returned a non MTOM response.

      Attachments

        Activity

          People

            rhn-engineering-ema Jim Ma
            joe_roberts_z_jira Carl Roberts (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: