Invoke Custom Java Class In Mule
In this tutorial we will demonstrate how can we Invoke Custom Java Class In Mule
Create a project in anypoint studio
Create Java Class in under src/main/java in anypoint studio
Set the input parameter as variable
Drag and drop the invoke static connector to call java class and configure the Java Class name as packagename.classname ,methodname and provide the arguments as shown below
Deploy the project and test
Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.
For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.
Very helpful and easy to understand the concepts. Thank you so much. Appreciated!!!
Fantasitc website for learning MuleEsb, thanks a lot!!!
Nice website for learning MuleSoft
I need to pass json payload received from rest api call to Java method which processes the response. Json payload can be 5 MB. I tried using InputStream as data type, however, got error “The value ‘{ medicationJson : vars.drugs}’ of type java.lang.String could not be transformed to the desired type java.util.Map [Not accessible. Value obtained from method: getDetailedDescription()]”
drugs is json array, {
“drug_code”: 225,
“class_name”: “Human”,
“drug_identification_number”: “00000019”,
“brand_name”: “PLACIDYL CAP 200MG”,
“descriptor”: “”,
“number_of_ais”: “1”,
“ai_group_no”: “0107593001”,
“company_name”: “ABBOTT LABORATORIES, LIMITED”,
“last_update_date”: “2008-07-23”
},
Suggestions?