1 /* This file is part of the YAZ toolkit.
2 * Copyright (C) 1995-2009 Index Data
3 * See the file LICENSE for details.
12 #include <libxml/parser.h>
14 static void tst_srw(void)
16 const char *charset = 0;
17 char *content_buf = 0;
20 ODR o = odr_createmem(ODR_ENCODE);
21 Z_SOAP_Handler h[2] = {
22 {"http://www.loc.gov/zing/srw/", 0, (Z_SOAP_fun) yaz_srw_codec},
25 Z_SRW_PDU *sr = yaz_srw_get(o, Z_SRW_searchRetrieve_request);
26 Z_SOAP *p = (Z_SOAP *) odr_malloc(o, sizeof(*p));
32 sr->u.request->query.cql = "jordb" "\xe6" "r";
34 sr->u.request->query.cql = "jordbaer";
37 p->which = Z_SOAP_generic;
38 p->u.generic = (Z_SOAP_Generic *) odr_malloc(o, sizeof(*p->u.generic));
42 p->ns = "http://schemas.xmlsoap.org/soap/envelope/";
44 ret = z_soap_codec_enc(o, &p, &content_buf, &content_len, h, charset);
46 YAZ_CHECK(ret == 0); /* codec failed ? */
50 int main(int argc, char **argv)
52 YAZ_CHECK_INIT(argc, argv);
62 * c-file-style: "Stroustrup"
63 * indent-tabs-mode: nil
65 * vim: shiftwidth=4 tabstop=8 expandtab