webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Calling a WmPublic service using pub.client:http

  • 1.  Calling a WmPublic service using pub.client:http

    Posted Mon July 01, 2024 01:11 PM

    I am trying to gather information from multiple IS clusters about the JDBC pool connection properties. Support told that the service wm.art.admin.connection:getResourceConfiguration 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 pub.date:getCurrentDate through wrapper service on local IS using postman:

    <?xml version="1.0" encoding="UTF-8"?>
    <Values version="2.0">
    <byte name="response">
    PE.... (masked)
    
    </byte>
    <value name="body">&lt;BODY bgcolor="#dddddd"&gt;
    &lt;TABLE bgcolor="#dddddd" border="1"&gt;
    &lt;TR&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;
    &lt;/TR&gt;
    &lt;/TABLE&gt;
    &lt;/BODY&gt;
    </value>
    </Values>
    

    response of pub.date:getCurrentDate 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>
    </Values>
    

    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Calling a WmPublic service using pub.client:http

    Posted Mon July 01, 2024 02:59 PM

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


    #webMethods
    #Integration-Server-and-ESB