1
2
3
4
5
6
7
8
9
10 package it.imolinfo.jbi4cics.jbi.wsdl;
11
12 import it.imolinfo.jbi4cics.Logger;
13 import it.imolinfo.jbi4cics.LoggerFactory;
14 import javax.wsdl.Binding;
15 import javax.wsdl.Port;
16 import javax.wsdl.extensions.ExtensionRegistry;
17 import javax.xml.namespace.QName;
18
19
20
21
22
23
24
25
26 public final class Jbi4CicsExtension {
27
28
29
30
31 public static final String NS_URI_JBI4CICS
32 = "uri://schemas.imola.it/jbi/wsdl-extensions/cics/";
33
34 public static final String DEFAULT_PREFIX = "imolacics";
35 public static final String BINDING_ELEMENT = "binding";
36 public static final String ADDRESS_ELEMENT = "address";
37 public static final String COPY_COBOL_ELEMENT = "copyCobol";
38 public static final String OUTPUT_COPY_COBOL_ELEMENT = "outputCopyCobol";
39 public static final String SERVICE_PACKAGE_NAME_ATTRIBUTE = "servicePackageName";
40 public static final String CODE_PAGE_NAME_ATTRIBUTE = "codePage";
41 public static final String SAME_COPY_COBOL_ATTRIBUTE = "sameCopyCobol";
42 public static final String USERNAME_ATTRIBUTE = "username";
43 public static final String PASSWORD_ATTRIBUTE = "password";
44 public static final String CONNECTION_TYPE_ATTRIBUTE = "connectionType";
45 public static final String JNDI_CONNECTION_NAME_ATTRIBUTE = "JNDIConnectionName";
46 public static final String PROGRAM_NAME_ATTRIBUTE = "programName";
47 public static final String TRANSACTION_NAME_ATTRIBUTE = "transactionName";
48 public static final String TPN_ATTRIBUTE = "tpn";
49
50
51
52
53 public static final QName Q_ELEM_JBI4CICS_BINDING
54 = new QName(NS_URI_JBI4CICS, BINDING_ELEMENT);
55
56
57
58
59 public static final QName Q_ELEM_JBI4CICS_ADDRESS
60 = new QName(NS_URI_JBI4CICS, ADDRESS_ELEMENT);
61
62
63
64
65
66 public static final QName Q_ELEM_JBI4CICS_COPY_COBOL
67 = new QName(NS_URI_JBI4CICS, COPY_COBOL_ELEMENT);
68
69
70
71
72 public static final QName Q_ELEM_JBI4CICS_OUTPUT_COPY_COBOL
73 = new QName(NS_URI_JBI4CICS, OUTPUT_COPY_COBOL_ELEMENT);
74
75
76
77
78 private static final Logger LOG
79 = LoggerFactory.getLogger(Jbi4CicsExtension.class);
80
81
82
83
84
85 private Jbi4CicsExtension() {
86 }
87
88
89
90
91
92
93
94 public static void register(ExtensionRegistry registry) {
95 LOG.debug("Start ExtensionRegistry registration");
96
97
98 registry.mapExtensionTypes(
99 Port.class, Q_ELEM_JBI4CICS_ADDRESS, Jbi4CicsAddress.class);
100 registry.registerDeserializer(Port.class, Q_ELEM_JBI4CICS_ADDRESS,
101 new Jbi4CicsAddressDeserializer());
102 registry.registerSerializer(Port.class, Q_ELEM_JBI4CICS_ADDRESS,
103 new Jbi4CicsAddressSerializer());
104
105
106 registry.mapExtensionTypes(Binding.class,
107 Q_ELEM_JBI4CICS_BINDING, Jbi4CicsBinding.class);
108 registry.registerDeserializer(Binding.class,
109 Q_ELEM_JBI4CICS_BINDING, new Jbi4CicsBindingDeserializer());
110 registry.registerSerializer(Binding.class,
111 Q_ELEM_JBI4CICS_BINDING, new Jbi4CicsBindingSerializer());
112 }
113 }