Feb 04
ColdFusion webservice debugging
Posted by James Netherton | Monday 04 February 2008 11:31 PM | In ColdFusion
Debugging webservices can sometimes be a painful experience. ColdFusion provides some help via the getSoapRequest and getSoapResponse functions, which enable you to view the SOAP request / response XML.
Suppose you want to see all SOAP requests and responses sent to the ColdFusion server. This can be achieved by making a simple change to the client-config.wsdd file. On my multi server ColdFusion 8 installation, the file is located in:
[Installationdrive]\JRun4\servers\cfusion\cfusion-ear\cfusion-war\WEB-INF
The beginning of the file has the following declarations:
<!-- Give ColdFusion the ability to log the request and the response SOAP message -->
<!-- Not recommended for production -->
<!--
<requestFlow>
<handler type="log"/>
</requestFlow>
<responseFlow>
<handler type="log"/>
</responseFlow>
-->
<!-- Change for CFMX 7: Turn off multirefs -->
<parameter name="sendMultiRefs" value="false"/>
</globalConfiguration>
Uncomment the lines around the requestFlow and responseFlow tags. Save the file and restart ColdFusion. You should then see SOAP requests and responses being written out to the cfusion-out.log file.
Note the warning in the snippet above about not enabling SOAP logging in a production environment. For obvious reasons it makes sense not to leave logging enabled for long periods in production.
0 Comments
[Post comment]