- if (encoding)
- xmlDocDumpMemoryEnc(doc, &buf_out, &len_out, encoding);
- else
- xmlDocDumpMemory(doc, &buf_out, &len_out);
- *content_buf = (char *) odr_malloc(o, len_out);
- *content_len = len_out;
- memcpy(*content_buf, buf_out, len_out);
- xmlFree(buf_out);
+ if (p->which == Z_SOAP_generic && !strcmp(p->ns, "SRU"))
+ {
+ xmlDocSetRootElement(doc, body_ptr->children);
+ }
+ if (1)
+ {
+ xmlChar *buf_out;
+ int len_out;
+ if (encoding)
+ xmlDocDumpMemoryEnc(doc, &buf_out, &len_out, encoding);
+ else
+ xmlDocDumpMemory(doc, &buf_out, &len_out);
+ *content_buf = (char *) odr_malloc(o, len_out);
+ *content_len = len_out;
+ memcpy(*content_buf, buf_out, len_out);
+ xmlFree(buf_out);
+ }