ifmap message type is known
This commit is contained in:
@@ -104,8 +104,7 @@ METHOD(tnc_ifmap2_soap_t, newSession, bool,
|
|||||||
xmlSetNs(request, this->ns);
|
xmlSetNs(request, this->ns);
|
||||||
|
|
||||||
soap_msg = tnc_ifmap2_soap_msg_create(this->tls);
|
soap_msg = tnc_ifmap2_soap_msg_create(this->tls);
|
||||||
if (!soap_msg->post(soap_msg, "newSession", request,
|
if (!soap_msg->post(soap_msg, request, "newSessionResult", &result))
|
||||||
"newSessionResult", &result))
|
|
||||||
{
|
{
|
||||||
soap_msg->destroy(soap_msg);
|
soap_msg->destroy(soap_msg);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -143,8 +142,7 @@ METHOD(tnc_ifmap2_soap_t, purgePublisher, bool,
|
|||||||
xmlNewProp(request, "ifmap-publisher-id", this->ifmap_publisher_id);
|
xmlNewProp(request, "ifmap-publisher-id", this->ifmap_publisher_id);
|
||||||
|
|
||||||
soap_msg = tnc_ifmap2_soap_msg_create(this->tls);
|
soap_msg = tnc_ifmap2_soap_msg_create(this->tls);
|
||||||
success = soap_msg->post(soap_msg, "purgePublisher", request,
|
success = soap_msg->post(soap_msg, request, "purgePublisherReceived", NULL);
|
||||||
"purgePublisherReceived", NULL);
|
|
||||||
soap_msg->destroy(soap_msg);
|
soap_msg->destroy(soap_msg);
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
@@ -270,8 +268,7 @@ METHOD(tnc_ifmap2_soap_t, publish_device_ip, bool,
|
|||||||
xmlAddChild(update, create_metadata(this, "device-ip"));
|
xmlAddChild(update, create_metadata(this, "device-ip"));
|
||||||
|
|
||||||
soap_msg = tnc_ifmap2_soap_msg_create(this->tls);
|
soap_msg = tnc_ifmap2_soap_msg_create(this->tls);
|
||||||
success = soap_msg->post(soap_msg, "publish", request,
|
success = soap_msg->post(soap_msg, request, "publishReceived", NULL);
|
||||||
"publishReceived", NULL);
|
|
||||||
soap_msg->destroy(soap_msg);
|
soap_msg->destroy(soap_msg);
|
||||||
|
|
||||||
return success;
|
return success;
|
||||||
|
|||||||
@@ -146,8 +146,8 @@ static xmlNodePtr find_child(xmlNodePtr parent, const xmlChar* name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
METHOD(tnc_ifmap2_soap_msg_t, post, bool,
|
METHOD(tnc_ifmap2_soap_msg_t, post, bool,
|
||||||
private_tnc_ifmap2_soap_msg_t *this, char *request_name, xmlNodePtr request,
|
private_tnc_ifmap2_soap_msg_t *this, xmlNodePtr request, char *result_name,
|
||||||
char *result_name, xmlNodePtr *result)
|
xmlNodePtr *result)
|
||||||
{
|
{
|
||||||
xmlDocPtr doc;
|
xmlDocPtr doc;
|
||||||
xmlNodePtr env, body, cur, response;
|
xmlNodePtr env, body, cur, response;
|
||||||
@@ -156,7 +156,7 @@ METHOD(tnc_ifmap2_soap_msg_t, post, bool,
|
|||||||
int len;
|
int len;
|
||||||
chunk_t in, out;
|
chunk_t in, out;
|
||||||
|
|
||||||
DBG2(DBG_TNC, "sending ifmap %s", request_name);
|
DBG2(DBG_TNC, "sending ifmap %s", request->name);
|
||||||
|
|
||||||
/* Generate XML Document containing SOAP Envelope */
|
/* Generate XML Document containing SOAP Envelope */
|
||||||
doc = xmlNewDoc("1.0");
|
doc = xmlNewDoc("1.0");
|
||||||
|
|||||||
@@ -36,13 +36,11 @@ struct tnc_ifmap2_soap_msg_t {
|
|||||||
/**
|
/**
|
||||||
* Post an IF-MAP request in a SOAP-XML message and return a result
|
* Post an IF-MAP request in a SOAP-XML message and return a result
|
||||||
*
|
*
|
||||||
* @param request_name name of the IF-MAP request
|
|
||||||
* @param request XML-encoded IF-MAP request
|
* @param request XML-encoded IF-MAP request
|
||||||
* @param result_name name of the IF-MAP result
|
* @param result_name name of the IF-MAP result
|
||||||
* @param result XML-encoded IF-MAP result
|
* @param result XML-encoded IF-MAP result
|
||||||
*/
|
*/
|
||||||
bool (*post)(tnc_ifmap2_soap_msg_t *this,
|
bool (*post)(tnc_ifmap2_soap_msg_t *this, xmlNodePtr request,
|
||||||
char *request_name, xmlNodePtr request,
|
|
||||||
char *result_name, xmlNodePtr* result);
|
char *result_name, xmlNodePtr* result);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user