Is it possible to declare MTOM policy at both class and Method Levels in your Service Endpoint ?

Solution Verified - Updated -

Issue

  • There is a Service Interface Implementation class that is declared as below,
@Stateless
@Local(HelloWorldService.class)
@WebService(endpointInterface = "redhat.demo.ws.types.HelloWorldService", portName = "HelloWorld", 
    name = "HelloWorldService", serviceName = "HelloWorldService", targetNamespace = "http://www.jboss.org/jbossas/quickstarts/HelloWorld", 
    wsdlLocation = "WEB-INF/wsdl/sample.wsdl")
@MTOM(enabled=false)
public class HelloWorldWS implements HelloWorldService {

    @Override
    public String sayHello() {
        return "hello";
    }

    @Override
    public String sayHelloToNames(List<String> arg0) {
        throw new RuntimeException("Not implemented");
    }

    @Override
    @MTOM(enabled=true)
    public String sayHelloToName(String name) {
        return "hello " + name;
    }

}
  • Is it possible to declare the MTOM annotation at both the class and method levels ?

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 6.x
  • JBossWS-CXF

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content