On Apr 15, 2009, at 9:09 AM, David Blevins wrote:


On Apr 14, 2009, at 1:31 PM, Jonathan Gallimore wrote:

I had hoped it might work, but I'm not surprised it didn't. I've always found I need to create both interfaces and have the same methods in both.

I did try and setting the WS interface to extend the local one, and had the
same error as you. The other way round seemed to work, though.

This seems to be a CXF issue. When the WS interface extends anything, it seems the methods of the extended interfaces are not seen by CXF and just result in:

javax.xml.ws.WebServiceException: Could not find operation info for web method sum. at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java: 102)
        at $Proxy18.sum(Unknown Source)
at org .superbiz .calculator .CalculatorTest.testCalculatorViaWsInterface(CalculatorTest.java:52)

Seems CXF might be calling 'getDeclaredMethods()' on the service endpoint interface and only preparing "operation info" for those methods. Would be nice to get this to work, but will likely require someone to dig into the CXF side of things.

As David says, we could probably make this work, but its against the current spec, so the code might not work with other containers. I'm happy to have a go at this when I have some free time (unless someone else beats me to it)
;-)

Most the way through the "universal interface" sort of support, but this won't fix the CXF issue of not supporting one interface extending another. I'm not sure if the JAX-WS spec says anything about that, but it seems like a bug to me. Feel free to grab that ball and run with it :)

Filed a JIRA for the CXF/inheritance issue:

https://issues.apache.org/jira/browse/OPENEJB-1020 : "Inheritance not supported in JAX-WS endpoint interfaces exposed via CXF"

Jon, feel free to grab that one if you want to look into it.

Also filed a jira for interfaces supporting multiple views:

https://issues.apache.org/jira/browse/OPENEJB-1018 : "Support for exposing a single interface as @WebService, @Remote, and @Local"


-David

Reply via email to