Menu

#9 Simple Client not working

open
nobody
None
5
2006-05-22
2006-05-22
wtrichards
No

I have modified the simple client code so that it
matches the method signatures. The changed code is a
follows:
OIDRegister reg = OIDRegister.getRegister();
Properties p = new Properties();
p.setProperty("ServiceHost", "demo.k-int.com");
//ServiceHost" : Host to connect to
p.setProperty("ServicePort", "210");
//"ServicePort" : Port on which to connect
p.setProperty("default_record_syntax","usmarc" );
//"default_record_syntax" : Default record syntax to
ask for Authentication properties

Searchable s = new Z3950Origin();
s.init(p);

IRQuery e = new IRQuery();

e.hints = new Hashtable();
Vector collection_ids = new Vector();
e.collections = collection_ids;
collection_ids.add("Default");
e.hints.put("record_syntax", "usmarc");
e.sorting_syntax = "PREFIX";
e.query = new PrefixString("ti=Oil");

SearchTask st = (SearchTask) s.createTask(e, null);
st.evaluate(100000);

System.out.println(st.lookupPrivateStatusCode(st.getPrivateTaskStatusCode()));

On invocation the follwoing error is returned:
0 [Z3950 Search Thread demo.k-int.com] WARN
Z3950Origin - Init was not OK, not sending outstanding
queries, and failing those queries in the queue
got Incoming CLose APDU reasonCode=100 diag=Internal
close notification
Error

I have been unable to determine the what the error
actually means or how to correct. Any help would be
appreciated.
Regards
Wayne

Discussion


Log in to post a comment.