1
2
3
4
5
6
7
8 package it.imolinfo.jbi4ejb.jbi.wsdl;
9
10 import it.imolinfo.jbi4ejb.Logger;
11 import it.imolinfo.jbi4ejb.LoggerFactory;
12
13 import javax.wsdl.Definition;
14 import javax.wsdl.WSDLException;
15 import javax.wsdl.extensions.ExtensibilityElement;
16 import javax.wsdl.extensions.ExtensionDeserializer;
17 import javax.wsdl.extensions.ExtensionRegistry;
18 import javax.xml.namespace.QName;
19
20 import org.w3c.dom.Element;
21
22 import com.ibm.wsdl.util.xml.DOMUtils;
23
24
25
26
27
28
29
30 public class Jbi4EjbAddressDeserializer implements ExtensionDeserializer {
31
32 private static final Logger LOG
33 = LoggerFactory.getLogger(Jbi4EjbAddressDeserializer.class);
34
35
36
37
38
39 public Jbi4EjbAddressDeserializer() {}
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59 @SuppressWarnings("unchecked")
60 public ExtensibilityElement unmarshall(Class parentType, QName elementType,
61 Element el, Definition def, ExtensionRegistry extReg)
62 throws WSDLException {
63
64 Jbi4EjbAddress jbi4EjbAddress = (Jbi4EjbAddress) extReg
65 .createExtension(parentType, elementType);
66
67 jbi4EjbAddress.setName(DOMUtils.getAttribute(el,
68 Jbi4EjbExtension.NAME_ATTRIBUTE));
69
70 jbi4EjbAddress.setLocalizationType(DOMUtils.getAttribute(el,
71 Jbi4EjbExtension.LOCALIZATION_TYPE_ATTRIBUTE));
72
73 LOG.debug("Loaded from address extension the name: " + jbi4EjbAddress.getName());
74
75 return jbi4EjbAddress;
76 }
77
78 }