簡體   English   中英

SOAP記錄軸2

[英]SOAP logging axis2

使用axis1,可以通過在log4j.properties中添加HTTPSender上的日志記錄來記錄傳入/傳出的肥皂消息。 遷移到axis2(1.4.1版)之后,我很難理解如何完成相同類型的日志記錄。 我試圖在axis2軟件包和org.apache.commons.httpclient上添加日志記錄,但是沒有提供日志記錄。

有任何想法嗎?

TIA

嘗試使用DEBUG級別記錄這兩個軟件包:

  • httpclient.wire
  • org.apache.commons.httpclient

您應該看到以下輸出,就像您發出的任何請求一樣:

>> "SOAPAction: urn:GeteBayOfficialTime[\r][\n]"
>> "User-Agent: Axis2[\r][\n]"
>> "Host: api.sandbox.ebay.com[\r][\n]"
>> "Content-Length: 1546[\r][\n]"
>> "Content-Type: text/xml; charset=UTF-8[\r][\n]"
>> "<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><ns1:RequesterCredentials xmlns:ns1="urn:ebay:apis:eBLBaseComponents"><ns1:eBayAuthToken>XYZ_ABCD</ns1:eBayAuthToken></ns1:RequesterCredentials></soapenv:Header><soapenv:Body><ns1:GeteBayOfficialTimeRequest xmlns:ns1="urn:ebay:apis:eBLBaseComponents" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns1:GeteBayOfficialTimeRequestType"><ns1:DetailLevelCodeType>ReturnAll</ns1:DetailLevelCodeType><ns1:ErrorLanguage>en_US</ns1:ErrorLanguage><ns1:Version>427</ns1:Version></ns1:GeteBayOfficialTimeRequest></soapenv:Body></soapenv:Envelope>

對於傳入的響應:

<< "HTTP/1.1 200 OK[\r][\n]"
<< "Date: Wed, 23 Aug 2006 02:17:33 GMT[\r][\n]"
<< "Server: Microsoft-IIS/5.0[\r][\n]"
<< "X-EBAY-API-SERVER-NAME: ZXCVBA[\r][\n]"
<< "Content-Type: text/xml;charset=utf-8[\r][\n]"
<< "X-Cache: MISS from thrasher.sjc.ebay.com[\r][\n]"
<< "Connection: close[\r][\n]"
<< "<?xml version="1.0" encoding="UTF-8"?>[\n]"
<< "<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">[\n]"
<< " <soapenv:Body>[\n]"
<< " <GeteBayOfficialTimeResponse xmlns="urn:ebay:apis:eBLBaseComponents">[\n]"
<< " <Timestamp>2006-08-23T02:17:33.544Z</Timestamp>[\n]"
<< " <Ack>Success</Ack>[\n]"
<< " <Version>475</Version>[\n]"
<< " <Build>e475_core_Bundled_3434772_R1</Build>[\n]"
<< " </GeteBayOfficialTimeResponse>[\n]"
<< " </soapenv:Body>[\n]"
<< "</soapenv:Envelope>"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM