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
Force.comForce.com 

Integration of Apex with MYsql

Hi all,

 

I have a requirement where we have data in mysql database and apex should be coded in such a way that it  gets data from mysql and display on visualforce page. I donot have any idea on how to integrate Salesforce with mysql database. 

 

Please help.

 

Thanks,

Pragati

 

Best Answer chosen by Admin (Salesforce Developers) 
SRKSRK

In this case what u can do is
U can create a web service in any lang (.Net or Java) convert that web serivce into WSDL

put the WSDL in salesfroce create Apex class out of it
& the from u apex class make a callout to u e webservice with correct parametes & the u web service parse the request & get the data fromMy SQL & then send the data as in the form if response back to apex class where u pare the data & dispaly on VF

All Answers

SRKSRK

In this case what u can do is
U can create a web service in any lang (.Net or Java) convert that web serivce into WSDL

put the WSDL in salesfroce create Apex class out of it
& the from u apex class make a callout to u e webservice with correct parametes & the u web service parse the request & get the data fromMy SQL & then send the data as in the form if response back to apex class where u pare the data & dispaly on VF

This was selected as the best answer
Force.comForce.com

Hi SRK,

 

Thanks for your quick response. I got the approach which you have suggested in your reply.

However, I have a basic question regarding this integration. Is it possible from apex to call MySql without involving JAVA in it ?

 

Thanks,

Pragati

SRKSRK

no i don't think so it possible to make direct call from apex to my sql
if it possible then every body start using there own data base why they purschase space from salesforce

it may be possible if My SQL provide any WSDL so u can us those wsdl in salesfoce
but i don;t think so that My SQL provide any WSDL or any API serviese

Farhad KeywanFarhad Keywan

Hi SRK,

 

I am also using the same approach which you have suggested. My question how can we login if we generate the wsdl of only java program which is getting data from MySql?

I have created wsdl from java program and when i am generating apex class from that wsdl 2 errors are coming.

 

if java method has no reurn type then following error is coming

 

Error: Failed to parse wsdl: Unable to find wsdl:binding in the specified wsdl

 

if java program has a return type then following error is coming

 

Error: Failed to parse wsdl: Found more than one wsdl:binding. WSDL with multiple binding not supported

 

Thanks,

Soni

 

 

harithaharitha

Hi ,

 

 Can you please give the sample code 

SRKSRK

attach & send me the WSDL i look into it

Boris FrankBoris Frank
If you don't have time to code, you can use the Skyvia (https://skyvia.com/data-integration/integrate-salesforce-mysql). It is a universal cloud data integration platform for connecting Salesforce and MySQL data. A free plan with 10000 loaded records per month is available.