2 * Copyright (C) 1995-2005, Index Data ApS
3 * See the file LICENSE for details.
5 * $Id: tstsoap2.c,v 1.2 2005-06-25 15:46:07 adam Exp $
10 #include <libxml/parser.h>
15 static void tst_srw(void)
17 const char *charset = 0;
18 char *content_buf = 0;
21 ODR o = odr_createmem(ODR_ENCODE);
22 Z_SOAP_Handler h[2] = {
23 {"http://www.loc.gov/zing/srw/", 0, (Z_SOAP_fun) yaz_srw_codec},
26 Z_SRW_PDU *sr = yaz_srw_get(o, Z_SRW_searchRetrieve_request);
27 Z_SOAP *p = odr_malloc(o, sizeof(*p));
30 sr->u.request->query.cql = "jordbær";
32 sr->u.request->query.cql = "jordbaer";
35 p->which = Z_SOAP_generic;
36 p->u.generic = odr_malloc(o, sizeof(*p->u.generic));
40 p->ns = "http://schemas.xmlsoap.org/soap/envelope/";
42 ret = z_soap_codec_enc(o, &p, &content_buf, &content_len, h, charset);
46 printf("z_soap_codec_enc failed\n");
52 int main(int argc, char **argv)
66 * indent-tabs-mode: nil
68 * vim: shiftwidth=4 tabstop=8 expandtab