Database Reference
In-Depth Information
Shows the name of the Java function in eXist that we are calling—that is, exist
sAndCanOpenCollection
Shows that we are sending a single parameter value to the function—that is, /db
From the preceding Wireshark output we can infer that we are calling a function
(also known as a method) in eXist using XML-RPC. That function will check for the
existence of the collection /db in the database and verify that the authenticated user
has permission to open that collection.
Let's now look at the response to that request sent back to the client from eXist:
HTTP/1.1 200 OK
Date: Wed, 08 May 2013 10:31:16 GMT
Set-Cookie: JSESSIONID=omg0pkl0xdvf1i26iv33z86r1;Path=/exist
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Length: 287
Content-Type: text/xml
Server: Jetty(8.1.9.v20130131)
<?xml version="1.0" encoding="UTF-8"?>
<methodResponse xmlns:ex="http://ws.apache.org/xmlrpc/namespaces/extensions">
<params>
<param>
<value>
<boolean>1</boolean>
</value>
</param>
</params>
</methodResponse>
Shows that our request was successful ( 200 OK )
Shows that we are receiving just XML in the body of the response, which is
exactly what we would expect for XML-RPC
Shows that the function we called returned a single parameter whose Boolean
value is 1 —that is, true
From the preceding Wireshark output we can infer both that our function call was
successful and that our function returned a positive result for the parameters pro‐
vided to it. In this case, that means that the /db collection does indeed exist and that
our authenticated user has permission to read that collection.
Let's compare this to the Java definition of the existsAndCanOpenCollection func‐
tion in eXist's XML-RPC API that was just called by our XML-RPC request:
/**
* Determines whether a Collection exists in the database
Search WWH ::




Custom Search