2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: tstsoap2.c,v 1.4 2006-02-01 19:53:00 adam Exp $
14 #include <libxml/parser.h>
16 static void tst_srw(void)
18 const char *charset = 0;
19 char *content_buf = 0;
22 ODR o = odr_createmem(ODR_ENCODE);
23 Z_SOAP_Handler h[2] = {
24 {"http://www.loc.gov/zing/srw/", 0, (Z_SOAP_fun) yaz_srw_codec},
27 Z_SRW_PDU *sr = yaz_srw_get(o, Z_SRW_searchRetrieve_request);
28 Z_SOAP *p = odr_malloc(o, sizeof(*p));
34 sr->u.request->query.cql = "jordbær";
36 sr->u.request->query.cql = "jordbaer";
39 p->which = Z_SOAP_generic;
40 p->u.generic = odr_malloc(o, sizeof(*p->u.generic));
44 p->ns = "http://schemas.xmlsoap.org/soap/envelope/";
46 ret = z_soap_codec_enc(o, &p, &content_buf, &content_len, h, charset);
48 YAZ_CHECK(ret == 0); /* codec failed ? */
52 int main(int argc, char **argv)
54 YAZ_CHECK_INIT(argc, argv);
64 * indent-tabs-mode: nil
66 * vim: shiftwidth=4 tabstop=8 expandtab