You need to sign in to do that
Don't have an account?
How can I call Web Services from one salesforce org to another
I have two salesforce developer accounts and I create a class with web service method in one of the developer org and want other developer org to invoke this class method using the SOAP Web Service. How can I achieve it?
To put it again: How can the web services in one developer org ( or any salesforce org) can be consumed/used/invoked by other developer org?
I am kind of new to web services but needs a heads up like how to get started.
- Create a Soap Webservice in one of your org ( ORG1 )
- Generate WSDL of this webservice
- GEt Enerprise WSDL
- Go to another org ( ORG2 )
- Go to Apex Classes an Click button "Generate from WSDL" using WSDL in Step 2
- Generate another Class with Enerprise WSDL
- Develop a class in ORG2 where you generated apex class to use Login method of Enterprise WSDL using credentials from Org1
- Then call the saop method developed in step 1 from the class generated in step 5
You could see this blog: http://www.jitendrazaa.com/blog/salesforce/getting-record-from-one-salesforce-organization-to-other/Here instead of login using enterprise wsdl he has direclty sending soap request.
All Answers
- Create a Soap Webservice in one of your org ( ORG1 )
- Generate WSDL of this webservice
- GEt Enerprise WSDL
- Go to another org ( ORG2 )
- Go to Apex Classes an Click button "Generate from WSDL" using WSDL in Step 2
- Generate another Class with Enerprise WSDL
- Develop a class in ORG2 where you generated apex class to use Login method of Enterprise WSDL using credentials from Org1
- Then call the saop method developed in step 1 from the class generated in step 5
You could see this blog: http://www.jitendrazaa.com/blog/salesforce/getting-record-from-one-salesforce-organization-to-other/Here instead of login using enterprise wsdl he has direclty sending soap request.
On the inbound side, you can create your own SOAP web services by writing Apex methods using the webservicekeyword. From there you can auto-generate a WSDL (in Develop | Classes). On the outbound side, you can invoke custom SOAP web services from a Visualforce page controller or Ajax toolkit. You'll find more in the Integration section of
http://http://wiki.developerforce.com/index.php/An_Introduction_to_Apex
Thanks!
Reetesh Makkar
Thank you Shashikant and Reetesh for the valuable reply.
What is salesforce-to-salesforce? Meant for what?. I thought it is meant for the purpose of integrating two salesforce organizations.
Before you can use Salesforce to Salesforce (S2S), you have to enable it. This has to be done by both parties - on your org, as well as on the org with which you are going to share data.
This is the link that can help you understand it more
https://developer.salesforce.com/page/An_Introduction_to_Salesforce_to_Salesforce