Calling a WmPublic service using pub.client:http

I am trying to gather information from multiple IS clusters about the JDBC pool connection properties. Support told that the service can return this data. Since this service doesn’t have a list ACL for my user, all I can do is execute the service. I tried running it and it returns the data I need. So far so good.

I implemented the flow on local IS, and it successfully returns the data I need. Currently data is not sorted, but I can work with this data. Screenshot of the flow is below. I can work with this data as long as I can get this data remotely. url is generated by this string with pipeline substitution. %url%/invoke/%serviceToInvoke% and : is replaced by /.

I didn’t want to define each and every IS node I have as remote IS, so I implemented a remote invoke wrapper service as in the picture below.

When I invoke the service in flow service, it returns a document (xml). This is what I expect it to return.
When I invoke the service using wrapper service (through client:http service) even if I execute in local, it returns an html page. It has the same data, but the return types are different. I tried invoking simpler services through the client:http service, such as getDate service. If I invoke it using client:http it returns an HTML page. I also tried invoking the same service using postman. If I invoke it directly, it returns an XML, if I invoke using client:http, it returns an HTML.

What causes this behavior? Am I missing something and how can I make it return an XML instead of HTML? Since I am invoking built-in services I don’t have any control over what it returns.

response of through wrapper service on local IS using postman:

<?xml version="1.0" encoding="UTF-8"?>
<Values version="2.0">
    <byte name="response">
PE.... (masked)

    <value name="body">&lt;BODY bgcolor="#dddddd"&gt;
&lt;TABLE bgcolor="#dddddd" border="1"&gt;
&lt;TD valign="top"&gt;&lt;B&gt;date&lt;/B&gt;&lt;/TD&gt;
&lt;TD&gt;2024-07-01 10:36:48 MDT&lt;/TD&gt;

response of using postman

<?xml version="1.0" encoding="UTF-8"?>
<Values version="2.0">
    <date name="date">Mon Jul 01 17:07:21 UTC 2024</date>

Hi. Please try sending the request header Accept: application/xml from pub.client:http.

1 Like