[prev in list] [next in list] [prev in thread] [next in thread] 

List:       axis-user
Subject:    [Axis2] Log of soap messages creates mutiple logs, instead of just one.
From:       JOSE L MARTINEZ-AVIAL <jlmagc () gmail ! com>
Date:       2012-05-22 3:01:12
Message-ID: CAHB4ARtzzfTvNzLLURC2ivh+=Z-4TVgKWKiZB-+O1N9k=ckEYA () mail ! gmail ! com
[Download RAW message or body]

Hello all,
  I just upgraded my webservices client from Axis1 to Axis2. With Axis1 I
was able to log the HTTP requests and responses just by adding the
following line to my log4j.properties

log4j.logger.org.apache.axis.transport.http=DEBUG

and it created nice logs where all the body of the http request was shown
using just one log (The content could be multiline, but there was just one
call to the logger)

8C499036B8A58B99B6BDB01792F3C2897CD828A7 2012-04-17 08:26:28,575 DEBUG
org.apache.axis.transport.http.HTTPSender  - Enter:  HTTPSender::invoke
8C499036B8A58B99B6BDB01792F3C2897CD828A7 2012-04-17 08:26:28,745 DEBUG
org.apache.axis.transport.http.HTTPSender  - XML sent:
8C499036B8A58B99B6BDB01792F3C2897CD828A7 2012-04-17 08:26:28,745 DEBUG
org.apache.axis.transport.http.HTTPSender  -
---------------------------------------------------
8C499036B8A58B99B6BDB01792F3C2897CD828A7 2012-04-17 08:26:28,745 DEBUG
org.apache.axis.transport.http.HTTPSender  - POST /aa HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Host: 180.213.103.133:83
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "aa:query:Query_6_0"
Content-Length: 1878
<?xml version="1.0" encoding="UTF-8"?><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"><soapenv:Body>*** hidden
***</soapenv:Body></soapenv:Envelope>

On Axis2 I changed the line to:

log4j.logger.org.apache.axis2.transport.http=DEBUG

But now Axis2 is using a bunch of calls to the logger to show the HTTP
request and responses

590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,007 DEBUG
httpclient.wire.content  - << "[\n]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,007 DEBUG
httpclient.wire.content  - <<
"</ns1:reasonDescription><ns1:statusCode>200</ns1:statusCode></ns1:statusHeader></ns1:queryReturn></ns1:queryResponse>"
 590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG
httpclient.wire.content  - << "[\r]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG
httpclient.wire.content  - << "[\n]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG
httpclient.wire.content  - << "0"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG
httpclient.wire.content  - << "0"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG
httpclient.wire.content  - << "2"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG
httpclient.wire.content  - << "2"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG
httpclient.wire.content  - << "[\r]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG
httpclient.wire.content  - << "[\n]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG
httpclient.wire.content  - << "</soapenv:Body></soapenv:Envelope>"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG
httpclient.wire.content  - << "[\r]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG
httpclient.wire.content  - << "[\n]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG
httpclient.wire.content  - << "0"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG
httpclient.wire.content  - << "0"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG
httpclient.wire.content  - << "0"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG
httpclient.wire.content  - << "0"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG
httpclient.wire.content  - << "[\r]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG
httpclient.wire.content  - << "[\n]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG
httpclient.wire.content  - << "[\r]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG
httpclient.wire.content  - << "[\n]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG
httpclient.wire.header  - << "[\r][\n]"


Is there any way to make it behave like it did with Axis1?

Thanks


[Attachment #3 (text/html)]

Hello all,<br>  I just upgraded my webservices client from Axis1 to Axis2. With Axis1 \
I was able to log the HTTP requests and responses just by adding the following line \
to my log4j.properties<br><br>log4j.logger.org.apache.axis.transport.http=DEBUG<br> \
<br>and it created nice logs where all the body of the http request was shown using \
just one log (The content could be multiline, but there was just one call to the \
logger)<br><br>8C499036B8A58B99B6BDB01792F3C2897CD828A7 2012-04-17 08:26:28,575 DEBUG \
org.apache.axis.transport.http.HTTPSender  - Enter:  HTTPSender::invoke<br> \
8C499036B8A58B99B6BDB01792F3C2897CD828A7 2012-04-17 08:26:28,745 DEBUG \
org.apache.axis.transport.http.HTTPSender  - XML \
sent:<br>8C499036B8A58B99B6BDB01792F3C2897CD828A7 2012-04-17 08:26:28,745 DEBUG \
org.apache.axis.transport.http.HTTPSender  - \
---------------------------------------------------<br> \
8C499036B8A58B99B6BDB01792F3C2897CD828A7 2012-04-17 08:26:28,745 DEBUG \
org.apache.axis.transport.http.HTTPSender  - POST /aa HTTP/1.0<br>Content-Type: \
text/xml; charset=utf-8<br>Accept: application/soap+xml, application/dime, \
                multipart/related, text/*<br>
User-Agent: Axis/1.4<br>Host: <a \
href="http://180.213.103.133:83">180.213.103.133:83</a><br>Cache-Control: \
no-cache<br>Pragma: no-cache<br>SOAPAction: \
&quot;aa:query:Query_6_0&quot;<br>Content-Length: 1878<br>&lt;?xml \
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;soapenv:Envelope \
xmlns:soapenv=&quot;<a \
href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>&quot; \
xmlns:xsd=&quot;<a href="http://www.w3.org/2001/XMLSchema">http://www.w3.org/2001/XMLSchema</a>&quot; \
xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>&quot;&gt;&lt;soapenv:Body&gt;*** \
hidden ***&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;<br> <br>On Axis2 I changed \
the line to:<br><br>log4j.logger.org.apache.axis2.transport.http=DEBUG<br><br>But now \
Axis2 is using a bunch of calls to the logger to show the HTTP request and \
responses<br><br>590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,007 \
DEBUG httpclient.wire.content  - &lt;&lt; &quot;[\n]&quot;<br> \
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,007 DEBUG \
httpclient.wire.content  - &lt;&lt; \
&quot;&lt;/ns1:reasonDescription&gt;&lt;ns1:statusCode&gt;200&lt;/ns1:statusCode&gt;&l \
t;/ns1:statusHeader&gt;&lt;/ns1:queryReturn&gt;&lt;/ns1:queryResponse&gt;&quot;<br> \
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG \
httpclient.wire.content  - &lt;&lt; \
&quot;[\r]&quot;<br>590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 \
DEBUG httpclient.wire.content  - &lt;&lt; &quot;[\n]&quot;<br> \
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG \
httpclient.wire.content  - &lt;&lt; \
&quot;0&quot;<br>590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 \
DEBUG httpclient.wire.content  - &lt;&lt; &quot;0&quot;<br> \
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG \
httpclient.wire.content  - &lt;&lt; \
&quot;2&quot;<br>590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 \
DEBUG httpclient.wire.content  - &lt;&lt; &quot;2&quot;<br> \
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG \
httpclient.wire.content  - &lt;&lt; \
&quot;[\r]&quot;<br>590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 \
DEBUG httpclient.wire.content  - &lt;&lt; &quot;[\n]&quot;<br> \
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG \
httpclient.wire.content  - &lt;&lt; \
&quot;&lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;&quot;<br>590AEACBF7F76E6912414FD0ED1AB0187543A98B \
2012-05-21 21:59:47,010 DEBUG httpclient.wire.content  - &lt;&lt; \
&quot;[\r]&quot;<br> 590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 \
DEBUG httpclient.wire.content  - &lt;&lt; \
&quot;[\n]&quot;<br>590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 \
DEBUG httpclient.wire.content  - &lt;&lt; &quot;0&quot;<br> \
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG \
httpclient.wire.content  - &lt;&lt; \
&quot;0&quot;<br>590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 \
DEBUG httpclient.wire.content  - &lt;&lt; &quot;0&quot;<br> \
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG \
httpclient.wire.content  - &lt;&lt; \
&quot;0&quot;<br>590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 \
DEBUG httpclient.wire.content  - &lt;&lt; &quot;[\r]&quot;<br> \
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG \
httpclient.wire.content  - &lt;&lt; \
&quot;[\n]&quot;<br>590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 \
DEBUG httpclient.wire.content  - &lt;&lt; &quot;[\r]&quot;<br> \
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG \
httpclient.wire.content  - &lt;&lt; \
&quot;[\n]&quot;<br>590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 \
DEBUG httpclient.wire.header  - &lt;&lt; &quot;[\r][\n]&quot;<br> <br><br>Is there \
any way to make it behave like it did with Axis1?<br><br>Thanks<br><br><br><br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic