//Allocate mem for valueOperandPtr->u.value.u.charVal - //which holds an XML string to be sent out to the external service sdiRequest=(char *)malloc(strlen(valueOperandPtr->u.value.u.charVal)+1); /* NOTE : Had to add "<" in front of the XML value sent in from the form as the value of the search since Remedy strips the leading <. Most likely thinking it was an operator*/ sprintf(sdiRequest,"<%s",valueOperandPtr->u.value.u.charVal); len=strlen(sdiRequest); sdiRequestDoc = xmlReadMemory(sdiRequest, len, "noname0.xml", NULL, 0); if (doc == NULL) { free(sdiRequest); return AddErrorMessage(status, AR_RETURN_ERROR, PLUGIN_ERROR_GENERIC, "Request sent in is not a well formed XML"); } Request(); iInitRun=0; sdiRequest=talker(sdiRequest); Release(); ARPluginLogging(AR_PLUGIN_LOG_INFO, "Eval"); if (sdiRequest == NULL) { free(sdiRequest); return AddErrorMessage(status, AR_RETURN_ERROR, PLUGIN_ERROR_GENERIC, "No Output from SDI"); } /* * The document being in memory, it has no base per RFC 2396, * and the argument - "noname.xml" will serve as its base. */ len = strlen(sdiRequest); xmlFreeDoc(sdiRequestDoc); ARPluginLogging(AR_PLUGIN_LOG_INFO, "After len - %d\n",len); doc = xmlReadMemory(sdiRequest, len, "noname1.xml", NULL, 0); ARPluginLogging(AR_PLUGIN_LOG_INFO, "After doc\n");