« Return to Thread: Guice injection and custom annotation leads to NPE

Re: Guice injection and custom annotation leads to NPE

by metro-3 :: Rate this Message:

Reply to Author | View in Thread

I think that it has to do with our Custom Annotation, because for some reason, our @WebService annotation on the class doesn't seem to be recognized. Here's the code in the EndpointFactory that is giving a null when we have our custom annotation method:

    public static @Nullable String getWsdlLocation(Class<?> implType) {
        String wsdl;
        WebService ws = implType.getAnnotation(WebService.class);
        if (ws != null) {
            wsdl = ws.wsdlLocation();
        } else {
            WebServiceProvider wsProvider = implType.getAnnotation(WebServiceProvider.class);
            assert wsProvider != null;
            wsdl = wsProvider.wsdlLocation();
        }
        if (wsdl.length() < 1) {
            wsdl = null;
        }
        return wsdl;
    }

No WebService is found in the annotation map, but if we remove the method with our annotation, then the WebService IS found. Any ideas?
[Message sent by forum member 'demichej' (demichej)]

http://forums.java.net/jive/thread.jspa?messageID=354999

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: Guice injection and custom annotation leads to NPE