Web service debugging tips

Previous Next

Here are three tips to debug a web service created with USoft:

TIP 1: When configuring the Rules Service, set the Log Level to: Debug, and go on to Run the Rules Service.

All statements executed are now written in the Rules Service log file.

TIP 2: Use the BenchMark Profiler. Before calling the web service, execute the following HTTP call:

http://host:port/application/user/xml-SOAP/SqlScript?$Password=password&$SQL=invoke RulesEngine.RuleProfilerStart

 

For example:

http://travelserver:4711/TRAVEL/TRAVELUSER/xml-SOAP/SqlScript?$Password=TrustMe&$SQL=invoke RulesEngine.RuleProfilerStart

 

Next, execute the web service call that you want to debug.

Then, stop the Profiler by executing the following HTTP call:

http://host:port/application/user/xml-SOAP/SqlScript?$Password=password&$SQL=invoke RulesEngine.RuleProfilerStop

 

In USoft BenchMark, you can now search for the latest profile.

TIP 3: When a web service provider is created, two files are generated: an ASP.NET HTTP Handler (.ashx) and a "web.config" file.

The "web.config" file contains a Debug key. If the service provider is published from Definer, the value of the Debug key is set to Yes. If the web service provider is published form Authorizer, the value of the Debug key is set to No. You can use the Debug key to suppress or display messages regarding the setup of the web service provider (e.g. the rules service is not started or is using a different port number, the user/password are not valid, the rules service is not started on a specific application, the MSXML component is not installed…).

If the value of the Debug key is set to No, the client application receives a generic error message in case that the web service request fails:

The request was unsuccessful due to an unexpected condition encountered by the server

If the value of the Debug key is set to Yes, the client application receives a more detailed error message in case that the web service request fails.

 

See also

Web Service Error Messages

Web Service Error Handling