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 Dominik Gallus <Ga...@fzi.de> on 2004/02/27 12:44:27 UTC

Configurable autoTyping ?

Hello all,

I'm stuck with trying to make autoTyping configurable 
on API level. While it seems to work well when the
'doAutoTypes' boolean in org.apache.axis.encoding.TypeMappingImpl
is set to 'true' in a static way, I can't seem to get the dynamical
approach to work 
(basically involving setting the variable in client code as follows)
	
	at_test.MIClient.java
	---------------------
	...
	DefaultTypeMappingImpl dtm_i = 
	(DefaultTypeMappingImpl)DefaultTypeMappingImpl.getSingleton();
	dtm_i.updateSingleton(true);
	...

	org.apache.axis.encoding.DefaultTypeMappingImpl.java (v1.75)
	----------------------------------------------------
	...
	public void updateSingleton(boolean autoTypes) {
		super.setDoAutoTypes(autoTypes);

	}
	...

	org.apache.axis.encoding.TypeMappingImpl.java (v1.48)
	---------------------------------------------
	...	
	protected static boolean doAutoTypes=false;
	...
	public static void setDoAutoTypes(boolean autoTypes) {
    		doAutoTypes=autoTypes;    	
    	}


Serialization seems to work, but objects won't get deserialized.
I assume the reason is two TypeMappingImpl objects must be used,
(server+ client), but the server code is not touched ... 
Is there a way to make de-serialization work from client side only ?

regards, Daomeng