Add z_soap_codec_enc_xsl
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 7 Jan 2004 21:02:42 +0000 (21:02 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 7 Jan 2004 21:02:42 +0000 (21:02 +0000)
client/client.c
include/yaz/soap.h
include/yaz/srw.h
src/seshigh.c
src/soap.c
src/zoom-c.c

index 907bf3c..f320aec 100644 (file)
@@ -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 <stdio.h>
@@ -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))
     {
index bfbc46c..46f602d 100644 (file)
@@ -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,
index 48c4f01..26f9819 100644 (file)
@@ -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
index 63e746c..8cd5d39 100644 (file)
@@ -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,
index 316cae8..2d19101 100644 (file)
@@ -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 <yaz/soap.h>
 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 =
         "<?xml version=\"1.0\"?>\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,
index af940a8..1d91746 100644 (file)
@@ -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;