From cdf3162d32f13fd58d0b7fb06b3252bab2bc78ad Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 7 Jan 2004 21:02:42 +0000 Subject: [PATCH] Add z_soap_codec_enc_xsl --- client/client.c | 4 ++-- include/yaz/soap.h | 13 +++++++++---- include/yaz/srw.h | 4 ++-- src/seshigh.c | 12 ++++++------ src/soap.c | 31 ++++++++++++++++++++----------- src/zoom-c.c | 8 ++++---- 6 files changed, 43 insertions(+), 29 deletions(-) diff --git a/client/client.c b/client/client.c index 907bf3c..f320aec 100644 --- a/client/client.c +++ b/client/client.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2004, Index Data * See the file LICENSE for details. * - * $Id: client.c,v 1.222 2004-01-07 20:36:44 adam Exp $ + * $Id: client.c,v 1.223 2004-01-07 21:02:42 adam Exp $ */ #include @@ -1189,7 +1189,7 @@ static int send_srw(Z_SRW_PDU *sr) ret = z_soap_codec_enc(o, &p, &gdu->u.HTTP_Request->content_buf, &gdu->u.HTTP_Request->content_len, h, - charset, 0); + charset); if (z_GDU(out, &gdu, 0, 0)) { diff --git a/include/yaz/soap.h b/include/yaz/soap.h index bfbc46c..46f602d 100644 --- a/include/yaz/soap.h +++ b/include/yaz/soap.h @@ -1,8 +1,8 @@ /* - * Copyright (c) 2002-2003, Index Data. + * Copyright (c) 2002-2004, Index Data. * See the file LICENSE for details. * - * $Id: soap.h,v 1.6 2004-01-07 20:36:44 adam Exp $ + * $Id: soap.h,v 1.7 2004-01-07 21:02:42 adam Exp $ */ #ifndef YAZ_SOAP_H @@ -50,8 +50,13 @@ YAZ_EXPORT int z_soap_codec(ODR o, Z_SOAP **pp, Z_SOAP_Handler *handlers); YAZ_EXPORT int z_soap_codec_enc(ODR o, Z_SOAP **pp, char **content_buf, int *content_len, - Z_SOAP_Handler *handlers, const char *encoding, - const char *stylesheet); + Z_SOAP_Handler *handlers, + const char *encoding); +YAZ_EXPORT int z_soap_codec_enc_xsl(ODR o, Z_SOAP **pp, + char **content_buf, int *content_len, + Z_SOAP_Handler *handlers, + const char *encoding, + const char *stylesheet); YAZ_EXPORT int z_soap_error(ODR o, Z_SOAP *p, const char *fault_code, const char *fault_string, diff --git a/include/yaz/srw.h b/include/yaz/srw.h index 48c4f01..26f9819 100644 --- a/include/yaz/srw.h +++ b/include/yaz/srw.h @@ -1,8 +1,8 @@ /* - * Copyright (c) 2002-2003, Index Data. + * Copyright (c) 2002-2004, Index Data. * See the file LICENSE for details. * - * $Id: srw.h,v 1.12 2004-01-07 20:36:44 adam Exp $ + * $Id: srw.h,v 1.13 2004-01-07 21:02:42 adam Exp $ */ #ifndef YAZ_SRW_H diff --git a/src/seshigh.c b/src/seshigh.c index 63e746c..8cd5d39 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -1,8 +1,8 @@ /* - * Copyright (c) 1995-2003, Index Data + * Copyright (c) 1995-2004, Index Data * See the file LICENSE for details. * - * $Id: seshigh.c,v 1.14 2004-01-07 20:36:44 adam Exp $ + * $Id: seshigh.c,v 1.15 2004-01-07 21:02:42 adam Exp $ */ /* @@ -835,9 +835,9 @@ static void process_http_request(association *assoc, request *req) int ret; p = z_get_HTTP_Response(o, 200); hres = p->u.HTTP_Response; - ret = z_soap_codec_enc(assoc->encode, &soap_package, - &hres->content_buf, &hres->content_len, - soap_handlers, charset, stylesheet); + ret = z_soap_codec_enc_xsl(assoc->encode, &soap_package, + &hres->content_buf, &hres->content_len, + soap_handlers, charset, stylesheet); hres->code = http_code; strcpy(ctype, "text/xml"); @@ -1274,7 +1274,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) assoc->init->implementation_name, odr_prepend(assoc->encode, "GFS", resp->implementationName)); - version = odr_strdup(assoc->encode, "$Revision: 1.14 $"); + version = odr_strdup(assoc->encode, "$Revision: 1.15 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; resp->implementationVersion = odr_prepend(assoc->encode, diff --git a/src/soap.c b/src/soap.c index 316cae8..2d19101 100644 --- a/src/soap.c +++ b/src/soap.c @@ -2,7 +2,7 @@ * Copyright (c) 2002-2004, Index Data. * See the file LICENSE for details. * - * $Id: soap.c,v 1.5 2004-01-07 20:36:44 adam Exp $ + * $Id: soap.c,v 1.6 2004-01-07 21:02:42 adam Exp $ */ #include @@ -14,11 +14,11 @@ static const char *soap_v1_1 = "http://schemas.xmlsoap.org/soap/envelope/"; static const char *soap_v1_2 = "http://www.w3.org/2001/06/soap-envelope"; -int z_soap_codec_enc(ODR o, Z_SOAP **pp, - char **content_buf, int *content_len, - Z_SOAP_Handler *handlers, - const char *encoding, - const char *stylesheet) +int z_soap_codec_enc_xsl(ODR o, Z_SOAP **pp, + char **content_buf, int *content_len, + Z_SOAP_Handler *handlers, + const char *encoding, + const char *stylesheet) { if (o->direction == ODR_DECODE) { @@ -232,10 +232,10 @@ int z_soap_codec_enc(ODR o, Z_SOAP **pp, return 0; } #else -int z_soap_codec_enc(ODR o, Z_SOAP **pp, - char **content_buf, int *content_len, - Z_SOAP_Handler *handlers, const char *encoding, - const char *stylesheet) +int z_soap_codec_enc_xsl(ODR o, Z_SOAP **pp, + char **content_buf, int *content_len, + Z_SOAP_Handler *handlers, const char *encoding, + const char *stylesheet) { static char *err_xml = "\n" @@ -257,11 +257,20 @@ int z_soap_codec_enc(ODR o, Z_SOAP **pp, return -1; } #endif +int z_soap_codec_enc(ODR o, Z_SOAP **pp, + char **content_buf, int *content_len, + Z_SOAP_Handler *handlers, + const char *encoding) +{ + return z_soap_codec_enc_xsl(o, pp, content_buf, content_len, handlers, + encoding, 0); +} + int z_soap_codec(ODR o, Z_SOAP **pp, char **content_buf, int *content_len, Z_SOAP_Handler *handlers) { - return z_soap_codec_enc(o, pp, content_buf, content_len, handlers, 0, 0); + return z_soap_codec_enc(o, pp, content_buf, content_len, handlers, 0); } int z_soap_error(ODR o, Z_SOAP *p, diff --git a/src/zoom-c.c b/src/zoom-c.c index af940a8..1d91746 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -1,8 +1,8 @@ /* - * Copyright (c) 2000-2003, Index Data + * Copyright (c) 2000-2004, Index Data * See the file LICENSE for details. * - * $Id: zoom-c.c,v 1.16 2004-01-07 20:36:44 adam Exp $ + * $Id: zoom-c.c,v 1.17 2004-01-07 21:02:42 adam Exp $ * * ZOOM layer for C, connections, result sets, queries. */ @@ -918,7 +918,7 @@ static zoom_ret ZOOM_connection_send_init (ZOOM_connection c) ZOOM_options_get(c->options, "implementationName"), odr_prepend(c->odr_out, "ZOOM-C", ireq->implementationName)); - version = odr_strdup(c->odr_out, "$Revision: 1.16 $"); + version = odr_strdup(c->odr_out, "$Revision: 1.17 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; ireq->implementationVersion = odr_prepend(c->odr_out, @@ -1059,7 +1059,7 @@ static zoom_ret send_srw (ZOOM_connection c, Z_SRW_PDU *sr) ret = z_soap_codec_enc(o, &p, &gdu->u.HTTP_Request->content_buf, &gdu->u.HTTP_Request->content_len, h, - c->charset, 0); + c->charset); if (!z_GDU(c->odr_out, &gdu, 0, 0)) return zoom_complete; -- 1.7.10.4