could you post a stacktrace of the error you are seeing?
Here is the stacktrace from the test client program that I ran simulating the esb aware callers call:
java.lang.IllegalArgumentException: null 'value' arg in method call.
Looks like the check is in jboss esb message api and not in the EJBProcessor.
Did the stacktrace give any clue? Is this by design?
From that stacktrace it does not look like you are calling the EJBProcessor.
What is com.intelliverse.gf.components.core.esbcomm.AbstractEsbCommunicationImpl.deliver supposed to to?
Have you tried this using the ejbprocessor quickstart? If you modify it to reproduce you issue and I'd happy to take a look.
I started the post with EJBProcessor issue but after you asked me for the stack trace and it became apparent to me when I looked at the stack trace that it may not be an EJBProcessor issue but with the jboss esb api.
com.intelliverse.gf.components.core.esbcomm.AbstractEsbCommunicationImpl.deliver is just a wrapper function to construct the message for esb using the jboss esb api. So the callers call this wrapper with java objects as parameters and this function will construct the esb aware message to the esb using jboss esb api.
Looks like in the esb api, when a call is made to org.jboss.internal.soa.esb.message.format.xml.BodyImpl.add, it is checking for null values so this is preventing us from passing null values to esb where the service configuration is invoking the EJB using EJBProcessor.
Hope this clarifies my post.
Do you know how we can work around this? May be I need to look into ESB api and see whether this checking for null values is by design. Whichever case may be, the end result is that it is preventing us to pass null values to EJBProcessor for onward invocation of EJB.
perhaps you could try not adding anything to the body at all if your payload is null.
I've tried this with the EJBProcessor unit test but in the process found a bug in ConfigTree's toString method where a NullPointerException can be thrown. Fixing the ConfigTree allowed me to simply have an empty message body and still have the EJB invoked.
I'll post back when I've checked this in (just need to make sure this does not break something else).
Are you in a position where you can bulid this from the main trunk later and see if this will work for you?
Somehow it occurred to me that I can try without adding the parameter to the body of the message and bingo - it worked.
I came to update the forum and I see the same suggestion.
Thanks for the suggestion.
But I did not get any null pointer exception.
Got it. If eventually esb api does allow passing null values then EJBProcessor will throw null pointer but if we simply not add the parameter, it is fine.