Package gov.loc.www.zing.srw

Examples of gov.loc.www.zing.srw.ExplainResponseType


            URL url=new URL(urlString);
            ExplainPort explain=service.getExplainSOAP(url);
            ExplainRequestType explainRequest=new ExplainRequestType();
            explainRequest.setRecordPacking("xml");
            explainRequest.setVersion("1.1");
            ExplainResponseType explainResponse=explain.explainOperation(explainRequest);
            System.out.println("explainResponse="+explainResponse);
           
            SRWPort port=service.getSRW(url);
            ScanRequestType scanRequest=new ScanRequestType();
            scanRequest.setVersion("1.1");
View Full Code Here


            URL url=new URL(urlString);
            ExplainPort explain=service.getExplainSOAP(url);
            ExplainRequestType explainRequest=new ExplainRequestType();
            explainRequest.setRecordPacking("xml");
            explainRequest.setVersion("1.1");
            ExplainResponseType explainResponse=explain.explainOperation(explainRequest);
            System.out.println("explainResponse="+explainResponse);
           
            SRWPort port=service.getSRW(url);
            ScanRequestType scanRequest=new ScanRequestType();
            scanRequest.setVersion("1.1");
View Full Code Here

    Log log=LogFactory.getLog(ExplainSoapBindingImpl.class);

    public ExplainResponseType explainOperation(ExplainRequestType request)
      throws java.rmi.RemoteException {
        MessageContext   msgContext=MessageContext.getCurrentContext();
        ExplainResponseType response=new ExplainResponseType();
        String dbname=(String)msgContext.getProperty("dbname");
        SRWDatabase db=(SRWDatabase)msgContext.getProperty("db");
        log.info("db="+db);
        response.setVersion("1.1");
        RecordType record=new RecordType();
        record.setRecordSchema("http://explain.z3950.org/dtd/2.0/");
        StringOrXmlFragment frag=new StringOrXmlFragment();
        String recordPacking=request.getRecordPacking();
        if(recordPacking==null) {
            if(msgContext.getProperty("sru")!=null)
                recordPacking="xml"; // default for sru
            else
                recordPacking="string"; // default for srw
        }
        if(!recordPacking.equals("xml") &&
          !recordPacking.equals("string")) {
            return db.diagnostic(71, recordPacking, response);
        }
        try {
            if(recordPacking.equals("xml")) {
                record.setRecordPacking("xml");
                Document domDoc=XMLUtils.newDocument(
                    new InputSource(
                    new StringReader(db.getExplainRecord(null))));
                MessageElement elems[]=new MessageElement[1];
                elems[0]=new MessageElement(
                    domDoc.getDocumentElement());
                frag.set_any(elems);
            }
            else { // srw
                record.setRecordPacking("string");
                MessageElement elems[]=new MessageElement[1];
                elems[0]=new MessageElement();
                elems[0].addTextNode(db.getExplainRecord(null));
                frag.set_any(elems);
            }
            record.setRecordData(frag);
            response.setRecord(record);
        }
        catch(Exception e) {
            log.info(e, e);
            return null;
        }
        response.setEchoedExplainRequest(request);
        return response;
    }
View Full Code Here

//                  "http://levan-rvista.oa.oclc.org:8080/identities/search/");
            ExplainPort explain=service.getExplainSOAP(url);
            ExplainRequestType explainRequest=new ExplainRequestType();
            explainRequest.setRecordPacking("xml");
            explainRequest.setVersion("1.1");
            ExplainResponseType explainResponse=explain.explainOperation(explainRequest);
            System.out.println("explainResponse="+explainResponse);
           
            SRWPort port=service.getSRW(url);
            ScanRequestType scanRequest=new ScanRequestType();
            scanRequest.setVersion("1.1");
View Full Code Here

TOP

Related Classes of gov.loc.www.zing.srw.ExplainResponseType

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.