@@ -27,12 +27,19 @@ HPCC SYSTEMS software Copyright (C) 2021 HPCC Systems®.
2727import org .apache .logging .log4j .Logger ;
2828import org .hpccsystems .ws .client .gen .axis2 .wsresources .latest .ArrayOfEspException ;
2929import org .hpccsystems .ws .client .gen .axis2 .wsresources .latest .ServiceQueryResponse ;
30+ import org .hpccsystems .ws .client .gen .axis2 .wsresources .latest .TargetQueryResponse ;
3031import org .hpccsystems .ws .client .gen .axis2 .wsresources .latest .WsResourcesPingRequest ;
3132import org .hpccsystems .ws .client .gen .axis2 .wsresources .latest .WsResourcesStub ;
33+ import org .hpccsystems .ws .client .gen .axis2 .wsresources .latest .WebLinksQueryResponse ;
3234import org .hpccsystems .ws .client .utils .Connection ;
3335import org .hpccsystems .ws .client .wrappers .ArrayOfEspExceptionWrapper ;
3436import org .hpccsystems .ws .client .wrappers .gen .wsresources .ServiceQueryRequestWrapper ;
3537import 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+
3643
3744/**
3845 * Facilitates discovery of containerized HPCC Systems resources.
@@ -48,7 +55,7 @@ public class HPCCWsResourcesClient extends BaseHPCCWsClient
4855
4956 /**
5057 * Load WSDLURL.
51- */
58+ */
5259 private static void loadWSDLURL ()
5360 {
5461 try
@@ -67,7 +74,7 @@ private static void loadWSDLURL()
6774 * Gets the service URI.
6875 *
6976 * @return the service URI
70- */
77+ */
7178 public String getServiceURI ()
7279 {
7380 return WSRESOURCESURI ;
@@ -116,10 +123,10 @@ public Stub getDefaultStub() throws AxisFault
116123 }
117124
118125 /**
119- * Gets the.
126+ * Gets the Ws Resources client
120127 *
121128 * @param connection
122- * the connection
129+ * the connection
123130 * @return the HPCC HPCCWsResources client
124131 */
125132 public static HPCCWsResourcesClient get (Connection connection )
@@ -128,7 +135,7 @@ public static HPCCWsResourcesClient get(Connection connection)
128135 }
129136
130137 /**
131- * Gets the.
138+ * Gets the Ws Resources client
132139 *
133140 * @param protocol
134141 * the protocol
@@ -150,7 +157,7 @@ public static HPCCWsResourcesClient get(String protocol, String targetHost, Stri
150157 }
151158
152159 /**
153- * Gets the.
160+ * Gets the Ws Resources client
154161 *
155162 * @param protocol
156163 * the protocol
@@ -188,7 +195,8 @@ protected HPCCWsResourcesClient(Connection baseConnection)
188195 }
189196
190197 /**
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.
192200 *
193201 * @param conn
194202 * -- All connection settings included
@@ -219,14 +227,19 @@ protected void initWsResourcesClientStub(Connection conn)
219227 /**
220228 * Submit service query request
221229 *
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.
223233 * @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.
225237 */
226238 public ServiceQueryResponseWrapper serviceQuery (ServiceQueryRequestWrapper req ) throws Exception
227239 {
228240 if (req == null )
229- throw new Exception ("" );
241+ throw new Exception ("ServiceQueryRequestWrapper must be provided!" );
242+
230243 verifyStub ();
231244
232245 ServiceQueryResponse resp = null ;
@@ -249,6 +262,82 @@ public ServiceQueryResponseWrapper serviceQuery(ServiceQueryRequestWrapper req)
249262 return new ServiceQueryResponseWrapper (resp );
250263 }
251264
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+
252341 /**
253342 * Ping.
254343 *
0 commit comments