1 Reply Latest reply on Apr 13, 2010 12:54 PM by gnanasekaran

    Seam 2.2 and MTOM don't work together

    bfayle.benjaminfayle.casablancasoftware.ca

      When using JBoss 5.1 upgraded with jbossws-native-3.2.2.GA with the annotation



      @MTOM(enabled=true) 





      used on a web service class JBoss no longer maintains http sessions with web services clients. Remove this annotation and it works fine.


      A simple way to reproduce this is to take the JBoss Seam 2.2.0GA and take the seamBay example. When this is deployed you can use the:


      http://localhost:8080/seam-bay/test.seam


      to test web services. You must be logged in to use the ListCategories web service or you get a SEAM security notLoggedIn exception. This works fine usng JBoss 5.1 and JbossWS 3.2.2.


      However if you add the annotation


      @MTOM(enabled=true)



      to the AuctionService class and redeploy you always get the notLoggedIn execption, even after running the login web service method.


      Has anyone seen this before?


      I'm not sure if this is a SEAM issue or a JBossWS issue.

        • 1. Re: Seam 2.2 and MTOM don't work together
          gnanasekaran

          I am also used the same configuration but instead of jbossws-native-3.2.2.GA  i used jbossws-metro-3.2.2.GA.


          I didn't get any exception,also i can able to invoke the web service.But it is not enabling the MTOM.


          So i tried with SOAP 1.2 binding like below


          @WebService(name=MtomStreaming,serviceName=MtomStreamingService,targetNamespace=http://example.org)
          @BindingType(value = javax.xml.ws.soap.SOAPBinding.SOAP12HTTPMTOMBINDING)
          @HandlerChain(file = META-INF/handler-config.xml)
          public class StreamingImpl {
          }



          but i am getting the following deployment exception.



          Caused by: javax.xml.ws.WebServiceException: Failed to build METRO runtime model
                  at org.jboss.wsf.stack.metro.metadata.RuntimeModelDeploymentAspect.start(RuntimeModelDeploymentAspect.java:134)
                  at org.jboss.webservices.integration.deployers.WSDeploymentAspectDeployer.internalDeploy(WSDeploymentAspectDeployer.java:107)
                  at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
                  at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
                  ... 30 more
          Caused by: com.sun.xml.ws.server.ServerRtException: Cannot generate WSDL for binding http://www.w3.org/2003/05/soap/bindings/HTTP/?mtom=true
                  at com.sun.xml.ws.server.EndpointFactory.generateWSDL(EndpointFactory.java:416)
                  at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:197)
                  at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467)
                  at org.jboss.wsf.stack.metro.DeploymentDescriptorParserExt.parseAdapters(DeploymentDescriptorParserExt.java:295)
                  at org.jboss.wsf.stack.metro.DeploymentDescriptorParserExt.parse(DeploymentDescriptorParserExt.java:171)
                  at org.jboss.wsf.stack.metro.metadata.RuntimeModelDeploymentAspect.start(RuntimeModelDeploymentAspect.java:110)


          but it is work fine with SOAP 1.1 binding(@BindingType(value = javax.xml.ws.soap.SOAPBinding.SOAP12HTTPMTOMBINDING)).


          I dont know what is the problem either the the jax-ws not supporting the SOAP 1.2 binding or jboss metro not supporting that or it is problem with metro itself.


          any help on this will be very useful for me.