Maybe you have this class implemented twice in different jars? Than you don't have control which implementation loads first (despite you select specific jar during external service creation).
My example depends on internal BAW class TWBeanInfo - so you have to add to classpath: <BAW_root>/BPM/Lombardi/lib/ps.jar during compilation. Using TWBeanInfo helper makes this task little bit easier. But as Maximilian Tews already said in this thread - you can just implement standard getMethodDescriptors() from BeanInfo interface e.g. by using SimpleBeanInfo. In that case you don't need IBM provided classes.
Both approaches should work fine. I tested my example on BAW 24.0.0 - but it should work on any BAW.
Original Message:
Sent: Tue November 19, 2024 01:56 AM
From: Owais Iskhab
Subject: IBM Baw Jar development
Dear @Sebastian Tylko still same behavior , tried the above one.
------------------------------
Owais Iskhab
Original Message:
Sent: Fri November 15, 2024 11:40 AM
From: Sebastian Tylko
Subject: IBM Baw Jar development
if your class is:
package yourpackage;
public class YourClass {
public String doSomething(String key, String value) {
return key+"-"+value;
}
}
...than your BeanInfo class can look like below:
package yourpackage;
import teamworks.TWBeanInfo;
public class YourClassBeanInfo extends TWBeanInfo {
private static Class<YourClass> beanClass = YourClass.class;
private static MethodInfo[] yourClassBeanInfoMethods = new MethodInfo[1];
public YourClassBeanInfo() {
super(yourClassBeanInfoMethods);
}
public Class<YourClass> getBeanClass() {
return beanClass;
}
static {
yourClassBeanInfoMethods[0] = new MethodInfo(beanClass, "doSomething", "doSomething(String, String)");
yourClassBeanInfoMethods[0].addArgument(String.class, "key");
yourClassBeanInfoMethods[0].addArgument(String.class, "value");
}
}
------------------------------
Sebastian Tylko
Original Message:
Sent: Fri November 15, 2024 12:39 AM
From: Owais Iskhab
Subject: IBM Baw Jar development
Hi @Maximilian Tews I tried this by providing BeanInfo to my jar still same getting Parameter1 ,Parameter2..I even tried Compilation option from eclipse IDE which was mentioned in some other post but still same .
------------------------------
Owais Iskhab
Original Message:
Sent: Fri March 10, 2023 02:25 AM
From: Maximilian Tews
Subject: IBM Baw Jar development
Hi @YASEMİN ALADI , please have a look at https://www.ibm.com/docs/en/baw/22.x?topic=service-invoking-java
Tip: Because Java method signatures that are inspected in complied classes do not contain information about the parameter names, generic names and numbers are generated for them, for example, Parameter 1 (String), Parameter 2 (Integer). You can add BeanInfo classes that provide additional information about the classes and their methods.
You need to provide BeanInfo classes in the jar file such that BAW knows the name of the parameters. See https://docs.oracle.com/javase/8/docs/api/java/beans/BeanInfo.html, https://docs.oracle.com/javase/8/docs/api/java/beans/MethodDescriptor.html, https://docs.oracle.com/javase/8/docs/api/java/beans/ParameterDescriptor.html
With those you describe what the parameter names are.
------------------------------
Maximilian Tews
Original Message:
Sent: Thu March 09, 2023 09:41 AM
From: YASEMİN ALADI
Subject: IBM Baw Jar development
Hello,
I want to develop a jar file for IBM BAW. I developed a jar file and called in process but parameter names seems parameter1, parameter2.
How can I develop jar file so that parameter names seem like name, surname?
Thanks for your help.
------------------------------
YASEMİN ALADI
------------------------------