@@ -27,12 +27,19 @@ HPCC SYSTEMS software Copyright (C) 2021 HPCC Systems®.
27
27
import org .apache .logging .log4j .Logger ;
28
28
import org .hpccsystems .ws .client .gen .axis2 .wsresources .latest .ArrayOfEspException ;
29
29
import org .hpccsystems .ws .client .gen .axis2 .wsresources .latest .ServiceQueryResponse ;
30
+ import org .hpccsystems .ws .client .gen .axis2 .wsresources .latest .TargetQueryResponse ;
30
31
import org .hpccsystems .ws .client .gen .axis2 .wsresources .latest .WsResourcesPingRequest ;
31
32
import org .hpccsystems .ws .client .gen .axis2 .wsresources .latest .WsResourcesStub ;
33
+ import org .hpccsystems .ws .client .gen .axis2 .wsresources .latest .WebLinksQueryResponse ;
32
34
import org .hpccsystems .ws .client .utils .Connection ;
33
35
import org .hpccsystems .ws .client .wrappers .ArrayOfEspExceptionWrapper ;
34
36
import org .hpccsystems .ws .client .wrappers .gen .wsresources .ServiceQueryRequestWrapper ;
35
37
import org .hpccsystems .ws .client .wrappers .gen .wsresources .ServiceQueryResponseWrapper ;
38
+ import org .hpccsystems .ws .client .wrappers .gen .wsresources .TargetQueryRequestWrapper ;
39
+ import org .hpccsystems .ws .client .wrappers .gen .wsresources .TargetQueryResponseWrapper ;
40
+ import org .hpccsystems .ws .client .wrappers .gen .wsresources .WebLinksQueryRequestWrapper ;
41
+ import org .hpccsystems .ws .client .wrappers .gen .wsresources .WebLinksQueryResponseWrapper ;
42
+
36
43
37
44
/**
38
45
* Facilitates discovery of containerized HPCC Systems resources.
@@ -48,7 +55,7 @@ public class HPCCWsResourcesClient extends BaseHPCCWsClient
48
55
49
56
/**
50
57
* Load WSDLURL.
51
- */
58
+ */
52
59
private static void loadWSDLURL ()
53
60
{
54
61
try
@@ -67,7 +74,7 @@ private static void loadWSDLURL()
67
74
* Gets the service URI.
68
75
*
69
76
* @return the service URI
70
- */
77
+ */
71
78
public String getServiceURI ()
72
79
{
73
80
return WSRESOURCESURI ;
@@ -116,10 +123,10 @@ public Stub getDefaultStub() throws AxisFault
116
123
}
117
124
118
125
/**
119
- * Gets the.
126
+ * Gets the Ws Resources client
120
127
*
121
128
* @param connection
122
- * the connection
129
+ * the connection
123
130
* @return the HPCC HPCCWsResources client
124
131
*/
125
132
public static HPCCWsResourcesClient get (Connection connection )
@@ -128,7 +135,7 @@ public static HPCCWsResourcesClient get(Connection connection)
128
135
}
129
136
130
137
/**
131
- * Gets the.
138
+ * Gets the Ws Resources client
132
139
*
133
140
* @param protocol
134
141
* the protocol
@@ -150,7 +157,7 @@ public static HPCCWsResourcesClient get(String protocol, String targetHost, Stri
150
157
}
151
158
152
159
/**
153
- * Gets the.
160
+ * Gets the Ws Resources client
154
161
*
155
162
* @param protocol
156
163
* the protocol
@@ -188,7 +195,8 @@ protected HPCCWsResourcesClient(Connection baseConnection)
188
195
}
189
196
190
197
/**
191
- * Initializes the service's underlying stub Should only be used by constructors.
198
+ * Initializes the service's underlying stub Should only be used by
199
+ * constructors.
192
200
*
193
201
* @param conn
194
202
* -- All connection settings included
@@ -219,14 +227,19 @@ protected void initWsResourcesClientStub(Connection conn)
219
227
/**
220
228
* Submit service query request
221
229
*
222
- * @param req a {@link org.hpccsystems.ws.client.wrappers.gen.wsresources.ServiceQueryRequestWrapper} object.
230
+ * @param req a
231
+ * {@link org.hpccsystems.ws.client.wrappers.gen.wsresources.ServiceQueryRequestWrapper}
232
+ * object.
223
233
* @throws Exception a {@link java.lang.Exception} object.
224
- * @return a {@link org.hpccsystems.ws.client.wrappers.gen.wsresources.ServiceQueryResponseWrapper} object.
234
+ * @return a
235
+ * {@link org.hpccsystems.ws.client.wrappers.gen.wsresources.ServiceQueryResponseWrapper}
236
+ * object.
225
237
*/
226
238
public ServiceQueryResponseWrapper serviceQuery (ServiceQueryRequestWrapper req ) throws Exception
227
239
{
228
240
if (req == null )
229
- throw new Exception ("" );
241
+ throw new Exception ("ServiceQueryRequestWrapper must be provided!" );
242
+
230
243
verifyStub ();
231
244
232
245
ServiceQueryResponse resp = null ;
@@ -249,6 +262,82 @@ public ServiceQueryResponseWrapper serviceQuery(ServiceQueryRequestWrapper req)
249
262
return new ServiceQueryResponseWrapper (resp );
250
263
}
251
264
265
+ /**
266
+ * Submit target query request
267
+ *
268
+ * @param req a
269
+ * {@link org.hpccsystems.ws.client.wrappers.gen.wsresources.TargetQueryRequestWrapper}
270
+ * object.
271
+ * @throws Exception a {@link java.lang.Exception} object.
272
+ * @return a
273
+ * {@link org.hpccsystems.ws.client.wrappers.gen.wsresources.TargetQueryResponseWrapper}
274
+ * object.
275
+ */
276
+ public TargetQueryResponseWrapper targetQuery (TargetQueryRequestWrapper req ) throws Exception
277
+ {
278
+ if (req == null )
279
+ throw new Exception ("TargetQueryRequestWrapper must be provided!" );
280
+
281
+ verifyStub ();
282
+
283
+ TargetQueryResponse resp = null ;
284
+
285
+ try
286
+ {
287
+ resp = ((WsResourcesStub ) stub ).targetQuery (req .getRaw ());
288
+ }
289
+ catch (RemoteException e )
290
+ {
291
+ throw new Exception ("HPCCWSRESOURCESClient.targetQuery(TargetQueryRequestWrapper) encountered RemoteException." , e );
292
+ }
293
+
294
+ if (resp .getExceptions () != null )
295
+ {
296
+ ArrayOfEspException exceptions = resp .getExceptions ();
297
+ handleEspExceptions (new ArrayOfEspExceptionWrapper (exceptions ), "Error processing service query" );
298
+ }
299
+
300
+ return new TargetQueryResponseWrapper (resp );
301
+ }
302
+
303
+ /**
304
+ * Submit WebLinks query request
305
+ *
306
+ * @param req a
307
+ * {@link org.hpccsystems.ws.client.wrappers.gen.wsresources.WebLinksQueryRequestWrapper}
308
+ * object.
309
+ * @throws Exception a {@link java.lang.Exception} object.
310
+ * @return a
311
+ * {@link org.hpccsystems.ws.client.wrappers.gen.wsresources.WebLinksQueryResponseWrapper}
312
+ * object.
313
+ */
314
+ public WebLinksQueryResponseWrapper webLinks (WebLinksQueryRequestWrapper req ) throws Exception
315
+ {
316
+ if (req == null )
317
+ throw new Exception ("WebLinksQueryRequestWrapper must be provided!" );
318
+
319
+ verifyStub ();
320
+
321
+ WebLinksQueryResponse resp = null ;
322
+
323
+ try
324
+ {
325
+ resp = ((WsResourcesStub ) stub ).webLinksQuery (req .getRaw ());
326
+ }
327
+ catch (RemoteException e )
328
+ {
329
+ throw new Exception ("HPCCWSRESOURCESClient.webLinksQuery(WebLinksQueryRequestWrapper) encountered RemoteException." , e );
330
+ }
331
+
332
+ if (resp .getExceptions () != null )
333
+ {
334
+ ArrayOfEspException exceptions = resp .getExceptions ();
335
+ handleEspExceptions (new ArrayOfEspExceptionWrapper (exceptions ), "Error processing service query" );
336
+ }
337
+
338
+ return new WebLinksQueryResponseWrapper (resp );
339
+ }
340
+
252
341
/**
253
342
* Ping.
254
343
*
0 commit comments