+ Start a Discussion
SFDC HedgehogSFDC Hedgehog 

Simple webservice using outbound message won't work

I'm trying to get a workflow to fire an outbound message to my Salesforce instance but it always stalls in the outbound message queue with a "(404) Not Found" error.
  • I have a remote site that is active   (https://<instance>.salesforce.com)
  • The webservice is simple;
global class AccountTypeWebService { 
   webService static void AccountTypeChange(String theAccountID, String theAccountType) {
        System.debug('theAccountID: ' + theAccountID);
        System.debug('theAccountType: ' + theAccountType);
     }
}
  • The URL for the outbound message is as follows;
https://<instance>.salesforce.com/services/AccountTypeWebService/AccountTypeChange
  • I have an active workflow that has an immediate workflow action that calls the above URL and specifies that the Account ID and the custom field (AccountType) are to be passed.

Can someone tell me what I'm doing wrong?    It must be simple.

Thanks

 
viruSviruS
Hi,

plz check if AccountTypeWebService  class is accessible to your site user profile
SFDC HedgehogSFDC Hedgehog
Hi ViruS

I couldn't reply directly to your response.   Yes, I have access to the class.

I tried writing a REST service and that didn't work either - But that time I got a (401) error.
I was able to solve my problem with a custom field that triggered a process builder procedure.

I can't seem to find an example of a workflow-based outbound message calling a webservice.... 
All examples I've been able to dig up seem to deal with the use case of a workflow sending an SFDC outbound message to an external system, rather than directly to Salesforce.  

Also, it appears to be very common for a custom button to invoke a webservice (I've done that before myself) - but I haven't had any luck with a workflow-based outbound message invoking a SFDC webservice to the same SFDC instance - even if I pass the session ID.