How do i change the property of jaxrs endpoint to support "mtom"

Posted by rocwing on Stack Overflow See other posts from Stack Overflow or by rocwing
Published on 2010-06-01T00:26:09Z Indexed on 2010/06/01 0:33 UTC
Read the original article Hit count: 236

Filed under:
|
|

I created a RESTful web service, and i want to send binary files to this service without soap.

There are some information on CXF website: link text

But i can't find a way to get the CXF jaxrs endpoints,and set an "mtom-enabled" property.

My Spring config is:

<jaxrs:server id="fis" address="http://172.20.41.40:8080/fis">
<jaxrs:serviceBeans>
    <ref bean="FaultInfoResource" />
    <ref bean="ExplorationResultResource" />
</jaxrs:serviceBeans>  
  </jaxrs:server>   

<bean id="FaultInfoService"  parent="baseService" class="com.dfe.demo.FaultInfoService">
</bean>
<bean id="FaultInfoResource" class="com.dfe.demo.FaultInfoResource">
  <property name="faultInfoService" ref="FaultInfoService"/>
</bean> 

And i server class is:

ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext(new String[]{"com/dfe/iss/config/applicationContext.xml","com/dfe/demo/yearlyplan/cxf-servlet.xml"});


JAXRSServerFactoryBean fib = (JAXRSServerFactoryBean)ctx.getBean("fis");


fib.create();

© Stack Overflow or respective owner

Related posts about rest

Related posts about cxf