Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing a REST service in apex, and getting the below error message.

You do not have access to the Apex class named: JobOrderFeedXML

Basically, below is my class structure.

global class myFeedXML 
    global static void doGet() 
        RestRequest req = RestContext.request;
        RestResponse res = RestContext.response;

        //generate xml

        res.addHeader('Content-Type', 'text/xml');
        res.responseBody = Blob.valueOf(xmlOutput);

Anything wrong with the code? Any input will be so helpful.

share|improve this question
up vote 7 down vote accepted

In the case of a Site the Apex class must be enabled on the special Guest profile associated with the site.

Setup > Develop > Sites > [your site label] > Public Access Settings > Enabled Apex Classes

share|improve this answer
Thanks for the detail info provided. It helps me a lot :D – kitokid Feb 6 '14 at 2:11

This is happening because your user (Profile of the User ) does not have access to the apex class.

Under profiles ,please give access to the myFeedXML class and should work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.