Author: heiko.braun(a)jboss.com
Date: 2007-03-21 10:15:41 -0400 (Wed, 21 Mar 2007)
New Revision: 2653
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
Log:
Fix JBCTS-497
Modified:
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java
===================================================================
---
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java 2007-03-21
14:15:15 UTC (rev 2652)
+++
trunk/jbossws-core/src/java/org/jboss/ws/core/jaxws/client/ServiceRefHandlerJAXWS.java 2007-03-21
14:15:41 UTC (rev 2653)
@@ -42,6 +42,7 @@
import org.jboss.logging.Logger;
import org.jboss.util.naming.Util;
import org.jboss.ws.metadata.j2ee.serviceref.UnifiedServiceRefMetaData;
+import org.jboss.ws.WSException;
/**
* Binds a JAXWS Service object in the client's ENC
@@ -95,11 +96,22 @@
Class targetClass = null;
if (anElement instanceof Field)
+ {
targetClass = ((Field)anElement).getType();
+ }
else if (anElement instanceof Method)
+ {
targetClass = ((Method)anElement).getParameterTypes()[0];
+ }
+ else
+ {
+ if(null == wsref.type())
+ throw new WSException("For class annotations, the WebServiceRef.type
MUST be specified.");
- String targetClassName = (targetClass != null ? targetClass.getName() : null);
+ targetClass = wsref.type();
+ }
+
+ String targetClassName = (targetClass != null ? targetClass.getName() : null);
String externalName = encCtx.getNameInNamespace() + "/" + encName;
log.info("setupServiceRef [jndi=" + externalName + ",target=" +
targetClassName + "]");
Show replies by date