1 /* This file is part of the YAZ toolkit.
2 * Copyright (C) 1995-2011 Index Data
3 * See the file LICENSE for details.
15 #include <libxml/parser.h>
17 static void tst_srw(void)
19 const char *charset = 0;
20 char *content_buf = 0;
23 ODR o = odr_createmem(ODR_ENCODE);
24 Z_SOAP_Handler h[2] = {
25 {"http://www.loc.gov/zing/srw/", 0, (Z_SOAP_fun) yaz_srw_codec},
28 Z_SRW_PDU *sr = yaz_srw_get(o, Z_SRW_searchRetrieve_request);
29 Z_SOAP *p = (Z_SOAP *) odr_malloc(o, sizeof(*p));
35 sr->u.request->query.cql = "jordb" "\xe6" "r";
37 sr->u.request->query.cql = "jordbaer";
40 p->which = Z_SOAP_generic;
41 p->u.generic = (Z_SOAP_Generic *) odr_malloc(o, sizeof(*p->u.generic));
45 p->ns = "http://schemas.xmlsoap.org/soap/envelope/";
47 ret = z_soap_codec_enc(o, &p, &content_buf, &content_len, h, charset);
49 YAZ_CHECK(ret == 0); /* codec failed ? */
53 int main(int argc, char **argv)
55 YAZ_CHECK_INIT(argc, argv);
65 * c-file-style: "Stroustrup"
66 * indent-tabs-mode: nil
68 * vim: shiftwidth=4 tabstop=8 expandtab