X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Ftstsoap2.c;fp=test%2Ftstsoap2.c;h=0000000000000000000000000000000000000000;hb=3107ce3a34993d2f784387f227a50343fff83bbc;hp=620f5f3e972320a69a88d073e8e42fe4002181d5;hpb=ed31c923f03ec124060972f5351b8b33e07a2e13;p=yaz-moved-to-github.git diff --git a/test/tstsoap2.c b/test/tstsoap2.c deleted file mode 100644 index 620f5f3..0000000 --- a/test/tstsoap2.c +++ /dev/null @@ -1,67 +0,0 @@ -/* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data - * See the file LICENSE for details. - */ - -#include -#include -#include -#include - -#if YAZ_HAVE_XML2 -#include - -static void tst_srw(void) -{ - const char *charset = 0; - char *content_buf = 0; - int content_len; - int ret; - ODR o = odr_createmem(ODR_ENCODE); - Z_SOAP_Handler h[2] = { - {"http://www.loc.gov/zing/srw/", 0, (Z_SOAP_fun) yaz_srw_codec}, - {0, 0, 0} - }; - Z_SRW_PDU *sr = yaz_srw_get(o, Z_SRW_searchRetrieve_request); - Z_SOAP *p = (Z_SOAP *) odr_malloc(o, sizeof(*p)); - - YAZ_CHECK(o); - YAZ_CHECK(sr); - YAZ_CHECK(p); -#if 0 - sr->u.request->query.cql = "jordb" "\xe6" "r"; -#else - sr->u.request->query.cql = "jordbaer"; -#endif - - p->which = Z_SOAP_generic; - p->u.generic = (Z_SOAP_Generic *) odr_malloc(o, sizeof(*p->u.generic)); - p->u.generic->no = 0; - p->u.generic->ns = 0; - p->u.generic->p = sr; - p->ns = "http://schemas.xmlsoap.org/soap/envelope/"; - - ret = z_soap_codec_enc(o, &p, &content_buf, &content_len, h, charset); - odr_destroy(o); - YAZ_CHECK(ret == 0); /* codec failed ? */ -} -#endif - -int main(int argc, char **argv) -{ - YAZ_CHECK_INIT(argc, argv); -#if YAZ_HAVE_XML2 - LIBXML_TEST_VERSION; - tst_srw(); -#endif - YAZ_CHECK_TERM; -} -/* - * Local variables: - * c-basic-offset: 4 - * c-file-style: "Stroustrup" - * indent-tabs-mode: nil - * End: - * vim: shiftwidth=4 tabstop=8 expandtab - */ -