0

RESTful Web サービスを作成しました。SOAP を使用せずにバイナリ ファイルをこのサービスに送信したいと考えています。

CXF Web サイトにいくつかの情報があります: XOP

mtom-enabledしかし、CXF JAX-RS エンドポイントを取得してプロパティを設定する方法が見つかりません。

私の春の設定は次のとおりです。

<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> 

<bean id="ExplorationResultService"  parent="baseService" class="com.dfe.demo.ExplorationResultService">
</bean>
<bean id="ExplorationResultResource" class="com.dfe.demo.ExplorationResultResource">
  <property name="explorationResultService" ref="ExplorationResultService"/>
</bean>

そして、私のサーバークラスは次のとおりです。

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();
4

1 に答える 1

1

これを試して:

<beans>
    <jaxrs:server id="bookstore1">
        <jaxrs:properties>
            <entry key="mtom-enabled" value="true"/>
        </jaxrs:properties>
    </jaxrs:server>  
</beans>
于 2010-06-18T20:27:40.540 に答える