You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Mark Chaimungkalanont <ma...@atlassian.com> on 2004/11/11 06:46:24 UTC
doAutoTypes - best way to set this property?
Hi there,
I have a situation where I'm programatically creating a WebService.
I ran across the same problem as Enrico (in the thread below) in that I
couldn't find an "elegant" way to register Bean (de)Serializers for my
complex objects.
http://marc.theaimsgroup.com/?l=axis-user&m=108444847331320&w=2
After searching some more through the archives I found mentions of the
"doAutoTypes" flag hidden in the TypeMappingImpl class. This seems to do
exactly what I want, defaulting to the bean serializer when none can be
found.
I couldn't get it work, however, outside copying the source and using
"custom" version of TypeMappingImpl in my source tree that defaults the
auto typing to true.
This is really not desirable so I was wondering if there was any other
way to do this? I think this is the same problem as
http://marc.theaimsgroup.com/?l=axis-user&m=107788227613566&w=2 from
about 9 months ago, but maybe something has happened since?
If there is not a way, I'd be happy to submit a patch that optionally
reads the doAutoTypes from the AxisProperties when TypeMappingImpl is
instantiated.
Any thoughts anyone? Anyone used auto typing successfully? Seems curious
that such a feature would be so well hidden from view...
cheers
Mark C
-------------------------------------
ATLASSIAN - http://www.atlassian.com/
Confluence - the professional J2EE wiki - tried it yet?
http://www.atlassian.com/confluence/
FW: doAutoTypes - best way to set this property?
Posted by Mark Chaimungkalanont <ma...@atlassian.com>.
Hi there,
Does anyone on the dev list have any thoughts about making doAutoTypes
"configurable" through the AxisProperties? This is a bit of a hack but
it seems like this feature has been around for a while without any easy
way to turn it on?
Just something like
/**
* Construct TypeMapping
*/
public TypeMappingImpl(TypeMapping delegate)
{
qName2Pair = new HashMap();
class2Pair = new HashMap();
pair2SF = new HashMap();
pair2DF = new HashMap();
this.delegate = delegate;
namespaces = new ArrayList();
if(Boolean.TRUE.toString().equals(AxisProperties.getProperty(DO_AUTO_TYPES_FLAG)))
{
doAutoTypes = true;
}
}
cheers
Mark Chaimungkalanont wrote:
> Hi there,
>
> I have a situation where I'm programatically creating a WebService.
>
> I ran across the same problem as Enrico (in the thread below) in that
> I couldn't find an "elegant" way to register Bean (de)Serializers for
> my complex objects.
>
> http://marc.theaimsgroup.com/?l=axis-user&m=108444847331320&w=2
>
> After searching some more through the archives I found mentions of the
> "doAutoTypes" flag hidden in the TypeMappingImpl class. This seems to
> do exactly what I want, defaulting to the bean serializer when none
> can be found.
>
> I couldn't get it work, however, outside copying the source and using
> "custom" version of TypeMappingImpl in my source tree that defaults
> the auto typing to true.
>
> This is really not desirable so I was wondering if there was any other
> way to do this? I think this is the same problem as
> http://marc.theaimsgroup.com/?l=axis-user&m=107788227613566&w=2 from
> about 9 months ago, but maybe something has happened since?
>
> If there is not a way, I'd be happy to submit a patch that optionally
> reads the doAutoTypes from the AxisProperties when TypeMappingImpl is
> instantiated.
>
> Any thoughts anyone? Anyone used auto typing successfully? Seems
> curious that such a feature would be so well hidden from view...
>
> cheers
>
> Mark C
>
> -------------------------------------
> ATLASSIAN - http://www.atlassian.com/
> Confluence - the professional J2EE wiki - tried it yet?
> http://www.atlassian.com/confluence/
>
--
-------------------------------------
ATLASSIAN - http://www.atlassian.com/
Confluence - the professional J2EE wiki - tried it yet?
http://www.atlassian.com/confluence/