Skip to content
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Jabber Object Access Protocol

A strophe plugin for the Jabber Object Access Protocol (XEP-0075).


Link the rpc, jid and the joap plugin below the strophe library in your HTML head section:

<!-- ... -->
<script type="text/javascript" src="strophe.min.js"></script>
<script type="text/javascript" src="jid.js"></script>
<script type="text/javascript" src="strophe.disco.js"></script>
<script type="text/javascript" src="strophe.rpc.js"></script>
<script type="text/javascript" src="strophe.joap.js"></script>
<!-- ... -->

After your client is sucessfully connected you can create, read, update and delete objects.


objectServer = new connection.joap.JOAPServer ""

# requesting the server description
objectServer.describe (iq, err, parsedDescription) ->

# requesting a class description
objectServer.describe "User", (iq, err, parsedDescription) ->

# creating a new instance
objectServer.add "User", { name:"My Name", age: 99 }, (iq, err, instanceAddress) ->

# reading an instance "User", "instanceId", (iq, err, parsedResult) ->

# reading only a few properties of an instance "User", "instanceId", ["email", "age"], (iq, err, parsedResult) ->

# modifying properties of an instance
objectServer.edit "User", "instanceId", { age: 27 }, (iq, err) ->

# deleting an instance
objectServer.delete "User", "instanceId", (iq, err) ->

# searching for instances "User", {age: 60} , (iq, err, arrayOfInstanceIDs) ->

# searching and reading in one step
objectServer.searchAndRead "User", {type: "admin"}, ["email"], (iq, err, arrayOfInstancObjects) ->

# performing a method call
objectServer.methodCall "myMethod", "User", ["param1","param2"], (iq, err, result) ->


aClass = new connection.joap.JOAPClass ""

# requesting a class description
aClass.describe (iq, err, parsedDescription) ->

# searching for class instances (iq, err, arrayOfInstanceIDs) ->

# searching and reading
aClass.searchAndRead filter, limits, (iq, err, arrayOfInstances) ->

# creating a new instance
aClass.add { aProperty:"aValue" }, (iq, err, instanceAddress) ->


obj = new connection.joap.JOAPObject ""

# modifying properties
obj.edit { key: 'value' }, (iq, err) ->


Available JOAP server implementations

Tests & specs

buster.js and buster-coffee and are required (npm install -g buster buster-coffee) for running the tests.

First start a test server

buster server

Then navigate with one or more browsers to localhost:1111 and capture them. Afterwards you can run the specs:

cake test
Something went wrong with that request. Please try again.