mule cxf logging

У меня есть поток клиента SOAP в mule, и я добавил перехватчик cxf, чтобы увидеть ответ на запрос. Есть ли способ просмотреть точный ответ HTTP-запроса в конфигурации mule?

Вот мой код для потока:

<http:outbound-endpoint address="http://84.19.253.166/service.asmx" method="POST" >
        <cxf:jaxws-client
        enableMuleSoapHeaders="false" 
        clientClass="org.tempuri.Service" 
        port= "ServiceSoap" 
        wsdlLocation="classpath:service.wsdl" 
        operation="ProcessRequest" 
        >
        <cxf:inInterceptors>
        <spring:bean class="org.apache.cxf.interceptor.LoggingInInterceptor" />
        </cxf:inInterceptors>
<cxf:outInterceptors>
    <spring:bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
</cxf:outInterceptors>    
     </cxf:jaxws-client>
     </http:outbound-endpoint>

person Ummul    schedule 15.06.2012    source источник


Ответы (2)


Текущий HTTP-коннектор Mule 3 использует Commons HttpClient 3.x для исходящей отправки.

Итак, включите полное ведение журнала проводов для Commons HttpClient, и вы увидите полные HTTP-кадры, отправленные и полученные удаленным сервером.

person David Dossot    schedule 15.06.2012

Настоятельно рекомендую добавить одну простую строчку в log4j2.xml

  <AsyncLogger name="org.apache.cxf" level="INFO"/>

Вы выбираете одну из нескольких опций в диапазоне уровней (ИНФОРМАЦИЯ, ПРЕДУПРЕЖДЕНИЕ, ОТЛАДКА и т. Д.).

Если вы хотите сохранить журнал в другой файл, просто введите:

<AppenderRef ref="cxf_logs" />

Но не забудьте добавить File-Appender

<Appenders>
<RollingFile name="cxf_logs" fileName="${sys:mule.home}${sys:file.separator}logs${sys:file.separator}your-interfaces-cxf.log" 
             filePattern="${sys:mule.home}${sys:file.separator}logs${sys:file.separator}your-interfaces-cxf-%i.log">
        <PatternLayout pattern="%d [%t] %-5p %c - %m%n" />
        <SizeBasedTriggeringPolicy size="10 MB" />
        <DefaultRolloverStrategy max="10"/>
    </RollingFile>
   </Appenders>
person deyvw    schedule 03.11.2016