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
mikeafter6mikeafter6 

Native App - trying to consume Web Service from another ORG

We're attempting a native force.com app that needs to call web services on another ORG.  (aka ORG to ORG web service call.)
 
I understand how to consume an ORG's web service using an S-Control, .NET, Java, PHP, Ajax-Toolkit. 
 
How do I consume a web service using APEX code? 
 
NOTE:  The ORG with the web service method stores standardized custom objects (DAAS) that will be used by other ORG's that we create.
 
Please advise if possible.  What are the best ways to login() and work with sessions using apex?
 
Thanks.
- ISV
mikeafter6mikeafter6
1. If not possible, what's the recommended approach(es) that will satisfy the current definition of a "100% Native Force.com App"?
 
2. If not possible, will apex ever consume Web Services from another ORG?
Drew1815Drew1815
Before I get into org-to-org web services, I was hoping you could provide more information on what you are trying to accomplish. Can you elaborate on your design and why there are 2 orgs?
mikeafter6mikeafter6

Sure.  Here is more information on what we are trying to accomplish:

We are writing a native-force.com app that will support hundreds of customers.  We want to maintain some data (DAAS) and business logic in a central location.  We will have one master ORG for our global ISV data and business logic.  Then, one ORG per customer via the trial-force deployment approach. (Each customer will have a copy of a template ORG.  The template ORG is upgradeable and versionable.)

First, we have several tables of data that need to maintained in a central location (DAAS).  To keep it simple, we need to store data on the 52 US-States and data on each country.  We would build a custom object for the US-States and a custom object for the countries in our master ORG. We'd like to use a custom controller and a visual force page to display the US-States and Country data inside each ORG without sync'ing the data.  We'd like the custom controller (in the customer ORG) to call a web service on our master ORG to get the data. 

NOTE:  Our US-State and Country tables will have about 20 fields.

Second, we have some business logic (apex procedures/functions) that can change daily.  The customer ORG's will have apex code that will be updated via the 'trial-force versioning' process a few times per year; however, some code changes too often.  It is not practical to create & deploy daily versions to accomodate this requirement.  We'd like to store this business logic on our master ORG and expose via web-services to our client ORGs.
 
NOTE:  Even though some business logic can change daily, we have to comply with strict policies and procedures for code-changes to meet SOX and SAS-70 requirements.
 
 
I hope this helps.  We will have 10 data tables (built as custom objects) and about 20 functions that we feel are best managed in our centralized ORG.  Again, we are trying to create a native, force.com application, so we want to avoid moving this data-service and API to our own stack.
 
Thanks.
-Mike
Jack_SalesforceJack_Salesforce
I have the same problem, for me it seems that there is no way I can pass the user name and password into another org (let's org B) when I try to consume it from org A. Can any body show me how to consume webservice between orgs ? Thanks
JPClark3JPClark3

Was there ever a solution for this type of cross ORG functionality. We've looked at SalesForce to SalesForce, but the contant connection invitations were too hazard prone for our customers.

 

Jeff

Thomas StrohThomas Stroh

I know this original post is very old, but wanted to see if anyone came up with an appropriate solution to this problem. We have a similar requirement to share data across orgs, but we are very concerned about managing the S2S connections.

 

Thanks,

Thomas