axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Martin (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-1664) Allow doAutoTypes to be configured through AxisProperties
Date Mon, 06 Dec 2004 13:56:27 GMT
     [ http://nagoya.apache.org/jira/browse/AXIS-1664?page=comments#action_56260 ]
     
Patrick Martin commented on AXIS-1664:
--------------------------------------

Update:

Note that the only problems are related to deserialising the return at the client.
Note that input types to the Web Service are handled automatically.

Knowing this, this can be fixed more simply via something like 

        Class retClass = method.getReturnType();
        // need to handle only base component type
        if (retClass.isArray())
             retClass = retClass.getComponentType();
        // AAACK test for standard types
        // FIXME does not walk fields of Class to register those
        if ( (void.class != retClass) && (int.class != retClass) )
        {
            
            QName qnameRet = new QName(Namespaces.makeNamespace(retClass
                    .getName()), Types.getLocalNameFromFullName(retClass
                            .getName()));
            if (!tm.isRegistered(method.getReturnType(), qnameRet))
            {
                tm.register(SimpleBean.class, qnameRet, new BeanSerializerFactory(
                        SimpleBean.class, qnameRet), new BeanDeserializerFactory(
                                retClass, qnameRet));
            }
        }


However I suspect there might be a simple fix lurking in the AXIS code.

There is a post that is perhaps on this matter?

http://marc.theaimsgroup.com/?l=axis-user&m=103367809228985&w=2

However it mentions the "lines in red" as the changes they made to.Bit hard to see in white
on black .

> Allow doAutoTypes to be configured through AxisProperties
> ---------------------------------------------------------
>
>          Key: AXIS-1664
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1664
>      Project: Axis
>         Type: Improvement
>   Components: Serialization/Deserialization
>     Versions: current (nightly)
>     Reporter: Mark Chai
>  Attachments: AXIS Tests.zip, AutoTypesTest.jws, TypeMappingImpl.java
>
> I suggest a patch that allows for an "axis.doAutoTypes" in the AxisProperties to dictate
whether or not to turn doAutoTypes on or off by default. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message