[SDK JAVA]: interpreting ConfServer Response

Hi,
could you kindly help me to fix below Problem?

After that I estabilished the Connection with the Server, I wrote a simple method (mentioned below) but I’m not be able to retreive di XML. I got this message “[#document: null]”

Regards
Salvatore


public void doQuery() {
KeyValueCollection filterKey = new KeyValueCollection();
filterKey.addObject(“user_name”, “XXXXXXXXX”);

 CfgObjectType objectType = CfgObjectType.CFGPerson;
 int intPerson = objectType.asInteger();
 
	
 RequestReadObjects requestFilterQuery =
 	RequestReadObjects.create(
 		intPerson,
 		filterKey);
  
 
 try {
	 Message theMessage= 	 protocol.request(requestFilterQuery);
	EventObjectsRead objectsRead =
			(EventObjectsRead) theMessage;
	System.out.println(theMessage.messageName());
	System.out.println("There are "+objectsRead.getObjectTotalCount()+ " objects of this type.");

	System.out.println(objectsRead.getConfObject().toString());

 }	catch(Exception x){
	 System.out.println("ERRORE3: "+x.getStackTrace());
		x.printStackTrace(); 
 }

}

My suggestion is to always try to use the ConfService instead of interpreting the XML. Way easier to deal with programatically. There is a post about it somewhere around the forum. I’ll check if I can find the link and update here.

Here, try something like this:

http://www.sggu.com/smf/index.php/topic,9642.0.html