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.extensions.ExtensionRegistry;
14 import javax.xml.namespace.QName;
15
16
17
18
19
20
21 public final class Jbi4EjbExtension {
22
23
24 public static final String NS_URI_JBI4EJB = "uri://schemas.imola.it/jbi/wsdl-extensions/ejb/";
25
26
27 public static final String DEFAULT_PREFIX = "imolaejb";
28
29
30 public static final String BINDING_ELEMENT = "binding";
31
32
33 public static final String ADDRESS_ELEMENT = "address";
34
35
36 public static final String TYPES_ELEMENT = "types";
37
38
39 public static final String SERIAL_VERSION_UID_ELEMENT = "serialVersionUID";
40
41
42 public static final String LOCALIZATION_TYPE_ATTRIBUTE = "localizationType";
43
44
45 public static final String ORB_ELEMENT = "orb";
46
47
48 public static final String JNDI_ELEMENT = "jndi";
49
50
51 public static final String PROPERTY_ELEMENT = "property";
52
53
54 public static final String NAME_ATTRIBUTE = "name";
55
56
57 public static final String VALUE_ATTRIBUTE = "value";
58
59
60 public static final String CLASSNAME_ATTRIBUTE = "className";
61
62
63 public static final String UID_ATTRIBUTE = "UID";
64
65
66
67 public static final QName Q_ELEM_JBI4EJB_BINDING = new QName(NS_URI_JBI4EJB,
68 BINDING_ELEMENT);
69
70
71 public static final QName Q_ELEM_JBI4EJB_ADDRESS = new QName(NS_URI_JBI4EJB,
72 ADDRESS_ELEMENT);
73
74
75 public static final QName Q_ELEM_JBI4EJB_TYPES = new QName(NS_URI_JBI4EJB,
76 TYPES_ELEMENT);
77
78
79 public static final QName Q_ELEM_JBI4EJB_ORB = new QName(NS_URI_JBI4EJB,
80 ORB_ELEMENT);
81
82
83 public static final QName Q_ELEM_JBI4EJB_JNDI = new QName(NS_URI_JBI4EJB,
84 JNDI_ELEMENT);
85
86
87 public static final QName Q_ELEM_JBI4EJB_SERIAL_VERSION_UID = new QName(NS_URI_JBI4EJB,
88 SERIAL_VERSION_UID_ELEMENT);
89
90
91
92 private static final Logger LOG
93 = LoggerFactory.getLogger(Jbi4EjbExtension.class);
94
95
96
97
98
99 private Jbi4EjbExtension() {}
100
101
102
103
104
105
106 public static void register(ExtensionRegistry registry) {
107
108 LOG.debug("Start ExtensionRegistry registration");
109
110
111 registry.mapExtensionTypes(
112 javax.wsdl.Port.class,
113 Q_ELEM_JBI4EJB_ADDRESS, Jbi4EjbAddress.class);
114
115 registry.registerDeserializer(
116 javax.wsdl.Port.class,
117 Q_ELEM_JBI4EJB_ADDRESS, new Jbi4EjbAddressDeserializer());
118
119 registry.registerSerializer(
120 javax.wsdl.Port.class,
121 Q_ELEM_JBI4EJB_ADDRESS, new Jbi4EjbAddressSerializer());
122
123
124 registry.mapExtensionTypes(javax.wsdl.Binding.class,
125 Q_ELEM_JBI4EJB_BINDING, Jbi4EjbBinding.class);
126
127 registry.registerDeserializer(javax.wsdl.Binding.class,
128 Q_ELEM_JBI4EJB_BINDING, new Jbi4EjbBindingDeserializer());
129
130 registry.registerSerializer(javax.wsdl.Binding.class,
131 Q_ELEM_JBI4EJB_BINDING, new Jbi4EjbBindingSerializer());
132
133
134 registry.mapExtensionTypes(javax.wsdl.Definition.class,
135 Q_ELEM_JBI4EJB_TYPES, Jbi4EjbTypes.class);
136
137 registry.registerDeserializer(javax.wsdl.Definition.class,
138 Q_ELEM_JBI4EJB_TYPES, new Jbi4EjbTypesDeserializer());
139
140 registry.registerSerializer(javax.wsdl.Definition.class,
141 Q_ELEM_JBI4EJB_TYPES, new Jbi4EjbTypesSerializer());
142 }
143 }