axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 21973] - BeanSerializer generates invalid WSDL for interfaces
Date Fri, 20 Feb 2004 16:19:03 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21973>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21973

BeanSerializer generates invalid WSDL for interfaces





------- Additional Comments From jmilgram@msn.com  2004-02-20 16:19 -------
Here are some additional modifications to deal with an interface that extends 
another interface.  Each superinterface is mapped as a supertype, equivalent to 
what happens when a concrete class is mapped with super classes.

BeanDeserializerFactory.getProperties (add just before return):
            // JM BEGIN Mod to teach Axis to look at super i/f's
            if (javaType.isInterface())
            {
            	Class currInterface = javaType;
            	for (;;)
            	{	
            		Class[] interfaceArr = currInterface.getInterfaces();
            		if (interfaceArr == null || interfaceArr.length == 0)
            			break;
            		currInterface = interfaceArr[0];
            		pd = BeanUtils.getPd(currInterface, null);
            		for (int i = 0; i < pd.length; i++) {
            			BeanPropertyDescriptor descriptor = pd[i];
            			propertyMap.put(descriptor.getName(), 
descriptor);
            		}
            	}
            }
            // JM END Mod

BeanSerializer.writeSchema:
        Class superClass = javaType.getSuperclass();
        // JM BEGIN Mod: If no superclass, see if CRD i/f.  If that has
        // a super i/f, map that (it can only have 1).
        if (superClass == null && isInterfaceWithImpl(javaType))
        {
        	Class[] interfaceArr = javaType.getInterfaces();
        	if (interfaceArr != null && interfaceArr.length > 0)
        	{
        		superClass = interfaceArr[0];
        	}
        }
        // JM END Mod

Types.isBeanCompatible:
        if (!java.lang.Throwable.class.isAssignableFrom(javaType) &&
        		// JM BEGIN Skip this check if it is an i/f (for 
supertypes)
        		! javaType.isInterface()) {
        		// JM END
        	try {
                javaType.getConstructor(new Class[] {});
            } catch (java.lang.NoSuchMethodException e) {

Mime
View raw message