Package org.exist.soap

Examples of org.exist.soap.Query


*/
public class GetDocument {

    public static void main( String[] args ) throws Exception {
        QueryService service = new QueryServiceLocator();
        Query query = service.getQuery();
    String session = query.connect("guest", "guest");
       
    byte[] data = query.getResourceData(session,
        XmldbURI.ROOT_COLLECTION + "/shakespeare/plays/hamlet.xml",
      true, false, false);
    System.out.println(new String(data, "UTF-8"));
    query.disconnect(session);
    }
View Full Code Here


   
    public static void main( String[] args ) throws Exception {
        AdminService adminService = new AdminServiceLocator();
        Admin admin = adminService.getAdmin();
        QueryService queryService = new QueryServiceLocator();
        Query query = queryService.getQuery();
       
    String session = admin.connect("guest", "guest");
    admin.store(session, document.getBytes(UTF_8), "UTF-8", XmldbURI.ROOT_COLLECTION + "/test/notes.xml", true);
    admin.xupdateResource(session, XmldbURI.ROOT_COLLECTION + "/test/notes.xml", xupdate);
   
    String data = query.getResource(session,
        XmldbURI.ROOT_COLLECTION + "/test/notes.xml",
      true, true);
    System.out.println(data);
    admin.disconnect(session);
    }
View Full Code Here

TOP

Related Classes of org.exist.soap.Query

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.