In Rational Software Architect operations are added to Axis2 inbound web service classes via the right-click context menu. To add an operation to an inbound web service class:
- Select Operation from the right-click context menu and choose Default.
- In the Create 'default' Operation Wizard, name the operation and select its return type.
The following are issues with Axis2 that are relevant to you when modeling inbound web services:
- Certain method names on inbound web services will not operate as expected, due to the fact that when handling an inbound web service call Java reflection is used to find and invoke methods in your application. The Axis2 reflection code identifies methods by name only (i.e., not by signature), which means that unexpected behavior can occur if your web service interface contains a method with the same name as an inherited method. Each inbound web service in your application causes a facade beani.e., a stateless session beanto be generated.
So, in addition to your application methods, this class also contains methods inherited from javax.ejb.EjbObject, and possibly others generated by your application server tooling; e.g.: remove, getEJBHome, getHandle, etc.
This limitation has been logged with Apache in JIRA AXIS2-4802 and currently the only workaround is to ensure that your inbound web service does not contain any methods whose names conflict with those in javax.ejb.EjbObject.
- Axis2 web services may not use certain operation names that conflict with method names in the java.lang.Object or javax.ejb.EJBObject classes; e.g. 'remove', 'notifyAll', etc. Because of this behavior the Axis2 listServices web app page (e.g. http://localhost:9082/CuramWS2/services/listServices) sometimes includes a process, setSessionContext, that is not part of the WSDL or implementation. This operation name comes from org.apache.axis2.context.MessageContext.setSessionContext(SessionContext).