Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Log axis2 client requests and responses

Tags:

I would like to log all requests/responses made by an axis2 client. I tried to create a file called client-config.wsdd as describer in http://code.google.com/support/bin/answer.py?hl=en&answer=15137 but without success (I don't get a log file).

Requests are made over https and I am not sure if it matters. I tried

<transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/> 

and

<transport name="https" pivot="java:org.apache.axis.transport.http.HTTPSender"/> 

without success.

like image 463
Manuel Darveau Avatar asked Mar 26 '10 15:03

Manuel Darveau


People also ask

What is Axis2 used for?

Axis2 enables you to easily perform the following tasks: Send SOAP messages. Receive and process SOAP messages. Receive and process JSON messages.

What is OMElement Axis2?

(An OMElement is how the AXIs2 Object Model (AXIOM) represents an XML element.) Create the service descriptor, services. xml, which defines the class to be used by the service and the appropriate message receivers.

How do you consume Java SOAP Web services using Axis2 client?

All you need to do is create a new "Dynamic Web Service Project" in a RAD Workspace. Then import your wsdl file to this Project. Then, right click on that file, and select Webservices ---> Generate Client. This would allow you to configure parameters like WS Runtime which can be set to Apache Axis here.


1 Answers

For Axis2-client side logging for SOAP messages, just use the following JVM arguments while running your standalone client or include this VM args in your Appln. Server start script,

JAVA_OPTS=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog -Dorg.apache.commons.logging.simplelog.showdatetime=true -Dorg.apache.commons.logging.simplelog.log.httpclient.wire=debug -Dorg.apache.commons.logging.simplelog.log.org.apache.commons.httpclient=debug 

C:\java %JAVA_OPTS% YourClientAppln.java

Cheers, Sankar

like image 67
Sankar K S Avatar answered Sep 22 '22 06:09

Sankar K S