Hyperic HQ Api getting an agent

Hi everybody.

I'm a newbie with Hyperic but I'm so happy about discovering this tool it's very powerful and I think it can be adapted perfectly to my necessities. I have a problem using the API. I'm trying to use it through java directly and I'm trying to get my agent because I need it in further operations.

If I use the directly from command line it works perfectly.

./ agent list --host localhost --port 7080 --user hqadmin --password hqadmin --secure false

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>



    <Agent id="10001" address="" port="2144" version="4.4.0" unidirectional="false"/>


But when I try to get this agent in Java I get an error that I don't know how to solve.

          AgentsResponse agentsResponse = agentApi.getAgents();

             if(agentsResponse.getStatus() != ResponseStatus.SUCCESS){

       "Fail retrieving agent " + agentsResponse.getError().getReasonText());

       "More info " + agentsResponse.getError().getErrorCode());

Fail retrieving agent Unable to deserialize result

More info UnexpectedError

I'm using hyperic 4.4.0 so I'm using HQAPI V3.2. My java class is running inside Apache ServiceMix 4.5.3 and I added this library to my Maven repository using the .jar that is provided.

Any help will be so appreciated.

Thank you very much to everybody.

Tags (3)
0 Kudos
0 Replies