首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SOAP日志axis2

SOAP日志axis2
EN

Stack Overflow用户
提问于 2010-03-19 12:18:40
回答 1查看 5.8K关注 0票数 5

使用axis1,可以通过在log4j.properties中添加登录HTTPSender来记录传入/传出soap消息。迁移到axis2 (Version1.4.1)之后,我很难找到如何完成相同类型的日志记录。我尝试在axis2包和org.apache.commons.httpclient上添加日志记录,但是没有提供日志记录。

有什么想法吗?

提亚

EN

回答 1

Stack Overflow用户

发布于 2012-03-21 17:59:12

尝试用调试级别记录这两个包:

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

对于提出的任何请求,您都应该看到如下输出:

代码语言:javascript
复制
>> "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>

对于收到的答复:

代码语言:javascript
复制
<< "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>"
票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2477128

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档