This said, here is the current implementation for finding out the serviceImplClass and
targetClassName used for the bind (from NativeServiceRefBinderJAXWS):
| String serviceImplClass = null;
|
| // #1 Use the explicit @WebServiceRef.value
| if (wsref != null && wsref.value() != Object.class)
| serviceImplClass = wsref.value().getName();
|
| // #2 Use the target ref type
| if (serviceImplClass == null && targetClass != null &&
Service.class.isAssignableFrom(targetClass))
| serviceImplClass = targetClass.getName();
|
| // #3 Use <service-interface>
| if (serviceImplClass == null && serviceRef.getServiceInterface() !=
null)
| serviceImplClass = serviceRef.getServiceInterface();
|
| // #4 Use javax.xml.ws.Service
| if (serviceImplClass == null)
| serviceImplClass = Service.class.getName();
|
| // #1 Use the explicit @WebServiceRef.type
| if (wsref != null && wsref.type() != Object.class)
| targetClassName = wsref.type().getName();
|
| // #2 Use the target ref type
| if (targetClassName == null && targetClass != null &&
Service.class.isAssignableFrom(targetClass) == false)
| targetClassName = targetClass.getName();
|
We have (#4) setting javax.xml.ws.Service as serviceImplClass when #1, #2 and #3 give no
result. This imho hides an error, ie. not failing when @WebServiceRef.type is not set and
the annotation has type (class) target. As a matter of fact, the javaee 5 doc says
(
https://java.sun.com/javaee/5/docs/api/javax/xml/ws/WebServiceRef.html):
anonymous wrote :
| type
|
| public abstract Class type
|
| The Java type of the resource. For field annotations, the default is the type of
the field. For method annotations, the default is the type of the JavaBeans property. For
class annotations, there is no default and this must be specified.
|
Thomas, do you have an opinion about this? I think this implementation is simply a bit
looser, nothing more.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158002#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...