我们正在开发 Apache CXF SOAP MTOM 服务,以将文档上传到服务器。
作为其中的一部分,我们需要在服务中启用安全性。因此,我们使用 WS-Security Policy 来启用安全性。
我们在Service Interface和Service Implementation类中添加了以下注释。
我已将 ut.policy.xml 文件同时放在WEB-INF和src / resources文件夹中。
以下是 cxf.xml
<jaxws:features>
<bean class="org.apache.cxf.feature.LoggingFeature" />
</jaxws:features>
<jaxws:properties>
<entry key="mtom-enabled" value="true" />
<entry key="ws-security.callback-handler" value-ref="passwordCallback" />
</jaxws:properties>
</jaxws:endpoint>
<cxf:bus>
<cxf:features>
<p:policies ignoreUnknownAssertions="true" />
<cxf:logging />
</cxf:features>
</cxf:bus>
<bean id="passwordCallback"
class="com.uob.ewf.AuthenticationCallbackHandler" />
我们仍然无法在生成的WSDL文件中生成WS-Security策略。请帮我们解决这个问题。
谢谢。