1
2
3
4
5
6
7
8 package it.imolinfo.jbi4corba.jbi.wsdl;
9
10 import it.imolinfo.jbi4corba.Logger;
11 import it.imolinfo.jbi4corba.LoggerFactory;
12
13 import javax.wsdl.extensions.ExtensionRegistry;
14 import javax.xml.namespace.QName;
15
16
17
18
19
20
21 public class Jbi4CorbaExtension {
22
23
24
25
26 public static final String NS_URI_JBI4CORBA = "uri://schemas.imola.it/jbi/wsdl-extensions/corba/";
27
28
29
30 public static final String DEFAULT_PREFIX = "imolacorba";
31
32
33
34 public static final String BINDING_ELEMENT = "binding";
35
36
37
38 public static final String ADDRESS_ELEMENT = "address";
39
40
41
42 public static final String LOCALIZATION_TYPE_ATTRIBUTE = "localizationType";
43
44
45
46 public static final String PERSISTENT_ATTRIBUTE = "persistent";
47
48
49
50 public static final String ORB_ELEMENT = "orb";
51
52
53
54 public static final String PROPERTY_ELEMENT = "property";
55
56
57
58 public static final String NAME_ATTRIBUTE = "name";
59
60
61
62 public static final String VALUE_ATTRIBUTE = "value";
63
64
65
66
67 public static final String IDL_ENTRY = "idl";
68 public static final String FILENAME = "filename";
69 public static final String RELATIVE_PATH = "relativepath";
70 public static final String ROOT = "root";
71 public static final String DEFAULT_FILENAME = "root.idl";
72 public static final String DEFAULT_RELATIVE_PATH = ".";
73 public static final boolean DEFAULT_ROOT = true;
74 public static final QName Q_ELEM_JBI4CORBA_BINDING = new QName(
75 NS_URI_JBI4CORBA, BINDING_ELEMENT);
76 public static final QName Q_ELEM_JBI4CORBA_ADDRESS = new QName(
77 NS_URI_JBI4CORBA, ADDRESS_ELEMENT);
78 public static final QName Q_ELEM_JBI4CORBA_IDLENTRY = new QName(
79 NS_URI_JBI4CORBA, IDL_ENTRY);
80 public static final QName Q_ELEM_JBI4CORBA_ORB = new QName(
81 NS_URI_JBI4CORBA, ORB_ELEMENT);
82
83
84
85 private static final transient Logger LOG = LoggerFactory.getLogger(Jbi4CorbaExtension.class);
86
87
88
89
90
91 public Jbi4CorbaExtension() {
92 }
93
94
95
96
97
98
99
100 public static void register(ExtensionRegistry registry) {
101
102 LOG.debug("Start ExtensionRegistry registration");
103
104
105 registry.mapExtensionTypes(javax.wsdl.Port.class,
106 Q_ELEM_JBI4CORBA_ADDRESS, Jbi4CorbaAddress.class);
107
108 registry.registerDeserializer(javax.wsdl.Port.class,
109 Q_ELEM_JBI4CORBA_ADDRESS, new Jbi4CorbaAddressDeserializer());
110
111 registry.registerSerializer(javax.wsdl.Port.class,
112 Q_ELEM_JBI4CORBA_ADDRESS, new Jbi4CorbaAddressSerializer());
113
114
115 registry.mapExtensionTypes(javax.wsdl.Binding.class,
116 Q_ELEM_JBI4CORBA_BINDING, Jbi4CorbaBinding.class);
117
118 registry.registerDeserializer(javax.wsdl.Binding.class,
119 Q_ELEM_JBI4CORBA_BINDING, new Jbi4CorbaBindingDeserializer());
120
121 registry.registerSerializer(javax.wsdl.Binding.class,
122 Q_ELEM_JBI4CORBA_BINDING, new Jbi4CorbaBindingSerializer());
123
124 }
125
126 public static void overrideAddressDeserializer(ExtensionRegistry registry,
127 Jbi4CorbaAddressDeserializer addressDeserializer) {
128 registry.registerDeserializer(javax.wsdl.Port.class,
129 Q_ELEM_JBI4CORBA_ADDRESS, addressDeserializer);
130
131 }
132 }