Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..
1617 views

NNMi webservices issues

Jump to solution

Hi all,

we have installed NNMi 9.24 on a server and we are tring to use the WS-I APIs (looking into the chapter 3 "web services" of the Developer's Toolkit Guide).

We are using the SoapUI to test it, here it is the wsdl "Incident" tested about some methods:

-----
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inc="http://incident.sdk.nms.ov.hp.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <inc:updateLifecycleState>
         <arg0>10737425661</arg0>
         <arg1>Closed</arg1>
      </inc:updateLifecycleState>
   </soapenv:Body>
</soapenv:Envelope>
-----

But it doesn't perform the "Update".

In addition also the "getIncidents" method doesn't returns any incident.

Someone could help us with the correct syntax to use these method? Or tell us why it isn't working?

Thank you very much.

Roberto.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: NNMi webservices issues

Jump to solution

Hello Roberto,

 

perhaps you found it already, but you have to use this;

 

soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inc="http://incident.sdk.nms.ov.hp.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <inc:updateLifecycleState>
         <arg0>43830</arg0>
         <arg1>com.hp.nms.incident.lifecycle.Registered</arg1>
      </inc:updateLifecycleState>
   </soapenv:Body>
</soapenv:Envelope>

 

The life cycle state must be given with "com.hp.nms.incident.lifecycle.".

 

HTH and kind regards


Allessandro

View solution in original post

5 Replies
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: NNMi webservices issues

Jump to solution

Hello Roberto,

 

perhaps you found it already, but you have to use this;

 

soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inc="http://incident.sdk.nms.ov.hp.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <inc:updateLifecycleState>
         <arg0>43830</arg0>
         <arg1>com.hp.nms.incident.lifecycle.Registered</arg1>
      </inc:updateLifecycleState>
   </soapenv:Body>
</soapenv:Envelope>

 

The life cycle state must be given with "com.hp.nms.incident.lifecycle.".

 

HTH and kind regards


Allessandro

View solution in original post

Highlighted
Respected Contributor.. Respected Contributor..
Respected Contributor..

Re: NNMi webservices issues

Jump to solution

Thank you Allessandro,

 

with your suggestion we have solved the problem, but could you please tell me where I can find on the documentation these: "com.hp.nms.incident.lifecycle."

 

Cause we also try this method:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inc="http://incident.sdk.nms.ov.hp.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <inc:getIncidents>
         <arg0>
            <!--Optional:-->
            <condition>
                <constraint>
                  <name>includeCias</name>
                  <!--Optional:-->
                  <value>true</value>
               </constraint>
               <!--Optional:-->
               <!--Optional:-->
               <name>severity</name>
               <!--Optional:-->
               <operator>=</operator>
               <!--Optional:-->
               <value>MAJOR</value>
            </condition>
         </arg0>
      </inc:getIncidents>
   </soapenv:Body>
</soapenv:Envelope>

 

but instead of show only the incidents with severity Major. it shows us all incidents' severity.

 

Greetings, Roberto.

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Re: NNMi webservices issues

Jump to solution

Hello Roberto,

 

I got the info from the getIncidents result. Caused by your question I have played around and was able to develope this working SOAP request:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:inc="http://incident.sdk.nms.ov.hp.com/">

   <soapenv:Header/>

   <soapenv:Body>

     <inc:getIncidents>

         <arg0 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xmlns:ns3="http://filter.sdk.nms.ov.hp.com/"

         xsi:type="ns3:expression">

             <operator>AND</operator>

         <subFilters xsi:type="ns3:condition">

               <name>created</name>

               <operator>GT</operator>

               <value>1417521600000</value>

         </subFilters>

         </arg0>

     </inc:getIncidents>

   </soapenv:Body>

</soapenv:Envelope>

 

The timestamp is in milliseconds.

 

HTH and kind regards

 

Allessandro

0 Likes
Highlighted
Member.

Re: NNMi webservices issues

Jump to solution

Hi  - I am new to NNMI

I need to build a soap request that return open incidents for a given hostname...

I have no idea how to build the [FILTER] portion - any help ?

<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<getIncidents xmlns="http://incident.sdk.nms.ov.hp.com/">
<arg0>[filter]</arg0>
</getIncidents>
</Body>
</Envelope>

 

 

0 Likes
Highlighted
Contributor.
Contributor.

Re: NNMi webservices issues

Jump to solution
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inc="http://incident.sdk.nms.ov.hp.com/">
<soapenv:Header/>
<soapenv:Body>
<inc:getIncidents>
<arg0>
<!--Optional:-->
<condition>
<!--Optional:-->
<condition/>
<!--Optional:-->
<constraint>
<!--Optional:-->
<condition/>
<!--Optional:-->
<constraint/>
<!--Optional:-->
<expression>
<!--Optional:-->
<condition/>
<!--Optional:-->
<constraint/>
<!--Optional:-->
<expression/>
<!--Optional:-->
<operator>?</operator>
<!--Zero or more repetitions:-->
<subFilters/>
</expression>
<!--Optional:-->
<name>?</name>
<!--Optional:-->
<value>?</value>
</constraint>
<!--Optional:-->
<expression>
<!--Optional:-->
<condition/>
<!--Optional:-->
<constraint>
<!--Optional:-->
<condition/>
<!--Optional:-->
<constraint/>
<!--Optional:-->
<expression/>
<!--Optional:-->
<name>?</name>
<!--Optional:-->
<value>?</value>
</constraint>
<!--Optional:-->
<expression/>
<!--Optional:-->
<operator>?</operator>
<!--Zero or more repetitions:-->
<subFilters/>
</expression>
<!--Optional:-->
<name>?</name>
<!--Optional:-->
<operator>?</operator>
<!--Optional:-->
<value>?</value>
</condition>
<!--Optional:-->
<constraint>
<!--Optional:-->
<condition>
<!--Optional:-->
<condition/>
<!--Optional:-->
<constraint/>
<!--Optional:-->
<expression>
<!--Optional:-->
<condition/>
<!--Optional:-->
<constraint/>
<!--Optional:-->
<expression/>
<!--Optional:-->
<operator>?</operator>
<!--Zero or more repetitions:-->
<subFilters/>
</expression>
<!--Optional:-->
<name>?</name>
<!--Optional:-->
<operator>?</operator>
<!--Optional:-->
<value>?</value>
</condition>
<!--Optional:-->
<constraint/>
<!--Optional:-->
<expression>
<!--Optional:-->
<condition>
<!--Optional:-->
<condition/>
<!--Optional:-->
<constraint/>
<!--Optional:-->
<expression/>
<!--Optional:-->
<name>?</name>
<!--Optional:-->
<operator>?</operator>
<!--Optional:-->
<value>?</value>
</condition>
<!--Optional:-->
<constraint/>
<!--Optional:-->
<expression/>
<!--Optional:-->
<operator>?</operator>
<!--Zero or more repetitions:-->
<subFilters/>
</expression>
<!--Optional:-->
<name>?</name>
<!--Optional:-->
<value>?</value>
</constraint>
<!--Optional:-->
<expression>
<!--Optional:-->
<condition>
<!--Optional:-->
<condition/>
<!--Optional:-->
<constraint>
<!--Optional:-->
<condition/>
<!--Optional:-->
<constraint/>
<!--Optional:-->
<expression/>
<!--Optional:-->
<name>?</name>
<!--Optional:-->
<value>?</value>
</constraint>
<!--Optional:-->
<expression/>
<!--Optional:-->
<name>?</name>
<!--Optional:-->
<operator>?</operator>
<!--Optional:-->
<value>?</value>
</condition>
<!--Optional:-->
<constraint>
<!--Optional:-->
<condition>
<!--Optional:-->
<condition/>
<!--Optional:-->
<constraint/>
<!--Optional:-->
<expression/>
<!--Optional:-->
<name>?</name>
<!--Optional:-->
<operator>?</operator>
<!--Optional:-->
<value>?</value>
</condition>
<!--Optional:-->
<constraint/>
<!--Optional:-->
<expression/>
<!--Optional:-->
<name>?</name>
<!--Optional:-->
<value>?</value>
</constraint>
<!--Optional:-->
<expression/>
<!--Optional:-->
<operator>?</operator>
<!--Zero or more repetitions:-->
<subFilters/>
</expression>
</arg0>
</inc:getIncidents>
</soapenv:Body>
</soapenv:Envelope>
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.