On Apr 15, 2009, at 10:12 AM, Laird Nelson wrote:
On Wed, Apr 15, 2009 at 11:57 AM, David Blevins <[email protected]
>wrote:
It definitely does test the "EJB" functionality.
I'm sorry, what I meant was, there is no method in the
CalculatorTest.java
file that does a JNDI lookup against either a @Local or a @Remote
interface
to access a stub for the CalculatorImpl stateless session bean. You
of
course are correct that on the server side the CalculatorImpl bean
does get
exercised.
Got it. I misunderstood.
I am taking away from all of this that for any given interface:
- It may be marked as a @Local, but not also as @Remote or
@WebService
- It may be marked as a @Remote, but not also as @Local or
@WebService
- It may be marked as a @WebService, but not also as @Local or
@Remote
Check.
- Inheritance of these kinds of interfaces poses problems in CXF,
apparently, and hence also in OpenEJB.
Correct -- this was news to me as well. Didn't realize CXF would have
issues with this. Not sure if this is a JAX-WS spec thing I'm not
aware of.
- In order to expose any kind of client interface to potential
clients,
one must duplicate the methods in each kind of interface. That
is, one must
have a CalculatorLocal @Local interface with its add and mulitply
methods, a
CalculatorRemote @Remote interface with its (identical) add and
multiply
methods, and a CalculatorWs @WebService SEI with its (identical)
add and
multiply methods.
Also correct with the minor caveat that the lack of support for
inheritance is just in the CXF side of things. So the "methods must
be declared in the interface itself" restriction only applies to the
WS interface. I've tested this out and it works just fine:
@WebService(targetNamespace = "http://superbiz.org/wsdl")
public interface CalculatorWs {
public int sum(int add1, int add2);
public int multiply(int mul1, int mul2);
}
@Local
public interface CalculatorLocal extends CalculatorWs {
}
- An implementation (@Stateless) class may implement any or all of
these
kinds of interfaces depending on the view it wants to expose.
Correct. Additionally it can have several @Local and @Remote
interfaces, though just one @WebService interface.
I am *really* sorry to be so thick and slow on all of this and I
appreciate
the help I've been given.
This has been a great thread -- been loving it. I think we've all
learned a few things. I certainly had no idea CXF would choke on
inheritance and can think of a few times I've advised inheritance for
WS interfaces not knowing it wouldn't work with CXF. Wish this
discussion had happened sooner! :)
-David