01: /*
02: * Copyright (C) The MX4J Contributors.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the MX4J License version 1.0.
06: * See the terms of the MX4J License in the documentation provided with this software.
07: */
08:
09: package mx4j.tools.remote.soap.axis.ser;
10:
11: import javax.management.MalformedObjectNameException;
12: import javax.management.ObjectName;
13:
14: import org.xml.sax.SAXException;
15:
16: /**
17: * @version $Revision: 1.5 $
18: */
19: public class ObjectNameDeser extends AxisDeserializer {
20: private String canonicalName;
21:
22: public void onSetChildValue(Object value, Object hint)
23: throws SAXException {
24: if (ObjectNameSer.NAME.equals(hint))
25: canonicalName = (String) value;
26: }
27:
28: protected Object createObject() throws SAXException {
29: try {
30: return new ObjectName(canonicalName);
31: } catch (MalformedObjectNameException x) {
32: throw new SAXException(x);
33: }
34: }
35: }
|