Please excuse this message if it is too obvious, as I am a relative newbie to Axis.

I am trying to leverage the built-in xml to object unmarshalling within a running web-service in Axis. From what I can gather, the best way would be to create a DeserializationContext, and use the already defined TypeMappings of the current service. Now I can get the service's typemappingregistry, but it is always empty. Is there a better way to do this? Here is the code I have been playing with to get at the mapping:

       MessageContext context = MessageContext.getCurrentContext();
       AxisEngine engine = context.getAxisEngine();
       MessageContext msgContext = new MessageContext(engine);

       SOAPService service = engine.getService("MathService");
       TypeMappingRegistry tmr = engine.getTypeMappingRegistry();

msgContext.setTypeMappingRegistry(tmr);
String[] resu = tmr.getRegisteredEncodingStyleURIs();
System.out.println("RegisteredEncodingStyleURI count: " + resu.length);
for (int i = 0; i < resu.length; i++) {
System.out.println("RegisteredEncodingStyleURI: " + resu[i]);
}


This always returns a count of 0, regardless of where I get the TypeMappingRegistry.

Any help would be appreciated.



Reply via email to