X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=src%2Fsru_util.cpp;h=1992f9fa1f2908764582c47a5e0fda2d07e5f45d;hb=4d1c3148cb6a658fb66e99a1385cc0067b6b2938;hp=45e5823ccfb681832a20efaf392ce320d420d1c4;hpb=eebdeefb529902d0cdc2876d7aa072d64d135ddf;p=metaproxy-moved-to-github.git diff --git a/src/sru_util.cpp b/src/sru_util.cpp index 45e5823..1992f9f 100644 --- a/src/sru_util.cpp +++ b/src/sru_util.cpp @@ -1,5 +1,5 @@ /* This file is part of Metaproxy. - Copyright (C) 2005-2009 Index Data + Copyright (C) 2005-2010 Index Data Metaproxy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -17,10 +17,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "sru_util.hpp" -#include "util.hpp" - -//#include -//#include +#include #include #include @@ -158,11 +155,11 @@ bool mp_util::build_sru_explain(metaproxy_1::Package &package, bool mp_util::build_sru_response(mp::Package &package, - mp::odr &odr_en, - Z_SOAP *soap, - const Z_SRW_PDU *sru_pdu_res, - char *charset, - const char *stylesheet) + mp::odr &odr_en, + Z_SOAP *soap, + const Z_SRW_PDU *sru_pdu_res, + char *charset, + const char *stylesheet) { // SRU request package translation to Z3950 package @@ -185,7 +182,8 @@ bool mp_util::build_sru_response(mp::Package &package, //http_res->code = http_code; std::string ctype("text/xml"); - if (charset){ + if (charset) + { ctype += "; charset="; ctype += charset; } @@ -195,13 +193,10 @@ bool mp_util::build_sru_response(mp::Package &package, // packaging Z_SOAP into HTML response static Z_SOAP_Handler soap_handlers[4] = { - {"http://www.loc.gov/zing/srw/", 0, - (Z_SOAP_fun) yaz_srw_codec}, - {"http://www.loc.gov/zing/srw/v1.0/", 0, - (Z_SOAP_fun) yaz_srw_codec}, - {"http://www.loc.gov/zing/srw/update/", 0, - (Z_SOAP_fun) yaz_ucp_codec}, - {0, 0, 0} + {(char *)YAZ_XMLNS_SRU_v1_1, 0, (Z_SOAP_fun) yaz_srw_codec}, + {(char *)YAZ_XMLNS_SRU_v1_0, 0, (Z_SOAP_fun) yaz_srw_codec}, + {(char *)YAZ_XMLNS_UPDATE_v0_9, 0, (Z_SOAP_fun) yaz_ucp_codec}, + {0, 0, 0} };