* Copyright (c) 1995-2004, Index Data
* See the file LICENSE for details.
*
- * $Id: seshigh.c,v 1.18 2004-01-23 18:16:07 adam Exp $
+ * $Id: seshigh.c,v 1.23 2004-03-29 15:09:14 adam Exp $
*/
/*
ce = yaz_set_proposal_charneg(assoc->decode, &encoding, 1, 0, 0, 1);
assoc->init->charneg_request = ce->u.charNeg3;
#endif
+ assoc->backend = 0;
if (!(binitres = (*cb->bend_init)(assoc->init)))
{
yaz_log(LOG_WARN, "Bad response from backend.");
srw_res->num_diagnostics = 1;
srw_res->diagnostics = (Z_SRW_diagnostic *)
odr_malloc(assoc->encode, sizeof(*srw_res->diagnostics));
- srw_res->diagnostics[0].code =
- odr_intdup(assoc->encode, srw_error);
- srw_res->diagnostics[0].details = 0;
+ yaz_mk_std_diagnostic(assoc->encode,
+ srw_res->diagnostics, srw_error, 0);
return;
}
srw_res->num_diagnostics = 1;
srw_res->diagnostics = (Z_SRW_diagnostic *)
odr_malloc(assoc->encode, sizeof(*srw_res->diagnostics));
- srw_res->diagnostics[0].code =
- odr_intdup(assoc->encode,
- yaz_diag_bib1_to_srw (rr.errcode));
- srw_res->diagnostics[0].details = rr.errstring;
- yaz_log(LOG_DEBUG, "srw_bend_search returned SRW error %d",
- *srw_res->diagnostics[0].code);
-
+ yaz_mk_std_diagnostic(assoc->encode, srw_res->diagnostics,
+ yaz_diag_bib1_to_srw (rr.errcode),
+ rr.errstring);
+ yaz_log(LOG_DEBUG, "srw_bend_search returned SRW error %s",
+ srw_res->diagnostics[0].uri);
}
else
{
srw_res->diagnostics = (Z_SRW_diagnostic *)
odr_malloc(assoc->encode,
sizeof(*srw_res->diagnostics));
- srw_res->diagnostics[0].code =
- odr_intdup(assoc->encode,
- yaz_diag_bib1_to_srw (errcode));
- srw_res->diagnostics[0].details = rr.errstring;
+
+ yaz_mk_std_diagnostic(assoc->encode,
+ srw_res->diagnostics,
+ yaz_diag_bib1_to_srw (errcode),
+ rr.errstring);
break;
}
if (srw_res->records[j].recordData_buf)
rr.print = assoc->print;
rr.explain_buf = 0;
rr.database = srw_req->database;
+ rr.schema = "http://explain.z3950.org/dtd/2.0/";
(*assoc->init->bend_explain)(assoc->backend, &rr);
if (rr.explain_buf)
{
}
else
{
+ yaz_log(LOG_LOG, "generate soap error");
http_code = 500;
z_soap_error(assoc->encode, soap_package,
"SOAP-ENV:Client", "Bad method", 0);
assoc->init->charneg_request = negotiation;
}
+ assoc->backend = 0;
if (!(binitres = (*cb->bend_init)(assoc->init)))
{
yaz_log(LOG_WARN, "Bad response from backend.");
assoc->init->implementation_name,
odr_prepend(assoc->encode, "GFS", resp->implementationName));
- version = odr_strdup(assoc->encode, "$Revision: 1.18 $");
+ version = odr_strdup(assoc->encode, "$Revision: 1.23 $");
if (strlen(version) > 10) /* check for unexpanded CVS strings */
version[strlen(version)-2] = '\0';
resp->implementationVersion = odr_prepend(assoc->encode,
e->which = Z_DiagnosticFormat_s_defaultDiagRec;
e->u.defaultDiagRec = justdiag(odr, error, addinfo);
+ e->message = 0;
return x;
}