WSDLBindingOperation.java
4.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.xfa.wsdl;
import com.adobe.xfa.Element;
import com.adobe.xfa.ut.StringUtils;
import com.adobe.xfa.wsdl.WSDLDocument;
import com.adobe.xfa.wsdl.WSDLExten;
import com.adobe.xfa.wsdl.WSDLNode;
import com.adobe.xfa.wsdl.WSDLOperation;
public class WSDLBindingOperation
extends WSDLNode {
public static final int SOAP_STYLE_RPC = 0;
public static final int SOAP_STYLE_DOC = 1;
public static final int SOAP_USE_ENCODED = 0;
public static final int SOAP_USE_LITERAL = 1;
private WSDLOperation mpOperation;
private WSDLExten moSoapOperation;
private WSDLExten moSoapBinding;
private WSDLExten moInputSoapBody;
private WSDLExten moOutputSoapBody;
public WSDLBindingOperation(WSDLDocument poDocument, Element oSrc) {
super(poDocument, oSrc, 9);
}
public WSDLOperation getOperation() {
return this.mpOperation;
}
void setOperation(WSDLOperation operation) {
this.mpOperation = operation;
}
public WSDLExten getSoapOperation() {
if (this.moSoapOperation == null) {
this.moSoapOperation = this.findChildByExtenType(3);
}
return this.moSoapOperation;
}
public WSDLExten getSoapBinding() {
if (this.moSoapBinding == null) {
this.moSoapBinding = WSDLBindingOperation.findChildByExtenType(this.getWSDLParentNode(), 2);
}
return this.moSoapBinding;
}
public SoapStyle getSoapStyle() {
WSDLExten soapBinding;
int outStyle = 1;
int outInputUse = 1;
int outOutputUse = 1;
String sStyle = null;
WSDLExten soapOperation = this.getSoapOperation();
if (soapOperation != null) {
sStyle = soapOperation.getExtenAttribute(0);
}
if (StringUtils.isEmpty(sStyle) && (soapBinding = this.getSoapBinding()) != null) {
sStyle = soapBinding.getExtenAttribute(0);
}
if (sStyle == "rpc") {
outStyle = 0;
} else if (StringUtils.isEmpty(sStyle) || StringUtils.equalsWithNull(sStyle, "document")) {
outStyle = 1;
}
String sInputUse = null;
WSDLExten inputSoapBody = this.getInputSoapBody();
if (inputSoapBody != null) {
sInputUse = inputSoapBody.getExtenAttribute(5);
}
String sOutputUse = null;
WSDLExten outputSoapBody = this.getOutputSoapBody();
if (outputSoapBody != null) {
sOutputUse = outputSoapBody.getExtenAttribute(5);
}
if (sInputUse == "encoded") {
outInputUse = 0;
} else if (StringUtils.isEmpty(sInputUse) || StringUtils.equalsWithNull(sInputUse, "literal")) {
outInputUse = 1;
}
if (sOutputUse == "encoded") {
outOutputUse = 0;
} else if (StringUtils.isEmpty(sOutputUse) || StringUtils.equalsWithNull(sOutputUse, "literal")) {
outOutputUse = 1;
}
return new SoapStyle(outStyle, outInputUse, outOutputUse);
}
public boolean usesHTTPTransport() {
String sTransport = null;
WSDLExten soapBinding = this.getSoapBinding();
if (soapBinding != null) {
sTransport = soapBinding.getExtenAttribute(1);
}
return sTransport == "http://schemas.xmlsoap.org/soap/http";
}
public WSDLExten getInputSoapBody() {
if (this.moInputSoapBody == null) {
this.moInputSoapBody = this.getSoapBody(11);
}
return this.moInputSoapBody;
}
public WSDLExten getOutputSoapBody() {
if (this.moOutputSoapBody == null) {
this.moOutputSoapBody = this.getSoapBody(12);
}
return this.moOutputSoapBody;
}
private WSDLExten getSoapBody(int inNodeType) {
WSDLNode childNode = this.getFirstWSDLNode(inNodeType);
if (childNode == null) {
return null;
}
return WSDLBindingOperation.findChildByExtenType(childNode, 4);
}
private final WSDLExten findChildByExtenType(int type) {
return WSDLBindingOperation.findChildByExtenType(this, type);
}
private static final WSDLExten findChildByExtenType(WSDLNode parent, int type) {
for (WSDLNode node = parent.getFirstWSDLNode((int)15); node != null; node = node.getNextWSDLNode((int)15)) {
WSDLExten exten;
if (!(node instanceof WSDLExten) || (exten = (WSDLExten)node).getExtenType() != type) continue;
return exten;
}
return null;
}
public static final class SoapStyle {
public final int mOutStyle;
public final int mOutInputUse;
public final int mOutOutputUse;
SoapStyle(int outStyle, int outInputUse, int outOutputUse) {
this.mOutStyle = outStyle;
this.mOutInputUse = outInputUse;
this.mOutOutputUse = outOutputUse;
}
}
}