-
15. Re: JBMETA-44, ws annotation processing for references
aloubyansky Jun 18, 2008 2:02 PM (in response to starksm64)I've modified the WebServiceRefHandler to add injectors to the container. http://jira.jboss.com/jira/browse/EJBTHREE-1424 So, the JBCTS-797 now passes with the latest not yet released EJB3 and metadata versions.
Another issue in the ClientContainer was that the AnnotatedElement was lost during serialization. So, sref.getInjectionTargets() had to be used instead. -
16. Re: JBMETA-44, ws annotation processing for references
starksm64 Jun 18, 2008 4:16 PM (in response to starksm64)"alex.loubyansky@jboss.com" wrote:
Another issue in the ClientContainer was that the AnnotatedElement was lost during serialization. So, sref.getInjectionTargets() had to be used instead.
Ok, good catch there. -
17. Re: JBMETA-44, ws annotation processing for references
asoldano Jun 19, 2008 9:43 AM (in response to starksm64)I'm running some test cases on JBossWS side to validate the JBMETA-44 and I've just come to this:
"alex.loubyansky@jboss.com" wrote:
Another question related to JBMETA-44 and JBCTS-797. It's not clear to me how the @WebServiceRef should be mapped to ServiceReferenceMetaData.
What (if anything) in @WebServiceRef should specify the service-interface?
The current processing of @WebServiceRef isif(annotation.type() != Object.class) ref.setServiceRefType(annotation.type().getName()); else ref.setServiceRefType(getType(element)); if(annotation.value() != Object.class) ref.setServiceInterface(annotation.value().getName());
Is this correct? The example Scott posted above is from JBCTS-797 which currently fails because "service-interface is null".
Yes, as Thomas said, this should be the right implementation.
I've just seen that commit 74508 changed the implementation to:if(annotation.type() != Object.class) ref.setServiceRefType(annotation.type().getName()); else ref.setServiceRefType(getType(element)); if(annotation.value() != Object.class) ref.setServiceInterface(annotation.value().getName()); else ref.setServiceInterface(ref.getServiceRefType());
http://fisheye.jboss.com/browse/JBossAS/projects/metadata/trunk/src/main/java/org/jboss/metadata/annotation/creator/AbstractWebServiceRefProcessor.java?r1=74145&r2=74508
In my opinion this is not right since you might end up having the SEI class name in the serviceInterface attribute in cases where a reference whose type is a SEI is defined.
The above change was done because of the "<service-interface> cannot be null" error at the beginning of this thread that actually proved to be caused by the annotatedElement not being set, wan't it?
Thanks -
18. Re: JBMETA-44, ws annotation processing for references
emuckenhuber Jun 19, 2008 10:01 AM (in response to starksm64)"alessio.soldano@jboss.com" wrote:
The above change was done because of the "<service-interface> cannot be null" error at the beginning of this thread that actually proved to be caused by the annotatedElement not being set, wan't it?
Yes i think that was the orignal intention. Although this should not cause any regressions in the tck or AS testsuite?
I'm going to revert it - so it will be in the next metadata release.
Thanks -
19. Re: JBMETA-44, ws annotation processing for references
asoldano Jun 19, 2008 10:18 AM (in response to starksm64)The AS testsuite doesn't cover this specific test afaik while the JBossWS one does, didn't look at the TCK instead.
Thank you then, I'll wait for 1.0.0.Beta24. -
20. Re: JBMETA-44, ws annotation processing for references
asoldano Jun 19, 2008 1:50 PM (in response to starksm64)"alex.loubyansky@jboss.com" wrote:
I've modified the WebServiceRefHandler to add injectors to the container. http://jira.jboss.com/jira/browse/EJBTHREE-1424 So, the JBCTS-797 now passes with the latest not yet released EJB3 and metadata versions.
Another issue in the ClientContainer was that the AnnotatedElement was lost during serialization. So, sref.getInjectionTargets() had to be used instead.
As far as I understand, the commit you're talking about is http://fisheye.jboss.com/browse/JBossAS/projects/ejb3/trunk/core/src/main/java/org/jboss/injection/WebServiceRefHandler.java?r1=69577&r2=74808.
Is this included in the current 0.1.5-SNAPSHOT? I'm asking because I've updated my local environment to use it and my jbossws testcases fail with this:... Caused by: java.lang.IllegalStateException: Annotated element for 'env/Service1' is niether Method nor Field: class org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo at org.jboss.injection.WebServiceRefHandler.addInjector(WebServiceRefHandler.java:113) at org.jboss.injection.WebServiceRefHandler.loadXml(WebServiceRefHandler.java:82) at org.jboss.ejb3.clientmodule.ClientENCInjectionContainer.processMetaData(ClientENCInjectionContainer.java:319) at org.jboss.ejb3.clientmodule.ClientENCInjectionContainer.<init>(ClientENCInjectionContainer.java:164) at org.jboss.ejb3.deployers.Ejb3ClientDeployer.deploy(Ejb3ClientDeployer.java:122)
I guess that's because the service class is something like this:@WebServiceRef(name = "Service1") // Test multiple on type @WebServiceRefs( { @WebServiceRef(name = "Service2"), @WebServiceRef(name = "Port1", type = TestEndpoint.class) }) public class TestEndpointClientTwo { // provide logging private static final Logger log = Logger.getLogger(org.jboss.test.ws.jaxws.webserviceref.TestEndpointClientTwo.class); // Test on field @WebServiceRef(name = "Service3") static Service service3; ...
i.e. it has @WebServiceRef on the class too.
Hope this helps
Thanks -
21. Re: JBMETA-44, ws annotation processing for references
aloubyansky Jun 20, 2008 1:29 PM (in response to starksm64)Yes, that's the one. It's in the release now. I assumed the reference should always have an injection target (field or method).
So, how should it the reference in on the class be handled in this case? -
22. Re: JBMETA-44, ws annotation processing for references
asoldano Jun 21, 2008 12:04 PM (in response to starksm64)"alex.loubyansky@jboss.com" wrote:
Yes, that's the one. It's in the release now. I assumed the reference should always have an injection target (field or method).
So, how should it the reference in on the class be handled in this case?
I think no injection is supposed to happen for this kind of references; we have the reference bound to jndi but no injection. For instance our testcase simply does the lookup for those references.
Btw can I reopen EJBTHREE-1424 or you prefer me to create a new issue?
Thanks -
23. Re: JBMETA-44, ws annotation processing for references
aloubyansky Jun 23, 2008 5:15 AM (in response to starksm64)Yes, a new one, since the EJBTHREE-1424 is in the release notes already.
I just committed a fix. Could you please verify in the WS testsuite that all is good? Thanks. -
24. Re: JBMETA-44, ws annotation processing for references
asoldano Jun 23, 2008 6:19 AM (in response to starksm64)"alex.loubyansky@jboss.com" wrote:
I just committed a fix. Could you please verify in the WS testsuite that all is good? Thanks.
I've just tried your fix and the related tests are passing. Thank you again. -
25. Re: JBMETA-44, ws annotation processing for references
wolfc Jun 23, 2008 9:36 AM (in response to starksm64)It didn't make ejb3-core 0.1.5, so it's coming in 0.1.6.
-
26. Re: JBMETA-44, ws annotation processing for references
asoldano Jun 23, 2008 3:20 PM (in response to starksm64)"wolfc" wrote:
It didn't make ejb3-core 0.1.5, so it's coming in 0.1.6.
Yes, I know, I tested it doing a local 0.1.6-SNAPSHOT. Thank you.