* Copyright (c) 2002-2003, Index Data.
* See the file LICENSE for details.
*
- * $Id: soap.c,v 1.2 2003-02-14 18:49:24 adam Exp $
+ * $Id: soap.c,v 1.3 2003-02-17 14:35:42 adam Exp $
*/
#include <yaz/soap.h>
/* check that root node is Envelope */
ptr = xmlDocGetRootElement(doc);
if (!ptr || ptr->type != XML_ELEMENT_NODE ||
- strcmp(ptr->name, "Envelope"))
+ strcmp(ptr->name, "Envelope") || !ptr->ns)
{
xmlFreeDoc(doc);
return z_soap_error(o, p, "SOAP-ENV:Client",
envelope_ptr = xmlNewNode(0, "Envelope");
ns_env = xmlNewNs(envelope_ptr, p->ns, "SOAP-ENV");
+ xmlSetNs(envelope_ptr, ns_env);
+
body_ptr = xmlNewChild(envelope_ptr, ns_env, "Body", 0);
xmlDocSetRootElement(doc, envelope_ptr);