Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8732897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:31:49+00:00 2026-06-13T09:31:49+00:00

I’m using XmlRpcClient to connect to a XML-RPC server In the response to my

  • 0

I’m using XmlRpcClient to connect to a XML-RPC server
In the response to my request in the XML response I will get:

int cpuLoad, 
String fanStatus, 
String fanStatusWorst, 
String temperatureStatus, 
String temperatureStatusWorst,
String rtcBatteryStatus,
String rtcBatteryStatusWorst, 
String voltagesStatus, 
String voltagesStatusWorst, 
String operationalStatus

I’m using

HashMap result = (HashMap) xmlRpcClient.execute(METHOD_DEVICE_HEALTH, params );

to retrieve results, but not sure how can I iterate over each value to
find operationalStatus value.
Is there a more elegant solution to parse results using xmlRpcClient? So I just retrieve the fields I’m interested?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:31:51+00:00Added an answer on June 13, 2026 at 9:31 am

    Actually there are more than one answer to your question depending on your cenario.

    1) If you are communicating with Java based system using XML-RPC
    

    Apache XML-RPC library comes with handy class called ClientFactory. This class allows you to bind your service interface (in your case the interface of the object you are invoking METHOD_DEVICE_HEALTH) to an object in the JVM of your consumer (the object that invokes xmlRpcClient.execute(METHOD_DEVICE_HEALTH, params)). For more details about the implementation, take a look at this link.

    In this cenario, you can even have an transfert object like

    public class DeviceHealth {
      int cpuLoad, 
      String fanStatus, 
      String fanStatusWorst, 
      String temperatureStatus, 
      String temperatureStatusWorst,
      String rtcBatteryStatus,
      String rtcBatteryStatusWorst, 
      String voltagesStatus, 
      String voltagesStatusWorst, 
      String operationalStatus
    
      // getters and setters
    }
    

    and a method in your service class returning directly its type

    public interface HealthService {
       DeviceHealth checkDeviceHealth(int id);
    }
    
    public class DefaultHealthService implements HealthService {
        public DeviceHealth checkDeviceHealth(int id) {}
    }
    

    The framework will serialize and deserialize this object automatically for you.

    2) If you are communicating with other systems
    

    Well, in this case your gona have to handle the serialization and deserialization process your own. You can use for that JAXB, which has a reference implementation built-in JDK 1.6 and 1.7. This post gives you an idea on how to do this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the
I've got a string that has curly quotes in it. I'd like to replace
Specifically, suppose I start with the string string =hello \'i am \' me And

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.