I have tried to connect Saleforce to salesforce for data syncronization using web services. This is what I followed.
1) I used partnerwsdl to login to the salesforce org B.
2)Created custom webservice in salesforce org B , which I consumed in Org A.
3)On the opportunity object I created after update trigger and pulled out the id's of the updated opportunity and passed on to the future method in the class and then queried opportunity object using those id's.Then I made a Callout to the custom Webservice and passed data as parameter for upsertion in the destination org.However,I have come to the conclusion that I can only send 10 records as my code makes a Callout for every updated opportunity record .Hence ,once 10 callouts are done means 10 methods are updated in the org B and no more processing is possible
Does that mean real time integration between salesforce and salesforce is not possible or is there something that I am missing.
Can I use scheduler in such a way that once trigger is fired, updated records are passed from trigger to class and then scheduler activates the class, which makes a callout to the webservice and then web service processes the records.I am thinking that if it is possible then I do not have to call webservice per record. I can run scheduler every hour and class will passes couple of records to the webservice at once.
Please do let me know of there is some other alternative.It looks like more of batch processing then real time integration is possible between Salesforce and Salesoforce