jaxws/src/share/jaxws_classes/com/sun/xml/internal/ws/model/RuntimeModeler.java
changeset 22427 1f8304cd1d53
parent 18372 4d90cbb0d70a
equal deleted inserted replaced
21508:3dd9732b1703 22427:1f8304cd1d53
    43 import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
    43 import com.sun.xml.internal.ws.binding.WebServiceFeatureList;
    44 import com.sun.xml.internal.ws.model.soap.SOAPBindingImpl;
    44 import com.sun.xml.internal.ws.model.soap.SOAPBindingImpl;
    45 import com.sun.xml.internal.ws.resources.ModelerMessages;
    45 import com.sun.xml.internal.ws.resources.ModelerMessages;
    46 import com.sun.xml.internal.ws.resources.ServerMessages;
    46 import com.sun.xml.internal.ws.resources.ServerMessages;
    47 import com.sun.xml.internal.ws.spi.db.BindingContext;
    47 import com.sun.xml.internal.ws.spi.db.BindingContext;
    48 import com.sun.xml.internal.ws.spi.db.BindingHelper;
       
    49 import com.sun.xml.internal.ws.spi.db.TypeInfo;
    48 import com.sun.xml.internal.ws.spi.db.TypeInfo;
    50 import com.sun.xml.internal.ws.spi.db.WrapperComposite;
    49 import com.sun.xml.internal.ws.spi.db.WrapperComposite;
    51 
    50 
    52 import static com.sun.xml.internal.ws.binding.WebServiceFeatureList.getSoapVersion;
    51 import static com.sun.xml.internal.ws.binding.WebServiceFeatureList.getSoapVersion;
    53 
    52 
   884 
   883 
   885             boolean isHolder = HOLDER_CLASS.isAssignableFrom(clazzType);
   884             boolean isHolder = HOLDER_CLASS.isAssignableFrom(clazzType);
   886             //set the actual type argument of Holder in the TypeReference
   885             //set the actual type argument of Holder in the TypeReference
   887             if (isHolder) {
   886             if (isHolder) {
   888                 if(clazzType==Holder.class){
   887                 if(clazzType==Holder.class){
   889                     clazzType = BindingHelper.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
   888                     clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
   890                 }
   889                 }
   891             }
   890             }
   892             Mode paramMode = isHolder ? Mode.INOUT : Mode.IN;
   891             Mode paramMode = isHolder ? Mode.INOUT : Mode.IN;
   893             WebParam webParam = null;
   892             WebParam webParam = null;
   894             xmlElem = null;
   893             xmlElem = null;
  1099 
  1098 
  1100             boolean isHolder = HOLDER_CLASS.isAssignableFrom(clazzType);
  1099             boolean isHolder = HOLDER_CLASS.isAssignableFrom(clazzType);
  1101             //set the actual type argument of Holder in the TypeReference
  1100             //set the actual type argument of Holder in the TypeReference
  1102             if (isHolder) {
  1101             if (isHolder) {
  1103                 if (clazzType==Holder.class)
  1102                 if (clazzType==Holder.class)
  1104                     clazzType = BindingHelper.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
  1103                     clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
  1105             }
  1104             }
  1106             Mode paramMode = isHolder ? Mode.INOUT : Mode.IN;
  1105             Mode paramMode = isHolder ? Mode.INOUT : Mode.IN;
  1107             for (Annotation annotation : pannotations[pos]) {
  1106             for (Annotation annotation : pannotations[pos]) {
  1108                 if (annotation.annotationType() == javax.jws.WebParam.class) {
  1107                 if (annotation.annotationType() == javax.jws.WebParam.class) {
  1109                     javax.jws.WebParam webParam = (javax.jws.WebParam) annotation;
  1108                     javax.jws.WebParam webParam = (javax.jws.WebParam) annotation;
  1345 
  1344 
  1346             boolean isHolder = HOLDER_CLASS.isAssignableFrom(clazzType);
  1345             boolean isHolder = HOLDER_CLASS.isAssignableFrom(clazzType);
  1347             //set the actual type argument of Holder in the TypeReference
  1346             //set the actual type argument of Holder in the TypeReference
  1348             if (isHolder) {
  1347             if (isHolder) {
  1349                 if (clazzType==Holder.class)
  1348                 if (clazzType==Holder.class)
  1350                     clazzType = BindingHelper.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
  1349                     clazzType = (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)genericParameterTypes[pos]).getActualTypeArguments()[0]);
  1351             }
  1350             }
  1352 
  1351 
  1353             Mode paramMode = isHolder ? Mode.INOUT : Mode.IN;
  1352             Mode paramMode = isHolder ? Mode.INOUT : Mode.IN;
  1354             for (Annotation annotation : pannotations[pos]) {
  1353             for (Annotation annotation : pannotations[pos]) {
  1355                 if (annotation.annotationType() == javax.jws.WebParam.class) {
  1354                 if (annotation.annotationType() == javax.jws.WebParam.class) {
  1433     }
  1432     }
  1434 
  1433 
  1435     private Class getAsyncReturnType(Method method, Class returnType) {
  1434     private Class getAsyncReturnType(Method method, Class returnType) {
  1436         if(Response.class.isAssignableFrom(returnType)){
  1435         if(Response.class.isAssignableFrom(returnType)){
  1437             Type ret = method.getGenericReturnType();
  1436             Type ret = method.getGenericReturnType();
  1438             return BindingHelper.erasure(((ParameterizedType)ret).getActualTypeArguments()[0]);
  1437             return (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)ret).getActualTypeArguments()[0]);
  1439         }else{
  1438         }else{
  1440             Type[] types = method.getGenericParameterTypes();
  1439             Type[] types = method.getGenericParameterTypes();
  1441             Class[] params = method.getParameterTypes();
  1440             Class[] params = method.getParameterTypes();
  1442             int i = 0;
  1441             int i = 0;
  1443             for(Class cls : params){
  1442             for(Class cls : params){
  1444                 if(AsyncHandler.class.isAssignableFrom(cls)){
  1443                 if(AsyncHandler.class.isAssignableFrom(cls)){
  1445                     return BindingHelper.erasure(((ParameterizedType)types[i]).getActualTypeArguments()[0]);
  1444                     return (Class) Utils.REFLECTION_NAVIGATOR.erasure(((ParameterizedType)types[i]).getActualTypeArguments()[0]);
  1446                 }
  1445                 }
  1447                 i++;
  1446                 i++;
  1448             }
  1447             }
  1449         }
  1448         }
  1450         return returnType;
  1449         return returnType;