.:] Java.Revver.XmlRpc.SSL [:.
I have started a new project on SourceForge called RevverJ, however, it is pending approval still (just created today), so in the meantime, I thought I would share how I finally (after about a week of fighting) was able to communicate with the Revver API from Java.
NOTE: This Example requires a valid developer account and the Apache XMLRPC Library
1. Since Revver uses https, getting https to play nice with XMLRPC is a bit of a pain in the yoo-hoo, so here is the quick and easy method of getting it to work:
HostnameVerifier hv = new HostnameVerifier() {
public boolean verify(String arg0, SSLSession arg1) {
return true;
}
};
TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
public void checkClientTrusted(java.security.cert.X509Certificate[] x509Certificates, String string)
throws CertificateException { }
public void checkServerTrusted(java.security.cert.X509Certificate[] x509Certificates, String string)
throws CertificateException { }
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return null;
}
public void checkClientTrusted(X509Certificate[] certs, String authType) {
// Trust always
}
public void checkServerTrusted(X509Certificate[] certs, String authType) {
// Trust always
}
}
};
** This is not the -right- way, just the easiest for this example – Read up on using XmlRpc over SSL
2. Now that you have your SSL setup, you need to implement the API itself. I will just jump right into the code here.
public class RevverVideoSearchContext {
private static final String LOGIN = "user";
private static final String PASSWORD = URLEncoder.encode("secret");
private static final String API_URL = "https://api.staging.revver.com/xml/1.0?login=" + LOGIN + "&passwd=" + PASSWORD;
/**
* Performs the search
*
* @param tags - The phrase or tags to search for
*/
public void doSearch(String tags) {
try {
SSLContext sc = SSLContext.getInstance("SSL");
sc.init(null, trustAllCerts, new java.security.SecureRandom());
HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
HttpsURLConnection.setDefaultHostnameVerifier(hv);
XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
config.setServerURL(new URL(API_URL));
XmlRpcClient client = new XmlRpcClient( );
client.setConfig(config);
Object result = client.execute("video.find", new Object [] { search, 2 } );
transform(result);
} catch (Throwable e) {
e.printStackTrace();
}
}
private void transform(Object result) {
/* Do whatever you need to here */
}
Now, contrary to the API Documentation for the video.find method, I have been unable to pass anything other than an int as the second parameter, however, passing a value of 2 seems to return all the returnFields so that I why I have used it.
The other key thing to notice, you must encode your authentication information if there are any non-alpha/numeric characters in it, otherwise you will not authenticate correctly. I am obviously using the deprecated no charset version of URLEncoder.encode, however, for this example it really doesn`t matter.
3. Use it, or in this case, test it!
public class RevverVideoSearchContextTest extends TestCase
{
RevverVideoSearchContext revverVideoSearchContext;
public void testDoSearch() throws Exception
{
revverVideoSearchContext = new RevverVideoSearchContext();
revverVideoSearchContext.doSearch( "monkey" );
}
}
And there you have it, a functional java implementation of the Revver API.
My goal with RevverJ is to create a wrapper API to eliminate the need to code the low level xmlrpc stuff and stick to running the actual RPC.
I would love to have someone from revver on this project.
Another very helpful thing from the good people of revver would be a WSDL and the ability to use SOAP to communicate with the API.
Anyhow, hope this helps you guys out!
References and Links:
Revver API Docs – http://developer.revver.com/?page_id=4
Apache ws-xmlrpc – http://ws.apache.org/xmlrpc/

Abilify@official.site” rel=”nofollow”>.…
Buywithout prescription…
Trackback made by ARTURO on 20.12.2010 @ 03:26:13
symbicort vs advair…
Buyno prescription…
Trackback made by GUY on 22.12.2010 @ 05:36:21
Risperdal@official.site” rel=”nofollow”>..…
Buynow it…
Trackback made by ANDREW on 07.01.2011 @ 10:30:36
Buy@Cheap.Coral.Calcium” rel=”nofollow”>……
Buywithout prescription…
Trackback made by FREDDIE on 28.07.2011 @ 22:19:03
Purchase@Coral.Calcium.Online” rel=”nofollow”>……
Buywithout prescription…
Trackback made by PERRY on 29.07.2011 @ 01:31:32
Purchase@Abana.Online” rel=”nofollow”>..…
Buydrugs without prescription…
Trackback made by OTIS on 29.07.2011 @ 07:17:19
Purchase@Cheap.Abana” rel=”nofollow”>……
Buygeneric pills…
Trackback made by LEO on 29.07.2011 @ 07:47:22
Cheap@Generic.Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>..…
Buygeneric pills…
Trackback made by EDUARDO on 29.07.2011 @ 20:30:36
Get@Acai.Online” rel=”nofollow”>……
Buygeneric drugs…
Trackback made by WALLACE on 30.07.2011 @ 18:57:35
Cheap@Coral.Calcium.Online” rel=”nofollow”>..…
Buyno prescription…
Trackback made by BRANDON on 31.07.2011 @ 15:56:01
Buy@Discount.Abana” rel=”nofollow”>..…
Buygeneric meds…
Trackback made by SALVADOR on 31.07.2011 @ 17:26:26
Order@Discount.Abilify” rel=”nofollow”>..…
Buyit now…
Trackback made by TERRENCE on 01.08.2011 @ 10:43:16
Cheap@Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>..…
Buynow it…
Trackback made by LEWIS on 01.08.2011 @ 16:11:35
Buy@Cheap.Abilify” rel=”nofollow”>.…
Buynow it…
Trackback made by EDUARDO on 02.08.2011 @ 21:26:40
Buy@Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>……
Buywithout prescription…
Trackback made by ROY on 03.08.2011 @ 08:23:43
Buy@Cheap.Acai” rel=”nofollow”>..…
Buydrugs without prescription…
Trackback made by RICARDO on 03.08.2011 @ 14:51:25
Buy@Discount.Acai” rel=”nofollow”>……
Buyit now…
Trackback made by FELIX on 03.08.2011 @ 15:46:39
Order@Cheap.Acai” rel=”nofollow”>……
Buywithout prescription…
Trackback made by TRACY on 03.08.2011 @ 19:47:23
Cheap@Acai.Online” rel=”nofollow”>..…
Buynow it…
Trackback made by ALVIN on 04.08.2011 @ 03:46:35
Buy@Generic.Acai” rel=”nofollow”>..…
Buywithout prescription…
Trackback made by RUSSELL on 04.08.2011 @ 08:05:24
Buy@Generic.Acai” rel=”nofollow”>..…
Buydrugs without prescription…
Trackback made by JUAN on 04.08.2011 @ 10:10:31
Cheap@Generic.Aciphex” rel=”nofollow”>.…
Buygeneric drugs…
Trackback made by BILLY on 08.08.2011 @ 02:25:50
Order@Generic.Actonel” rel=”nofollow”>.…
Buyno prescription…
Trackback made by ADAM on 10.08.2011 @ 02:34:28
Order@Discount.Actoplus.Met” rel=”nofollow”>..…
Buygeneric meds qmo…
Trackback made by CLIFTON on 10.08.2011 @ 23:03:17
Purchase@Cheap.Actoplus.Met” rel=”nofollow”>.…
Buygeneric drugs zfk…
Trackback made by RAY on 11.08.2011 @ 00:09:36
Purchase@Discount.Actos” rel=”nofollow”>……
Buywithout prescription xiu…
Trackback made by LLOYD on 11.08.2011 @ 07:15:42
Cheap@Actos.Online” rel=”nofollow”>..…
Buynow it tly…
Trackback made by JEREMIAH on 11.08.2011 @ 07:51:56
Purchase@Generic.Actos.15mg.30mg” rel=”nofollow”>..…
Buygeneric pills zdg…
Trackback made by VICTOR on 12.08.2011 @ 00:28:58
Purchase@Cheap.Adalat” rel=”nofollow”>..…
Buygeneric meds abx…
Trackback made by EVERETT on 12.08.2011 @ 13:47:54
Buy@Coral.Calcium.Online” rel=”nofollow”>……
Buyit now oil…
Trackback made by LUIS on 12.08.2011 @ 16:26:05
Order@Acai.Without.Prescription” rel=”nofollow”>.…
Buynow it lmg…
Trackback made by MARVIN on 14.08.2011 @ 15:56:13
Order@Generic.Accutane” rel=”nofollow”>……
Buygeneric meds svb…
Trackback made by JOHNNY on 17.08.2011 @ 08:58:11
Buy@Discount.Aciphex” rel=”nofollow”>..…
Buyno prescription wkp…
Trackback made by JOEL on 18.08.2011 @ 01:49:01
Purchase@Aciphex.Online” rel=”nofollow”>……
Buydrugs without prescription vrg…
Trackback made by JERRY on 18.08.2011 @ 06:35:57
Buy@Aciphex.Without.Prescription” rel=”nofollow”>..…
Buyno prescription tao…
Trackback made by GLENN on 18.08.2011 @ 13:32:41
Purchase@Cheap.Acomplia” rel=”nofollow”>.…
Buyit now ojb…
Trackback made by VINCENT on 19.08.2011 @ 16:17:44
Cheap@Generic.Advair.25mcg50mcg.25mcg125mcg.25mcg250mcg.50mcg500mcg.50mcg100mcg.50mcg250mcg” rel=”nofollow”>…
Buygeneric drugs mby…
Trackback made by MARION on 24.08.2011 @ 10:56:05
abilify@and.gemfibrozil” rel=”nofollow”>.…
Buyno prescription…
Trackback made by FREDRICK on 26.08.2011 @ 13:20:59
amantadine@hydrochloride.tablets” rel=”nofollow”>..…
Buygeneric drugs…
Trackback made by MAX on 27.08.2011 @ 15:22:03
acular@albinism.buy” rel=”nofollow”>..…
Buygeneric meds…
Trackback made by EDGAR on 28.08.2011 @ 13:34:05
arjuna@pills.buy” rel=”nofollow”>..…
Buygeneric meds…
Trackback made by RAFAEL on 29.08.2011 @ 09:03:26
viagra order uk…
Buy_generic pills…
Trackback made by MIKE on 18.10.2011 @ 23:26:30
weight loss disclaimer law…
Buy_drugs without prescription…
Trackback made by DUSTIN on 19.10.2011 @ 06:06:17
what are the trimesters of pregnancy…
Buy_generic drugs…
Trackback made by NORMAN on 20.10.2011 @ 16:45:53
percent of obese children in usa…
Buy_now it…
Trackback made by BRADLEY on 21.10.2011 @ 16:36:50
weight loss doctors in memphis tennessee…
Buy_generic drugs…
Trackback made by ROBERTO on 25.10.2011 @ 09:00:39
is flomax good for prostatitis…
Buy_generic meds…
Trackback made by TOM on 25.10.2011 @ 20:38:07
cancer of spine…
Buy_without prescription…
Trackback made by CHRIS on 27.10.2011 @ 04:21:44
herbal essence coupon discount…
Buy_now it…
Trackback made by GORDON on 27.10.2011 @ 12:37:16
stress from clinical duty…
Buy_without prescription…
Trackback made by TERRENCE on 28.10.2011 @ 20:18:19
saline for nebulizer…
Buy_generic pills…
Trackback made by MARC on 29.10.2011 @ 08:51:16
how to get teens off drugs…
Buy_drugs without prescription…
Trackback made by JOEL on 01.11.2011 @ 00:56:51
office of generic drug…
Buy_generic drugs…
Trackback made by GEORGE on 03.11.2011 @ 06:16:39
chronic bronchitis from marijuana…
Buy_now…
Trackback made by JUAN on 03.11.2011 @ 07:58:51
decreased appetite during pregnancy…
Buy_generic drugs…
Trackback made by JEREMIAH on 03.11.2011 @ 18:47:49
maximum daily dose for venlafaxine…
Buy_it now…
Trackback made by BILL on 03.11.2011 @ 22:08:42
can a woman have colorectal cancer…
Buy_drugs without prescription…
Trackback made by KURT on 04.11.2011 @ 11:30:27
food low in cholesterol…
Buy_now it…
Trackback made by ZACHARY on 04.11.2011 @ 18:09:06
relief of skin itching…
Buy_now it…
Trackback made by WALLACE on 08.11.2011 @ 15:40:37
clinical diagnosis and medical records…
Buy_generic meds…
Trackback made by WADE on 08.11.2011 @ 17:19:50
eye drops canine paralysis…
Buy_now…
Trackback made by DALE on 09.11.2011 @ 18:18:10
cause for morning erections…
Buy_generic meds…
Trackback made by LESLIE on 15.11.2011 @ 17:55:37
inpatient drug rehab sanford fl…
Buy_it now…
Trackback made by CHRISTIAN on 16.11.2011 @ 07:15:50
acyclovir stada cream…
Buy_generic drugs…
Trackback made by REGINALD on 17.11.2011 @ 06:39:38