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
jaganjagan 

Calling Java From Salesforce

Hi all,

 

I have a java program which do the following

 

1.Gets the data from salesforce.

2.Forms a request string to query an external server.

3.Send request to that server and get the response from the server.

4.Get the required data from response and update it in slaesforce.

 

This is working fine when java program is executed on my machine. What we need now is to invoke this

java program from salesforce on a timely basis(for every 10 or 15 min)

 

If any one came across this situation ,Please help me regarding this, as we need this urgent.

 

Thanks & Regards,

 

Jagan.

 

 

Best Answer chosen by Admin (Salesforce Developers) 
werewolfwerewolf

If you need to invoke it every 10-15 minutes, why would you need Salesforce.com to invoke it?  Just fire up a cron job and have it run every 10-15 minutes.

 

If you really need Salesforce.com to call it to invoke it then you'll have to wrap it in a web service that Salesforce.com can call.

All Answers

werewolfwerewolf

If you need to invoke it every 10-15 minutes, why would you need Salesforce.com to invoke it?  Just fire up a cron job and have it run every 10-15 minutes.

 

If you really need Salesforce.com to call it to invoke it then you'll have to wrap it in a web service that Salesforce.com can call.

This was selected as the best answer
gv007gv007
I am in same boat,but situation is different,my situation is I want upload documents using apex to a third party CMS,I tried using apex am getting the limitations of 100kb ,so here I tried to use java method ,this is my first time their is need of other language in my application ..Please let me know how to invoke java method or class in a apex class past one day am going documentation I I'd find anything ,long back I saw this concept right now am unable find the example ,in situation some help is needed to me.
SuperfellSuperfell
Salesforce doesn't host customer java code on their servers, if you want to call java code, you'll need to expose it as a web service, and call it via HTTP and/or SOAP/WSDL from apex code.
gv007gv007

Thanks Simon for yours reply know this question am posting in a wrong place but I it'd get any conformation regarding this,if you know help me.

 

 

I am sending an http call from salesforce to another CMS API in this call am sending documents ,when am using http it is only allowing 100kb If limit is exceed it is giving an System.call out exception exceed maximum size limit 100000.Their is any better approach for this problem .here am sending the request one time.

SuperfellSuperfell
You'll need something external to pull the documents via the enterprise/partner APIs.
sauravsharma001sauravsharma001

Hi Jagan,

 

 Can you send the java code for the accessing salesforce database .I am having problem with that.