function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Adu86Adu86 

How to debug a webservice apex class?

Hi,

I have an Apex class which calls a webservice apex class. I could able to debug the Apex class in the debug logs but I dont see any  logs for the Webservice class. Please let me know how to see the debug logs of Webservice class

Thanks
James LoghryJames Loghry
Probably the simplest way to debug to write a test class for your webservice, likely using a WebServiceCalloutMock class or HttpCalloutMock class to return your expected response.  

Debug logs sometimes don't work nicely with webservice callouts, but make sure you're adding a debug log for the correct user.

Another thing to consider as well is calling the webservice through a 3rd party tool like soapui to see if there are any issues with the request you're sending.