Friday, July 03, 2015

How to get print request and response for Apache axis log.

How to get print request and response for Apache axis log.

Many times it become necessary  to print Request and Response xml of SOAP UI accessed by Apache Axis Tool. I had implemented different option to do the same.
1

11-      By creating *.WSDD file

Refer to belwo site:-

http://www.google.com/support/adwordsapi/bin/answer.py?answer=15137&topic=237

Save this file as "client-config.wsdd" in the working directory
of your Axis client. Axis will load it automatically.


xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">



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


22 -  Use following code in your file where you want to log the request and response.

SOAPFactory factory = OMAbstractFactory.getSOAP12Factory();
OMElement requestElement = request.getOMElement(RegisterIntegrationAgent.MY_QNAME, factory);

LOGGER.debug(requestElement);

No comments: