DataPower

 View Only

 SOMA call to create probe

Kirby Clements's profile image
Kirby Clements posted Wed January 08, 2025 02:45 PM

I'm trying to use SOMA with firmware 10.5.0.15 on an IDG DataPower in order to create a probe. I am unable to get a successful response with the request I've put together, shuffling many requests around, looking at the management XSD's and WSDL, etc.  Still no luck. Here are 2 different requests that are currently unsuccessful. The fist errors with 'internal error' and the second request errors with 'Invalid Name' - thanks for any help : )

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:man="http://www.datapower.com/schemas/management">
<soapenv:Header/>
<soapenv:Body>
<man:request domain="WTX">
<man:do-action>
<CreateProbeCapture>
<CaptureName>TEST</CaptureName>
<ServiceType>MultiProtocolGateway</ServiceType>
<ServiceName>domain-status</ServiceName>
<CaptureCount>20</CaptureCount>
<Interval>1</Interval>
<FilterByAPIClientID/>
</CreateProbeCapture>
</man:do-action>
</man:request>
</soapenv:Body>
</soapenv:Envelope>
-----------------------------------------------
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:man="http://www.datapower.com/schemas/management">
<soapenv:Header/>
<soapenv:Body>
<man:request domain="WTX">
<man:modify-config>
<MultiProtocolGateway>domain-status</MultiProtocolGateway>
<DebugMode>on</DebugMode>
</MultiProtocolGateway>
</man:modify-config>
</man:request>
</soapenv:Body>
</soapenv:Envelope>
Joseph Morgan's profile image
Joseph Morgan IBM Champion

Hey Kirby - I haven't seen your name in a while.  Let's touch base sometime!

 On a 10.6.0.2 box, the first request runs fine, whereas on a 10.5.0.11 box, I also get an internal error "*** Unknown command or macro".  So, I suspect something is not altogether right on the 10.5 box, or maybe the new probe isn't ready on that FW, or I, too, am missing something.  I issued the exact action XML on both appliances.   It is interesting to note, too, the "CreateProbeCapture" action is in the "AnyActionElement" within the XSD of the 10.0.5.11 "xml-mgmt.xsd".  Though you don't need the  "<FilterByAPIClientID/>" at all, with our without it, it errors on a 10.5.0.11 box.  The format of your SOAP Envelope is clearly correct, because it works exactly as typed on the 10.6.0.2 box.

On your 2nd call, your format is just a tiny bit off as the name of the MPG is an attribute.   Consider this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
     <soapenv:Body>
         <dp:request xmlns:dp="http://www.datapower.com/schemas/management" domain="WTX">
             <dp:modify-config>
                 <MultiProtocolGateway name="domain-status">
                         <DebugMode>on</DebugMode>
                 </MultiProtocolGateway>
             </dp:modify-config>
         </dp:request>
     </soapenv:Body>
</soapenv:Envelope>
Para PC's profile image
Para PC

Implement distinct roles for teachers, students, administrators, and potentially parents, each with tailored access and permissions.

CHARLES COBLE's profile image
CHARLES COBLE

Tested this and confirmed it works, change names and domain to match yours.  This does require probe settings to be enabled and opt state up as well:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
     <env:Body>
          <dp:request xmlns:dp="http://www.datapower.com/schemas/management" domain="apiconnect">
               <dp:modify-config>
                    <MultiProtocolGateway name="webapi">
                         <DebugMode>on</DebugMode>
                    </MultiProtocolGateway>
               </dp:modify-config>
          </dp:request>
     </env:Body>
</env:Envelope>

--------

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
     <env:Body>
          <dp:request xmlns:dp="http://www.datapower.com/schemas/management" domain="apiconnect">
               <dp:do-action>
                    <CreateProbeCapture>
                         <CaptureName>Test</CaptureName>
                         <ServiceType>MultiProtocolGateway</ServiceType>
                         <ServiceName>webapi</ServiceName>
                         <CaptureCount>20</CaptureCount>
                         <Interval>1</Interval>
                    </CreateProbeCapture>
               </dp:do-action>
          </dp:request>
     </env:Body>
</env:Envelope>

Kirby Clements's profile image
Kirby Clements

Thanks Joe and Charles! Nice to have the confirms on the 10.6.0.x machine. I'll be using 10.5.0.15 for probably the next 8 months. Going to check the probe settings for 'on'.  In my case, there would be no probe existing and this request would create the probe. I'm guessing the 'capture' settings would then be automatically defaulted to capture the '20' transaction, or, do I also need a 2nd SOMA call with that 'capture' request to actually 'capture' the transactions? 

Joseph Morgan's profile image
Joseph Morgan IBM Champion

For the *old* probe, capturing probe data is exceedingly difficult.  KumbaSoft's DPAA tool managed to do it.  IBM Improved things quite a bit for the new probe.  There is a 2nd action you'll need to utilize, and that is the "GetAllProbeData" action (See the "ActionGetAllProbeData" in the schemas).    There are others you might want to examine, which are the "ListProbeCaptures", "GetDetailsProbeCapture", "GetProbeTransactionData" and finally the "DeleteProbeCapture" actions.

Kirby Clements's profile image
Kirby Clements

Thanks Joe - I've got both requests working now, only using the <CreateProbeCapture>  as of now per our requirements. The ports being defined in different domains, with different ports, such as the 'gateway peeriring' ports of 'Local' and 'Monitor' port, has been the trick to have the 'probe settings' up in each domain. I didn't know each application domain needs different port numbers for those ports in particular  but that was my hangup. So now that the gateway peering is up, no 'port already in use' errors, I am good. It is going to be a task to assign different ports in each domain but I'm thinking that is the only way to satisfy the 'gateway peering' errors, at least so far. I was thinking the default 'local' port of '16380' and 'Monitor' port of '26380' would work in all domains, but was wrong about that.

Hermann Stamm-Wilbrandt's profile image
Hermann Stamm-Wilbrandt

Ports are a global resource in 0..65535 (16bit) range:
https://en.wikipedia.org/wiki/Port_(computer_networking)

Only a single service can listen on a port for a whole device.

In case you are talking about the old Probe, please keep this bold statement from DataPower docs in mind:
https://www.ibm.com/docs/en/datapower-gateway/10.5.0?topic=probe-ways-enable#probe_enabling__traditional

CAUTION:
Do not leave the probe in the enabled state in production. Disable the probe before you move the configuration to production.
Kirby Clements's profile image
Kirby Clements

Thanks Hermann - it's the new probe with the default capture count of '20'. We're gonna make sure no probes stay on for sure. I'll be setting up about 50 application domains for the Probe Settings adjustments to the gateway-peering configs, so that the SOMA calls to turn on the probe will work. My results in testing as of today show that 10.6.0.x accepts the SOMA call for <CreateProbeCapture>  but the firmware of 10.5.0.x does not, and gives the error of 'error' *** 'Unknown command or macro', identical to Joe's testing responses. 

Joseph Morgan's profile image
Joseph Morgan IBM Champion

Hey Hermann,

To add to Kriby's comments, I've also noticed some of the actions issued through the XML Management don't do what one would expect (even in 10.6.x).  For example, the ListProbeCaptures action just returns an "OK" and nothing else.   I would have expected it to return a list with capture IDs so other actions like "GetAllProbeData" can then be invoked.

Any suggestions?

Amit Munwes's profile image
Amit Munwes

In DPOD we utilize the REST APIs which work both for 10.5 and 10.6. 
Note that some of the responses change between versions.

Hermann Stamm-Wilbrandt's profile image
Hermann Stamm-Wilbrandt

@Kirby Clements 

Please try again, and if your are not on latest 10.5.0.x, please try on a dev system with upgrade to latest.

Why?

This is 10.0.5:

$ grep CreateProbeCapture xml-mgmt.xsd 
  <xsd:complexType name="ActionCreateProbeCapture">
      <xsd:element name="CreateProbeCapture" type="tns:ActionCreateProbeCapture" />
      <xsd:enumeration value="CreateProbeCapture" />
$


And this is identical on 10.6.0:

$ grep CreateProbeCapture xml-mgmt.xsd
  <xsd:complexType name="ActionCreateProbeCapture">
      <xsd:element name="CreateProbeCapture" type="tns:ActionCreateProbeCapture" />
      <xsd:enumeration value="CreateProbeCapture" />
$

@Joseph
Please create a (query type) support ticket on ListProbeCaptures.

Kirby Clements's profile image
Kirby Clements

Late in this response, but to answer Hermann's request, I did test with 10.5.0.15 and get the exact same error when testing with 10.5.0.11.  Since this is a POC we are going to use 10.6.0.x for the SOMA probe creation in our sandbox environment. Thanks to everyone for the input.