my journey and learnings using mule esb 2

Post on 14-Apr-2017

91 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

My journey and learnings using Mule ESBA guide by Alex FernandezPart 2

What is all about?This are collection of the things that I learn using Mule ESB in our integration projects.

1. Integration is HardThere are no other way to describe it, integration is just hard especially dealing with different endpoints/api.

2. Mavenize your project alwaysThere is no easier way to manage your project than to mavenize it,

PLEASE DO NOT USE JAR FILES TO BE INCLUDED IN YOUR PROJECT

3. Use appropriate tools for API Testing 1. POSTMAN

2. SOAPUI

4. Use appropriate tools for API Testing 1. POSTMAN

2. SOAPUI

Resourceshttp://www.jsonschema2pojo.org/http://www.javaroots.com/2014/12/how-to-check-for-null-payload-in-mule.htmlhttps://docs.mulesoft.com/mule-user-guide/v/3.6/

My journey and learnings using Mule ESBA guide by Alex FernandezPart 2

5. In handling JSONCommon Problems

1. Garbled JSON or one liner json, use a formatter(https://jsonformatter.curiousconcept.com/)

2. JSON to POJO(http://www.jsonschema2pojo.org/)

6. Use Parse Template for simple payload constructionParse template is best solution if your going to construct payload such as json, and MEL works in template.

7. If possible, use the Null Session Handler for JMS and HTTP ConnectorWe, encountered a problem with an third party endpoint and it is return an http status of 500. With that error, it states that the request limit has been reached and we found out that we are sending the whole X_MULE_SESSION. We saw this using an interceptor plugge to ESB Server.

8. Setting an environment in ESB ServerUsually we set a variable in the ESB Server to identify where environment we are in.

Resourceshttp://www.jsonschema2pojo.org/http://www.javaroots.com/2014/12/how-to-check-for-null-payload-in-mule.htmlhttps://docs.mulesoft.com/mule-user-guide/v/3.6/

My journey and learnings using Mule ESBA guide by Alex FernandezPart 3

9. Handling NullPayload#[payload is org.mule.transport.NullPayload]

10. Complex Logic for Choice?Admit it, most of the time that our logic is complex for choice component based on the current payload.

Solution.Use a utility class to handle the logic for the choice.

11. Autowiring managed bean

12. Have an complex XML but no schema?

Most of the time we have an xml but we don’t have an schema to be used in JAXB.

Solution:http://www.freeformatter.com/xsd-generator.html#ad-output

13. Schema to POJO using JaxB

14. Deploying mule app in MMC

Resourceshttp://www.jsonschema2pojo.org/http://www.javaroots.com/2014/12/how-to-check-for-null-payload-in-mule.htmlhttps://docs.mulesoft.com/mule-user-guide/v/3.6/

My journey and learnings using Mule ESBA guide by Alex FernandezPart 3

15.

Resourceshttp://www.jsonschema2pojo.org/http://www.javaroots.com/2014/12/how-to-check-for-null-payload-in-mule.htmlhttps://docs.mulesoft.com/mule-user-guide/v/3.6/

top related