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
sarvesh001sarvesh001 

Webservice in sites

Hi ,

How to call soap webservice from force.com sites,

 

please suggest me.

 

Thanks,

sarvesh

 

Best Answer chosen by Admin (Salesforce Developers) 
Avidev9Avidev9

All Answers

Fan@EXCFan@EXC
You can write controller to consume external SOAP service.
sarvesh001sarvesh001

HI Fan,

 

Thanks for replay,

 

to write class we have to consume wsdl of force.com site,

how to get wsdl of force.com sites.

 

please replay.

Thanks.

Avidev9Avidev9
Why you need WSDL of force.com sites?
I am not sure what you want.

Force.com sites are sites developed/hosted on force.com
sarvesh001sarvesh001

Hi avidev,

 

thanks for replay

it means we can directly call webservice in sites by creating class in apex.

 

 

Thanks,

sarvesh

Avidev9Avidev9
Still not clear.
You can always use the controller classes to make calls. Why you need
webservice?

Do you want to create unauthenticated webservice? Which can be called
without username password?
sarvesh001sarvesh001

HI vai,

 

yes you  got my  idea,

 

i want to create  unauthenticated webservice in sites and which i want to called without username password.

 

please provide how to do it.

 

Thanks for replay.

 

 

 

 

Avidev9Avidev9
This was selected as the best answer
sarvesh001sarvesh001

Hi Avi ,

 

Thank you so much , 

 

 

Avidev9Avidev9
Please mark IT as solution if this solves ur problem
sarvesh001sarvesh001

Hi Avi

Morning,

 

its fine , i did go through as mensioned in link ,but i am getting error when generate apex from wsdl,

error is:

 

The following generated class(es) have compilation errors: Error: soapSforceComSchemasClassMywebservi
Error: Method does not exist or incorrect signature: WebServiceCallout.invoke(soapSforceComSchemasClassMywebservi.MyWebService5, soapSforceComSchemasClassMywebservi.makeContact5_element, MAP<String,soapSforceComSchemasClassMywebservi.makeContact5Response_element>, LIST<String>) at 78:13

 

my wsdl link is below:

https://gist.github.com/SarveswaraRao/5583123

 

Thanks,

sarvesh.