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
tchrisbakertchrisbaker 

Help with a web site calling my web service

I wrote an Apex Web Service which is going to get called from a web site running on Cold Fusion. The web developer was saying that typically to call a service he would be given a URL to the WSDL and it would return an object with all the methods for that service.

 

I don't see how to do this in Salesforce. Should we take the WSDL and save it on the web server that's calling it? Also, he has the Enterprise WSDL so should he save that to the server too? He could then use that to login and get his session ID. Then supply the session ID to my Apex web service? I looked for documentation on how to call an Apex web service but I am only finding information about how to call out from Salesforce. 

 

Thanks,

Chris

Best Answer chosen by Admin (Salesforce Developers) 
MiddhaMiddha

I am not very sure about Coldfusion but done it for many other systems and yes we have to import the WSDL into the system to use it so that the system can refer to the methods in it.

 

 

All Answers

MiddhaMiddha

Yes, the steps you have listed are correct. You would need Enterprise/Partner WSDL to login using username and password and generate a Session ID and Server URL.

 

Then you'll use the WSDL of your APEX code and set the Session ID and Server URL from above to call methods in APEX WSDL.

 

You would have to consume both these WSDLs in your Cold Fusion system.

tchrisbakertchrisbaker

Thank you. Are we correct in needing to put both WSDLs on the web server where Cold Fusion is running?

MiddhaMiddha

I am not very sure about Coldfusion but done it for many other systems and yes we have to import the WSDL into the system to use it so that the system can refer to the methods in it.

 

 

This was selected as the best answer
tchrisbakertchrisbaker

Sorry one more question, do you know how he would set the session id and server url? Would my WSDL from my Apex class have a method to do so?

MiddhaMiddha

You'll be setting SessionId and Server URL in SessionHeader:

 

You can find some examples in this post: http://boards.developerforce.com/t5/Apex-Code-Development/Apex-Callouts-to-Apex-Web-Service-Automated-S2S-Possible/td-p/126591