* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: proxy.h,v 1.30 2004-01-07 20:56:02 adam Exp $
+ * $Id: proxy.h,v 1.31 2004-01-07 21:29:26 adam Exp $
*/
#include <sys/time.h>
Z_APDU *m_s2z_init_apdu;
Z_APDU *m_s2z_search_apdu;
Z_APDU *m_s2z_present_apdu;
+ char *m_s2z_stylesheet;
char *m_soap_ns;
int send_to_srw_client_error(int error);
int send_to_srw_client_ok(int hits, Z_Records *records, int start);
* Copyright (c) 1998-2004, Index Data.
* See the file LICENSE for details.
*
- * $Id: yaz-proxy.cpp,v 1.81 2004-01-07 21:04:10 adam Exp $
+ * $Id: yaz-proxy.cpp,v 1.82 2004-01-07 21:29:26 adam Exp $
*/
#include <assert.h>
m_config = 0;
m_marcxml_flag = 0;
m_stylesheet_schema = 0;
+ m_s2z_stylesheet = 0;
m_schema = 0;
m_initRequest_apdu = 0;
m_initRequest_mem = 0;
soap_package->ns = m_soap_ns;
z_soap_codec_enc_xsl(o, &soap_package,
&hres->content_buf, &hres->content_len,
- soap_handlers, 0, 0);
+ soap_handlers, 0, m_s2z_stylesheet);
if (m_log_mask & PROXY_LOG_REQ_CLIENT)
{
yaz_log (LOG_LOG, "%sSending %s to client", m_session_str,
m_s2z_init_apdu = 0;
m_s2z_search_apdu = 0;
m_s2z_present_apdu = 0;
+
+ m_s2z_stylesheet = 0;
+
if (srw_pdu->which == Z_SRW_searchRetrieve_request)
{
Z_SRW_searchRetrieveRequest *srw_req = srw_pdu->u.request;
+ // save stylesheet
+ if (srw_req->stylesheet)
+ m_s2z_stylesheet =
+ odr_strdup(m_s2z_odr_init, srw_req->stylesheet);
+
// set packing for response records ..
if (srw_req->recordPacking &&
!strcmp(srw_req->recordPacking, "xml"))
else if (srw_pdu->which == Z_SRW_explain_request)
{
Z_SRW_explainRequest *srw_req = srw_pdu->u.explain_request;
-
+
+ // save stylesheet
+ if (srw_req->stylesheet)
+ m_s2z_stylesheet =
+ odr_strdup(m_s2z_odr_init, srw_req->stylesheet);
+
if (srw_req->recordPacking &&
!strcmp(srw_req->recordPacking, "xml"))
m_s2z_packing = Z_SRW_recordPacking_XML;
if (!m_client)
{
- yaz_log(LOG_LOG, "handle_incoming: initRequest");
m_s2z_init_apdu = zget_APDU(m_s2z_odr_init,
Z_APDU_initRequest);