Find your content:

Search form

You are here

Error Accessing Public SOAP Web Service in Salesforce

 
Share

Is there any way to create a public SOAP web service in Salesforce? I followed the instructions at http://forceguru.blogspot.com/2012/09/creating-public-web-service-in.html , 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

http://forceguru.blogspot.in/2012/09/creating-public-web-service-in.html

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

http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_web_services_methods.htm


Attribution to: Mohith Shrivastava

Possible Suggestion/Solution #2

And if you want to use REST, I suggest taking a look at: http://blogs.developerforce.com/developer-relations/2012/02/quick-tip-public-restful-web-services-on-force-com-sites.html

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.

https://ap1-api.salesforce.com/services/Soap/class/InsharWS

Replace the bolded text with your default web address of your site. In my case, its inshar-developer-edition.ap1.force.com/testWS

So finally, It should look like http://inshar-developer-edition.ap1.force.com/testWS/services/Soap/class/InsharWS

I only used inshar-developer-edition.ap1.force.com, earlier. That was the issue.

Thanks all for your support!


Attribution to: Inshar
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/3621

My Block Status

My Block Content