在標準eclipse java項目中,cxf.xml配置文件的正確位置在哪裏?我試圖啓用肥皂消息登錄獨立的jar格式客戶端消費者。使用wsdltojava實用程序生成工件,並使用自動生成的起點測試客戶端,它工作得很好。 我根據文檔創建了配置文件,但是在我的軟件中我看不到任何內容。 這是我的cxf.xml文件內容:CXF:無法記錄肥皂信息
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cxf="http://cxf.apache.org/core"
xsi:schemaLocation="
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="abstractLoggingInterceptor" abstract="true">
<property name="prettyLogging" value="true"/>
</bean>
<bean id="loggingInInterceptor" class="org.apache.cxf.interceptor.LoggingInInterceptor" parent="abstractLoggingInterceptor"/>
<bean id="loggingOutInterceptor" class="org.apache.cxf.interceptor.LoggingOutInterceptor" parent="abstractLoggingInterceptor"/>
<cxf:bus>
<cxf:inInterceptors>
<ref bean="loggingInInterceptor"/>
</cxf:inInterceptors>
<cxf:outInterceptors>
<ref bean="loggingOutInterceptor"/>
</cxf:outInterceptors>
<cxf:outFaultInterceptors>
<ref bean="loggingOutInterceptor"/>
</cxf:outFaultInterceptors>
<cxf:inFaultInterceptors>
<ref bean="loggingInInterceptor"/>
</cxf:inFaultInterceptors>
</cxf:bus>
</beans>
我試圖把它放在項目的根目錄下src,卻一無所獲。我錯過了什麼?
我的客戶端代碼是這樣的:
公共final類ClientMHttps {
private static final QName SERVICE_NAME = new QName("http://thecompany/service-b", "myendpoint-v1");
private myendpointPortType port ;
public ClientMHttps() throws java.lang.Exception {
URL wsdlURL = myendpointV1.WSDL_LOCATION;
myendpointV1 ss = new myendpointV1(wsdlURL, SERVICE_NAME);
port = ss.getmyendpointPortTypeEndpointHttpsM();
}
public DeleteMarkedStatusResponse do_DeleteMarkedStatus(DeleteMarkedStatusRequest _deleteMarkedStatus_body) throws java.lang.Exception
{
System.out.println("Invoking deleteMarkedStatus...");
javax.xml.ws.Holder<HeaderType> _header = this.HeaderFarm();
DeleteMarkedStatusResponse _deleteMarkedStatus__return = port.deleteMarkedStatus(_deleteMarkedStatus_body, _header);
System.out.println("deleteMarkedStatus.result=" + _deleteMarkedStatus__return);
return _deleteMarkedStatus__return;
}
沒辦法!我試圖移動cxf.xml everyware,但不工作!請記住,我創建了一個獨立的客戶端,而不是一個servlet。所以在src下我只有我的應用程序包(it.bla.etc。)。 – Muflo
我也有一個獨立的客戶端,它的日誌很好,您是否嘗試將cxf.xml移動到src/main/resources /?您可以創建文件夾並將文件放在那裏,然後它應該記錄。 –
我做到了,但沒有。肥皂消息記錄與缺省日誌級別有關?我的日誌記錄級別設置爲FINE – Muflo