Apama 10.3 | Apama Documentation | Connecting Apama Applications to External Components | Standard IAF Plug-ins | The Web Services Client IAF Adapter | Configuring logging for a Web Services Client adapter
Configuring logging for a Web Services Client adapter
To configure logging for a Web Services Client adapter, modify the APAMA_HOME/adapters/config/adapters-log4j.properties file. The default logging level for the properties listed in this file is INFO. The com.progress.el package contains the mapping framework. Possible logging levels are INFO, WARN, ERROR, DEBUG, and TRACE.
If you want you can place this file in another location or use a different name for this file. If you do then be sure to update the value of the log4j.configuration property in the Web Services Client adapter's IAF configuration file. This is the line you need to change:
<property name="log4j.configuration"
In addition to general adapter logging, you can configure payload logging. Payload logging can help you diagnose problems by indicating what the constructed request and responses looks like, which can point to whether a problem is in the tooling part of your application or in the runtime execution.
The steps below show how to configure payload logging for a convention-based mapping such as the following:
* To configure payload logging
1. In the Project Explorer toolbar, click View Menu () and select Customize View.
This displays the Available Customizations dialog.
2. In the Filters tab, ensure that the .*resources check box is not selected. Click OK.
The .services folder now appears in the project's hierarchy in the Project Explorer.
3. For the operation for which you want to enable payload logging, in the project's hierarchy in Project Explorer, open the XML file for the operation's route statement. For the mapping shown in the image at the beginning of these instructions, you would select the StockQuote_StockQuoteSoap_GetQuote_route.xml file.
4. In the operation's _route.xml file, add the following lines just after the <cxf.properties> section:
<bean class="org.apache.cxf.feature.LoggingFeature"/>
For example:
. . .>
<entry key="mtom-enabled"
<entry key="dataFormat"
<bean class="org.apache.cxf.feature.LoggingFeature"/>
5. In the APAMA_HOME/adapters/config/adapters-log4j.properties file, change the default INFO setting for log4j.logger.org.apache.cxf to the logging level you want.
After you invoke the operation you specified payload logging for, the iaf.log file for the Web Services Client adapter displays something like the following:
ID: 1
Address: http://www.webservicex.net/stockquote.asmx
Encoding: UTF-8
Content-Type: text/xml
Headers: {SOAPAction=["http://www.webserviceX.NET/GetQuote"], Accept=[*/*]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body><GetQuote xmlns="http://www.webserviceX.NET/">

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.