import redstone.xmlrpc.XmlRpcClient; import redstone.xmlrpc.XmlRpcStruct; public static String getUPCText(String upc) { String text = ""; try { XmlRpcClient client = new XmlRpcClient( "https://www.upcdatabase.com/rpc", false); XmlRpcStruct result = (XmlRpcStruct)client.invoke( "lookupUPC", new Object[] { upc } ); HashMap results = (HashMap)result; if ( results.size()>0 && results.get("message").toString().equalsIgnoreCase("Database entry found")) { text = results.get("description").toString()+" "+results.get("size").toString(); } } catch (Exception e) { } return text; }