I am creating an inputsource stream from the xml string using,

 MemBufInputSource *memBufIS = new MemBufInputSource((const XMLByte *)
request, (sizeof(char) * strlen(request)), gSystemId, false);
 
then my code piece goes like this,

bool hasErrors = false;
  try {
  SA_Parser->parse(*memBufIS);
  }
  catch(const XMLException& e)
  {
     DOMString dom_str = DOMString(e.getMessage());
     char *str_val = dom_str.transcode();
 
lm_message(LM_VERBOSE,GetProgramName(),SVC_PARSE_ERROR,"SA_ParseXmlMessage",
-1," %d Er
ror during Message Parsing: %s ",
                __LINE__ , str_val);
     free(str_val);
     hasErrors = true;

  }
  catch(...)
  {
    hasErrors = true;
  }
  if(!hasErrors)
  {
    DOM_Document doc = SA_Parser->getDocument();
    ret_doc = doc;
  }
  else
  {
    *response = SAFaultError(SVC_PARSE_ERROR, "NONE", FaultActor);
    DOM_Document errDoc;
    ret_doc = errDoc;
  }

Should i need to delete memBufIS , before returning from this function?

Thanks
Arun

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to