Find your content:

Search form

You are here

Error Accessing Public SOAP Web Service in Salesforce


Is there any way to create a public SOAP web service in Salesforce? I followed the instructions at , but when I tried to access my web service, I got an error - "UNKNOWN_EXCEPTION: Site under construction"

Attribution to: Inshar

Possible Suggestion/Solution #1

Force Guru had posted a code on how to use sites and create a public webservice .

global class DemoClass {
    webService static string Method() {
        return 'DoSomething' ;

You may need to change the address in your SOAP file enter image description here

Also if you are looking for proper documentation using apex class methods to expose as WSDLs here is the doc

Attribution to: Mohith Shrivastava

Possible Suggestion/Solution #2

And if you want to use REST, I suggest taking a look at:

you basically create apexrest classes, and add the classes to a public salesforce site

Attribution to: pjcarly

Possible Suggestion/Solution #3

I found the error. Its something wrong with the Endpoint URL. I changed the endpoint url as following.

Replace the bolded text with your default web address of your site. In my case, its

So finally, It should look like

I only used, earlier. That was the issue.

Thanks all for your support!

Attribution to: Inshar
This content is remixed from stackoverflow or stackexchange. Please visit

My Block Status

My Block Content