UCMDB and UD Practitioners Forum (Previously CMS)
Showing results for 
Search instead for 
Do you mean 

HP uCMDB Web Service API and Java API

SOLVED
Go to Solution
Occasional Contributor

HP uCMDB Web Service API and Java API

[ Edited ]

Hi

 

I have tried the Java API from Eclipse java app, it works well.

 

When I wanted to try the HP uCMDB Web Service API I got some error.

I have found the sample on this board.

I don't know how I can use this following imports:

 

import com.hp.ucmdb.generated.services.UcmdbService;

import com.hp.ucmdb.generated.services.UcmdbServiceStub;

import com.hp.ucmdb.generated.types.CmdbContext;

 

The Eclipse doesn't resolve the UcmdbService class, why?

 Can somebody write to me the short step by step guide?

 

Thanks.

Zsolt

 

P.S. This thread has been moved from Application Perf Mgmt (BAC / BSM) Support and News Forum to CMS and Discovery Support and News Forum. -HP Forum Moderator

6 REPLIES
HPE Blogger

Re: HP uCMDB Web Service API and Java API

You need to download the CMDB API jar from your CMDB server, and then add it to your IDEA as external resource.

It can be retrieved from the jmx console.

Occasional Visitor

Re: HP uCMDB Web Service API and Java API

Where in the JMX Console can I find this API file?

 

Thanks

Regular Advisor

Re: HP uCMDB Web Service API and Java API

Hi How do I get the package include the following: import com.hp.ucmdb.generated.services.UcmdbService; import com.hp.ucmdb.generated.services.UcmdbServiceStub; import com.hp.ucmdb.generated.types.CmdbContext; I just found the ucmdb java api jar package. The above are from ucmdb online help about web servcie api, so I guess there should be packages include the above classes.. you mentioned can be retrieved from jmx console? please, how can I get it?
Regular Advisor

Re: HP uCMDB Web Service API and Java API

Or we have to generate client java code via the wsdl and compile to classes and package them to a jar package by our own?
Trusted Contributor

Re: HP uCMDB Web Service API and Java API

Get on the uCMDB GUI homepage (where the links are listed like "UCMDB", "Server Status" etc) and click on "API Client Download".

 

Then import the jar as an external JAR into your Eclipse workspace and:

 

import com.hp.ucmdb.api.*;


(etc)

 

 

 

 

Occasional Contributor

Re: HP uCMDB Web Service API and Java API

[ Edited ]

Update!
Through UCMDB GUI homepage and "API Client download" link i can only get com.hp.ucmdb.api.* packages, but how can get com.hp.ucmdb.generated.* packages for using executeTopologyQueryByName(...) method for example?
Does anyone know?

//Add this to "OnDomLoad" event