-
Notifications
You must be signed in to change notification settings - Fork 74
Description
I am expecting my xquery to match OTHER type in java but it is matching to NULL type.
For simplicity I am pasting the REST query
curl -i --digest --user admin:admin -d 'xquery=xdmp:functions()[2]' -X POST 'http://localhost:8000/eval'
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Digest realm="public", qop="auth", nonce="0659dfd38f714005fd7971ac7492c67c", opaque="c3671b5e7e371ef7"
Content-Type: text/html; charset=utf-8
Server: MarkLogic
Content-Length: 209
Connection: Keep-Alive
Keep-Alive: timeout=5
HTTP/1.1 200 OK
Server: MarkLogic 8.0-20141020
Set-Cookie: TxnMode=auto; path=/
Set-Cookie: TxnID=null; path=/
Content-Type: multipart/mixed; boundary=e13ae28a865448af
Content-Length: 95
Connection: Keep-Alive
Keep-Alive: timeout=5
--e13ae28a865448af
Content-Type: text/plain
xdmp:forest-restart#1
and java code
String query1 = "xdmp:functions()[2]";
ServerEvaluationCall evl = client.newServerEval();
EvalResultIterator evr = evl.xquery(query1 ).eval();
while(evr.hasNext())
{
EvalResult er =evr.next();
if(er.getType().equals(Type.XML){
}else if(er.getType().equals(Type.NULL)){
System.out.println("Testing is empty sequence is NUll?"+er.getAs(String.class));
}else if(er.getType().equals(Type.OTHER)){
System.out.println("Testing is Others? "+er.getAs(String.class));
}
else{
}
}