1
2
3
4
5
6
7
8 package it.imolinfo.jbi4cics.jbi.wsdl;
9
10 import javax.wsdl.Definition;
11 import javax.wsdl.WSDLException;
12 import javax.wsdl.extensions.ExtensibilityElement;
13 import javax.wsdl.extensions.ExtensionDeserializer;
14 import javax.wsdl.extensions.ExtensionRegistry;
15 import javax.xml.namespace.QName;
16
17
18 import org.w3c.dom.Element;
19
20 import com.ibm.wsdl.util.xml.DOMUtils;
21
22
23
24
25
26
27
28 public class Jbi4CicsAddressDeserializer implements ExtensionDeserializer {
29
30
31
32
33 public Jbi4CicsAddressDeserializer(){
34 super();
35 }
36
37
38
39
40
41
42
43
44 public ExtensibilityElement unmarshall(Class parentType, QName elementType,
45 Element el, Definition def, ExtensionRegistry extReg)
46 throws WSDLException {
47
48 Jbi4CicsAddress jbi4CicsAddress = (Jbi4CicsAddress) extReg
49 .createExtension(parentType, elementType);
50
51 jbi4CicsAddress.setUsername(DOMUtils.getAttribute(el,
52 Jbi4CicsExtension.USERNAME_ATTRIBUTE));
53
54 jbi4CicsAddress.setPassword(DOMUtils.getAttribute(el,
55 Jbi4CicsExtension.PASSWORD_ATTRIBUTE));
56
57 jbi4CicsAddress.setConnectionType(DOMUtils.getAttribute(el,
58 Jbi4CicsExtension.CONNECTION_TYPE_ATTRIBUTE));
59
60 jbi4CicsAddress.setJNDIConnectionName(DOMUtils.getAttribute(el,
61 Jbi4CicsExtension.JNDI_CONNECTION_NAME_ATTRIBUTE));
62
63 jbi4CicsAddress.setProgramName(DOMUtils.getAttribute(el,
64 Jbi4CicsExtension.PROGRAM_NAME_ATTRIBUTE));
65
66 jbi4CicsAddress.setTransactionName(DOMUtils.getAttribute(el,
67 Jbi4CicsExtension.TRANSACTION_NAME_ATTRIBUTE));
68
69 jbi4CicsAddress.setTpn(Boolean.valueOf(DOMUtils.getAttribute(el,
70 Jbi4CicsExtension.TPN_ATTRIBUTE)));
71
72 return jbi4CicsAddress;
73 }
74
75 }