Getting Started

Download location: vmsrpc.jar

There are extra jar files needed for the json parse example to work:


Make sure the jar files are in a location that's included in the classpath of the project.

Import these classes:

import java.util.*;
import javax.json.*;
import com.bluebillywig.VmsRpc;

Create a new instance of vmsrpc:

VmsRpc vmsRpc = new VmsRpc("http://<publication>","<username>","<password>");

The following example demonstrates how to search for a couple of mediaclips and immediately print the embed code for each mediaclip:

Map<String,String> properties = new HashMap<String,String>();
properties.put("query","type:mediaclip AND status:published");
properties.put("sort","createddate desc");

String json = vmsRpc.json( "search", null, properties );

byte[] bytes = json.getBytes();

InputStream inputStream = new ByteArrayInputStream(bytes);

JsonParser parser = Json.createParser( inputStream );

boolean idFound = false;

while (parser.hasNext()) {
    JsonParser.Event event =;
    switch(event) {
        case KEY_NAME:
            if( parser.getString().equals("id") ){
                idFound = true;
        case VALUE_STRING:
        case VALUE_NUMBER:
            if( idFound ){
                String embedCode = "<script type=\"text/javascript\" src=\"" + parser.getString()  + ".js\"></script>";
                System.out.println( embedCode );
            idFound = false;
        case START_ARRAY:
        case END_ARRAY:
        case START_OBJECT:
        case END_OBJECT:
        case VALUE_FALSE:
        case VALUE_NULL:
        case VALUE_TRUE: