[英]How to enable SignatureConfirmation element in an Apache CXF SOAP server
[英]How to enable CXF pretty print logging on the server side in SOAP?
我有一個帶有cxf
的soap
服務,並希望通過注釋啟用默認日志記錄。 我怎么能這樣做?
@WebService
@Features(features = "org.apache.cxf.feature.LoggingFeature") //how pretty print?
public class MySoapService {
}
它應該是與以下xml配置等效的注釋:
<jaxws:endpoint implementor="de.MySoapService" address="/MySoapService">
<jaxws:features>
<bean class="org.apache.cxf.feature.LoggingFeature">
<property name="prettyLogging" value="true"/>
</bean>
</jaxws:features>
</jaxws:endpoint>
我能夠通過創建一個非常簡單的類來解決這個問題,該類擴展了LoggingFeature
並將prettylogging
設置為true
:
public class PrettyLoggingFeature extends LoggingFeature{
public PrettyLoggingFeature(){
super.setPrettyLogging(true);
}
}
之后,我能夠在功能上使用這個類。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.