IBM Sterling B2B Integrator and IBM Sterling File Gateway Developers

Missing MESA for custom service or adapter development? Try Apache Maven

By KALYAN PAVAN KISHORE CHAKRAVARTHULA posted 22 days ago

  

IBM has withdrawn Mesa Editor and Studio, a services development kit (SDK), and entered it into retired status in IBM Sterling B2B Integrator (B2Bi) v5.2.6.

We know many customers and software developers love MESA Studio SDK and are looking for alternatives to extend B2Bi for their complex file transfer requirements. Although there are no comparable alternatives to MESA on the market now, Apache Maven can help customers and developers by simplifying custom service development.

After reviewing Apache Maven myself, I think one thing it’s missing is a "Hello, world!" program that helps users get acquainted with the tool. So let's work through a scenario together that retrieves a service parameter and updates process data. This example is simple but it still illustrates how to write and build a custom service using Apache Maven in Eclipse.


1) Minimum Prerequisites

1.1) IBM JDK 1.7
1.2) Eclipse - Neon Release (4.6.0)
1.3) IBM Sterling B2B Integrator v5.2.6.x



2) Create a maven project










3) Update java build path with below jars



4) Create local-maven-repo (local repository),folder structures(servicedefs, src->main->assembly)





5) HelloWorld.java
Create the HelloWorld.java application file. The file will be created in the directory HelloWorld/src/com.ibm.custom/com/ibm/custom/. Copy and paste the code below into the HelloWorld.java application. “processData(..)” is the entry point for the custom service.





6) HelloWorldService.xml

Create the HelloWorldService.xml file. The file will be created in this directory: HelloWorld/resources/servicedefs/. Copy and paste the code below into the HelloWorldService.xml file. This file contains the definition of service and parameters.




7) serviceinstances.xml
Create the serviceinstances.xml file. The file will be created in the directory HelloWorld/resources. Copy and paste the code below into the serviceinstances.xml file. This file contains the service configuration





8) Maven Assembly Plugin - default.xml
Create the Maven Assembly Plugin - default.xml file. The file will be created in the directory HelloWorld/src/main/assembly/. Copy and paste the code below into the default.xml file.





9) pom.xml
Copy and paste the code below into pom.xml






10) HelloWorld-0.1-bin.jar

9.1) Check for compilation errors.
9.2) Right-click on pom.xml->Run As->Maven install which creates service jar – HelloWorld-0.1-bin.jar in "target" folder.







Disclaimer
The views expressed are solely my own and do not express the views or opinions of my employer. I shall not be accountable for and does not accept any liability or responsibility whatsoever for any inaccuracies, omissions, errors, misleading information, loss or damage howsoever arising (including without limitation, incidental, punitive, exemplary, special or consequential damages, loss of profit or damages resulting from lost data or business interruption), be it by negligence or otherwise, or expense resulting from:-
- Using the information and contents of this article whether with or without authorization;
- Relying on the information and contents of this article, whether downloaded or not;
- The performance, operation, functionality, non performance, unavailability, inaccessibility, or corruption of this article;
- Refer vendor specific documentation for any kind of latest information;
#Featured-area-1
#Featured-area-1-home
0 comments
338 views

Permalink