Question on output from a root service

webMethods 10.11 :

I’m using the WmRoot Svc - wm.server.query:getAllServiceStats. The same service that is invoked in stats-services.dsp. The output from this service is provided in an document list/array structure which I can then loop over and retrieve various stats per service. But here’s the kicker - the SvcStats/SvcStats[0]/name element is returned in all CAPS eg. ACCEL.CONFIG:INITACCELCONFIG. And when I’m trying to use that element to invoke another svc (eg. wm.server.ns.dependency:getDependent) it naturally fails, because it can’t find it. The .dsp page correctly shows our services as they appear the package navigator eg. [Accel.config:initAccelConfig] and when I independently invoke the getDependent svc using the correct format, all is well.

So my question is am I able to do this conversion somehow in my flow? Is there another root or pub svc that can mimic that?

I suspect the webpage .dsp is calling some class or js function but I’m not able to understand how that’s being done. I just want to replicate that functionality or alternatively, have the output of the SvcStats/SvcStats[0]/name return the native/correct package/folder/service format.

Any idea?

Mick

Review the .dsp in more detail after the %invoke wm.server.query:getServiceStats% you’ll see that the code is using the ifc and svc objects for display, not name.

I’m unable to determine how the dsp is referring to ifc and svc in a way that makes them render a string. But the classname is shown in Designer. You may be able to use Java to get the string representation of those objects.

I can see these 2 objects referenced in the .dsp. I can also see them in the output in Designer when debugging …

name ACCEL.CONFIG:INITACCELCONFIG
ifc com.wm.util.Name
svc com.wm.util.Name
isCached N

but if I do a pub.flow:savePipelineToFile and inspect that pipeline file, they don’t show up at all.

Column 1 Column 2 Column 3 Column 4
  <record javaclass="com.wm.util.Values">
    <value name="name">ACCEL.CONFIG:INITACCELCONFIG</value>
    <value name="isCached">N</value>
    <value name="isPrefetched">N</value>
    <value name="sAccessLast">2025-01-14 21:21:30 EST</value>
    <value name="sAccessLastEpoch">1736907690131</value>
    <value name="sAccessTotal">2</value>
    <value name="sRunning">&amp;nbsp;</value>
    <value name="cHitLast">&amp;nbsp;</value>
    <value name="cHitLastEpoch">0</value>
    <value name="cHitTotal">&amp;nbsp;</value>
    <value name="cHitRatio">&amp;nbsp;</value>
    <value name="cEntries">&amp;nbsp;</value>
    <value name="cExpires">&amp;nbsp;</value>
    <value name="cPrefetchLast">&amp;nbsp;</value>
    <value name="cPrefetchLastEpoch">0</value>
    <value name="cPrefetchTotal">&amp;nbsp;</value>
    <value name="cPrefetched">&amp;nbsp;</value>
    <value name="cCircuitBreaker">N</value>
  </record>

The question is how can I use these objects to format my packageName/seviceName correctly?
It’s not obvious to me how this is being accomplished in the JS file - “webMethods.js”.

This is where using a Java service may help. The ifc and svc are not being saved presumably because the com.wm.util.Name class is not serializable. In a Java service, see if you can cast the returned ifc and svc objects to the com.wm.util.Name class, and use methods to get the appropriate string from there.

I too am completely baffled by how the dsp is able to refer to ifc and svc and get the appropriate strings for display. In dsp it can be seen that there is a URL parameter webMethods-wM-AdminUI defined. I tried settng that in the pipeline where wm.server.query:getServiceStats would have access to it to see if that made a difference. It did not. There may be some other “magic” var involved that is signalling the service to return something other than the com.wm.util.Name object.

You can create a support ticket and ask them if there is a pub alternative and if there isn’t, how it works. They will tell you the functionality might change in the future etc. but they usually tell you how, if you ask properly (and nicely).

2 Likes