Fix SOAP request functions name.
Add check WTP session into capwap echo request
This commit is contained in:
parent
08a8af0a70
commit
3465879b3e
@ -133,7 +133,7 @@ static struct ac_soap_response* ac_dfa_state_configure_parsing_request(struct ac
|
|||||||
ac_base64_string_encode(jsonmessage, base64confstatus);
|
ac_base64_string_encode(jsonmessage, base64confstatus);
|
||||||
|
|
||||||
/* Send message */
|
/* Send message */
|
||||||
response = ac_soap_configurestatusevent(session, session->wtpid, base64confstatus);
|
response = ac_soap_configurestatuswtpsession(session, session->wtpid, base64confstatus);
|
||||||
|
|
||||||
/* Free JSON */
|
/* Free JSON */
|
||||||
json_object_put(jsonparam);
|
json_object_put(jsonparam);
|
||||||
|
@ -73,7 +73,7 @@ static struct ac_soap_response* ac_dfa_state_datacheck_parsing_request(struct ac
|
|||||||
ac_base64_string_encode(jsonmessage, base64confstatus);
|
ac_base64_string_encode(jsonmessage, base64confstatus);
|
||||||
|
|
||||||
/* Send message */
|
/* Send message */
|
||||||
response = ac_soap_changestateevent(session, session->wtpid, base64confstatus);
|
response = ac_soap_changestatewtpsession(session, session->wtpid, base64confstatus);
|
||||||
|
|
||||||
/* Free JSON */
|
/* Free JSON */
|
||||||
json_object_put(jsonparam);
|
json_object_put(jsonparam);
|
||||||
@ -245,7 +245,7 @@ int ac_dfa_state_datacheck_to_run(struct ac_session_t* session, struct capwap_pa
|
|||||||
/* Capwap handshake complete, notify event to backend */
|
/* Capwap handshake complete, notify event to backend */
|
||||||
if (result) {
|
if (result) {
|
||||||
result = 0;
|
result = 0;
|
||||||
response = ac_soap_runningevent(session, session->wtpid);
|
response = ac_soap_runningwtpsession(session, session->wtpid);
|
||||||
if (response) {
|
if (response) {
|
||||||
if (response->responsecode == HTTP_RESULT_OK) {
|
if (response->responsecode == HTTP_RESULT_OK) {
|
||||||
result = 1;
|
result = 1;
|
||||||
|
@ -295,7 +295,7 @@ static struct ac_soap_response* ac_dfa_state_join_parsing_request(struct ac_sess
|
|||||||
ac_base64_string_encode(jsonmessage, base64confstatus);
|
ac_base64_string_encode(jsonmessage, base64confstatus);
|
||||||
|
|
||||||
/* Send message */
|
/* Send message */
|
||||||
response = ac_soap_joinevent(session, session->wtpid, base64confstatus);
|
response = ac_soap_joinwtpsession(session, session->wtpid, base64confstatus);
|
||||||
|
|
||||||
/* Free JSON */
|
/* Free JSON */
|
||||||
json_object_put(jsonparam);
|
json_object_put(jsonparam);
|
||||||
@ -632,7 +632,7 @@ int ac_dfa_state_join(struct ac_session_t* session, struct capwap_parsed_packet*
|
|||||||
wtpid = ac_get_printable_wtpid(wtpboarddata);
|
wtpid = ac_get_printable_wtpid(wtpboarddata);
|
||||||
if (wtpid && !ac_has_wtpid(wtpid)) {
|
if (wtpid && !ac_has_wtpid(wtpid)) {
|
||||||
/* Request authorization of Backend for complete join */
|
/* Request authorization of Backend for complete join */
|
||||||
response = ac_soap_authorizejoin(session, wtpid);
|
response = ac_soap_authorizewtpsession(session, wtpid);
|
||||||
if (response) {
|
if (response) {
|
||||||
resultcode.code = ac_dfa_state_join_check_authorizejoin(session, response);
|
resultcode.code = ac_dfa_state_join_check_authorizejoin(session, response);
|
||||||
ac_soapclient_free_response(response);
|
ac_soapclient_free_response(response);
|
||||||
|
@ -5,12 +5,31 @@
|
|||||||
|
|
||||||
/* */
|
/* */
|
||||||
static int receive_echo_request(struct ac_session_t* session, struct capwap_parsed_packet* packet) {
|
static int receive_echo_request(struct ac_session_t* session, struct capwap_parsed_packet* packet) {
|
||||||
|
int validsession = 0;
|
||||||
|
struct ac_soap_response* response;
|
||||||
struct capwap_header_data capwapheader;
|
struct capwap_header_data capwapheader;
|
||||||
struct capwap_packet_txmng* txmngpacket;
|
struct capwap_packet_txmng* txmngpacket;
|
||||||
|
|
||||||
ASSERT(session != NULL);
|
ASSERT(session != NULL);
|
||||||
ASSERT(packet != NULL);
|
ASSERT(packet != NULL);
|
||||||
|
|
||||||
|
/* Check session */
|
||||||
|
response = ac_soap_checkwtpsession(session, session->wtpid);
|
||||||
|
if (response) {
|
||||||
|
if ((response->responsecode == HTTP_RESULT_OK) && response->xmlResponseReturn) {
|
||||||
|
xmlChar* xmlResult = xmlNodeGetContent(response->xmlResponseReturn);
|
||||||
|
if (!xmlStrcmp(xmlResult, (const xmlChar *)"true")) {
|
||||||
|
validsession = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ac_soapclient_free_response(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!validsession) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Create response */
|
/* Create response */
|
||||||
capwap_header_init(&capwapheader, CAPWAP_RADIOID_NONE, GET_WBID_HEADER(packet->rxmngpacket->header));
|
capwap_header_init(&capwapheader, CAPWAP_RADIOID_NONE, GET_WBID_HEADER(packet->rxmngpacket->header));
|
||||||
txmngpacket = capwap_packet_txmng_create_ctrl_message(&capwapheader, CAPWAP_ECHO_RESPONSE, packet->rxmngpacket->ctrlmsg.seq, session->mtu);
|
txmngpacket = capwap_packet_txmng_create_ctrl_message(&capwapheader, CAPWAP_ECHO_RESPONSE, packet->rxmngpacket->ctrlmsg.seq, session->mtu);
|
||||||
|
@ -10,7 +10,7 @@ int ac_dfa_state_teardown(struct ac_session_t* session, struct capwap_parsed_pac
|
|||||||
|
|
||||||
// Notify teardown session
|
// Notify teardown session
|
||||||
if (session->wtpid) {
|
if (session->wtpid) {
|
||||||
struct ac_soap_response* response = ac_soap_teardownevent(session, session->wtpid);
|
struct ac_soap_response* response = ac_soap_teardownwtpsession(session, session->wtpid);
|
||||||
if (response) {
|
if (response) {
|
||||||
ac_soapclient_free_response(response);
|
ac_soapclient_free_response(response);
|
||||||
}
|
}
|
||||||
|
@ -138,11 +138,12 @@ int ac_dfa_state_dead(struct ac_session_t* session, struct capwap_parsed_packet*
|
|||||||
|
|
||||||
/* Soap function */
|
/* Soap function */
|
||||||
struct ac_soap_response* ac_session_send_soap_request(struct ac_session_t* session, char* method, int numparam, ...);
|
struct ac_soap_response* ac_session_send_soap_request(struct ac_session_t* session, char* method, int numparam, ...);
|
||||||
#define ac_soap_authorizejoin(s, wtpid) ac_session_send_soap_request((s), "authorizeJoin", 1, "xs:string", "idwtp", wtpid)
|
#define ac_soap_authorizewtpsession(s, wtpid) ac_session_send_soap_request((s), "authorizeWTPSession", 1, "xs:string", "idwtp", wtpid)
|
||||||
#define ac_soap_joinevent(s, wtpid, joinparam) ac_session_send_soap_request((s), "joinEvent", 2, "xs:string", "idwtp", wtpid, "xs:base64Binary", "join", joinparam)
|
#define ac_soap_joinwtpsession(s, wtpid, joinparam) ac_session_send_soap_request((s), "joinWTPSession", 2, "xs:string", "idwtp", wtpid, "xs:base64Binary", "join", joinparam)
|
||||||
#define ac_soap_configurestatusevent(s, wtpid, confstatusparam) ac_session_send_soap_request((s), "configureStatusEvent", 2, "xs:string", "idwtp", wtpid, "xs:base64Binary", "confstatus", confstatusparam)
|
#define ac_soap_configurestatuswtpsession(s, wtpid, confstatusparam) ac_session_send_soap_request((s), "configureStatusWTPSession", 2, "xs:string", "idwtp", wtpid, "xs:base64Binary", "confstatus", confstatusparam)
|
||||||
#define ac_soap_changestateevent(s, wtpid, changestateparam) ac_session_send_soap_request((s), "changeStateEvent", 2, "xs:string", "idwtp", wtpid, "xs:base64Binary", "changestate", changestateparam)
|
#define ac_soap_changestatewtpsession(s, wtpid, changestateparam) ac_session_send_soap_request((s), "changeStateWTPSession", 2, "xs:string", "idwtp", wtpid, "xs:base64Binary", "changestate", changestateparam)
|
||||||
#define ac_soap_runningevent(s, wtpid) ac_session_send_soap_request((s), "runningEvent", 1, "xs:string", "idwtp", wtpid)
|
#define ac_soap_runningwtpsession(s, wtpid) ac_session_send_soap_request((s), "runningWTPSession", 1, "xs:string", "idwtp", wtpid)
|
||||||
#define ac_soap_teardownevent(s, wtpid) ac_session_send_soap_request((s), "teardownEvent", 1, "xs:string", "idwtp", wtpid)
|
#define ac_soap_teardownwtpsession(s, wtpid) ac_session_send_soap_request((s), "teardownWTPSession", 1, "xs:string", "idwtp", wtpid)
|
||||||
|
#define ac_soap_checkwtpsession(s, wtpid) ac_session_send_soap_request((s), "checkWTPSession", 1, "xs:string", "idwtp", wtpid)
|
||||||
|
|
||||||
#endif /* __AC_SESSION_HEADER__ */
|
#endif /* __AC_SESSION_HEADER__ */
|
||||||
|
@ -22,49 +22,56 @@
|
|||||||
<wsdl:message name="waitBackendEventResponse">
|
<wsdl:message name="waitBackendEventResponse">
|
||||||
<wsdl:part name="return" type="xs:string"/>
|
<wsdl:part name="return" type="xs:string"/>
|
||||||
</wsdl:message>
|
</wsdl:message>
|
||||||
<wsdl:message name="authorizeJoin">
|
<wsdl:message name="authorizeWTPSession">
|
||||||
<wsdl:part name="idsession" type="xs:string"/>
|
<wsdl:part name="idsession" type="xs:string"/>
|
||||||
<wsdl:part name="idwtp" type="xs:string"/>
|
<wsdl:part name="idwtp" type="xs:string"/>
|
||||||
</wsdl:message>
|
</wsdl:message>
|
||||||
<wsdl:message name="authorizeJoinResponse">
|
<wsdl:message name="authorizeWTPSessionResponse">
|
||||||
<wsdl:part name="return" type="xs:boolean"/>
|
<wsdl:part name="return" type="xs:boolean"/>
|
||||||
</wsdl:message>
|
</wsdl:message>
|
||||||
<wsdl:message name="waitBackendEventFault"/>
|
<wsdl:message name="waitBackendEventFault"/>
|
||||||
<wsdl:message name="authorizeJoinFault"/>
|
<wsdl:message name="authorizeJoinFault"/>
|
||||||
<wsdl:message name="configureStatusEvent">
|
<wsdl:message name="configureStatusWTPSession">
|
||||||
<wsdl:part name="idsession" type="xs:string"/>
|
<wsdl:part name="idsession" type="xs:string"/>
|
||||||
<wsdl:part name="idwtp" type="xs:string"/>
|
<wsdl:part name="idwtp" type="xs:string"/>
|
||||||
<wsdl:part name="confstatus" type="xs:base64Binary"/>
|
<wsdl:part name="confstatus" type="xs:base64Binary"/>
|
||||||
</wsdl:message>
|
</wsdl:message>
|
||||||
<wsdl:message name="joinEvent">
|
<wsdl:message name="joinWTPSession">
|
||||||
<wsdl:part name="idsession" type="xs:string"/>
|
<wsdl:part name="idsession" type="xs:string"/>
|
||||||
<wsdl:part name="idwtp" type="xs:string"/>
|
<wsdl:part name="idwtp" type="xs:string"/>
|
||||||
<wsdl:part name="join" type="xs:base64Binary"/>
|
<wsdl:part name="join" type="xs:base64Binary"/>
|
||||||
</wsdl:message>
|
</wsdl:message>
|
||||||
<wsdl:message name="configureStatusEventResponse">
|
<wsdl:message name="configureStatusWTPSessionResponse">
|
||||||
<wsdl:part name="return" type="xs:base64Binary"/>
|
<wsdl:part name="return" type="xs:base64Binary"/>
|
||||||
</wsdl:message>
|
</wsdl:message>
|
||||||
<wsdl:message name="changeStateEvent">
|
<wsdl:message name="changeStateWTPSession">
|
||||||
<wsdl:part name="idsession" type="xs:string"/>
|
<wsdl:part name="idsession" type="xs:string"/>
|
||||||
<wsdl:part name="idwtp" type="xs:string"/>
|
<wsdl:part name="idwtp" type="xs:string"/>
|
||||||
<wsdl:part name="changestate" type="xs:base64Binary"/>
|
<wsdl:part name="changestate" type="xs:base64Binary"/>
|
||||||
</wsdl:message>
|
</wsdl:message>
|
||||||
<wsdl:message name="changeStateEventResponse">
|
<wsdl:message name="changeStateWTPSessionResponse">
|
||||||
<wsdl:part name="return" type="xs:base64Binary"/>
|
<wsdl:part name="return" type="xs:base64Binary"/>
|
||||||
</wsdl:message>
|
</wsdl:message>
|
||||||
<wsdl:message name="runningEvent">
|
<wsdl:message name="runningWTPSession">
|
||||||
<wsdl:part name="idsession" type="xs:string"/>
|
<wsdl:part name="idsession" type="xs:string"/>
|
||||||
<wsdl:part name="idwtp" type="xs:string"/>
|
<wsdl:part name="idwtp" type="xs:string"/>
|
||||||
</wsdl:message>
|
</wsdl:message>
|
||||||
<wsdl:message name="runningEventResponse"/>
|
<wsdl:message name="runningWTPSessionResponse"/>
|
||||||
<wsdl:message name="joinEventResponse">
|
<wsdl:message name="joinWTPSessionResponse">
|
||||||
<wsdl:part name="return" type="xs:base64Binary"/>
|
<wsdl:part name="return" type="xs:base64Binary"/>
|
||||||
</wsdl:message>
|
</wsdl:message>
|
||||||
<wsdl:message name="teardownEvent">
|
<wsdl:message name="teardownWTPSession">
|
||||||
<wsdl:part name="idsession" type="xs:string"/>
|
<wsdl:part name="idsession" type="xs:string"/>
|
||||||
<wsdl:part name="idwtp" type="xs:string"/>
|
<wsdl:part name="idwtp" type="xs:string"/>
|
||||||
</wsdl:message>
|
</wsdl:message>
|
||||||
<wsdl:message name="teardownEventResponse"/>
|
<wsdl:message name="teardownWTPSessionResponse"/>
|
||||||
|
<wsdl:message name="checkWTPSession">
|
||||||
|
<wsdl:part name="idsession" type="xs:string"/>
|
||||||
|
<wsdl:part name="idwtp" type="xs:string"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="checkWTPSessionResponse">
|
||||||
|
<wsdl:part name="return" type="xs:boolean"/>
|
||||||
|
</wsdl:message>
|
||||||
<wsdl:portType name="Presence">
|
<wsdl:portType name="Presence">
|
||||||
<wsdl:operation name="joinBackend">
|
<wsdl:operation name="joinBackend">
|
||||||
<wsdl:input message="tns:joinBackend"/>
|
<wsdl:input message="tns:joinBackend"/>
|
||||||
@ -82,29 +89,33 @@
|
|||||||
</wsdl:operation>
|
</wsdl:operation>
|
||||||
</wsdl:portType>
|
</wsdl:portType>
|
||||||
<wsdl:portType name="AccessController">
|
<wsdl:portType name="AccessController">
|
||||||
<wsdl:operation name="authorizeJoin">
|
<wsdl:operation name="authorizeWTPSession">
|
||||||
<wsdl:input message="tns:authorizeJoin"/>
|
<wsdl:input message="tns:authorizeWTPSession"/>
|
||||||
<wsdl:output message="tns:authorizeJoinResponse"/>
|
<wsdl:output message="tns:authorizeWTPSessionResponse"/>
|
||||||
</wsdl:operation>
|
</wsdl:operation>
|
||||||
<wsdl:operation name="joinEvent">
|
<wsdl:operation name="joinWTPSession">
|
||||||
<wsdl:input message="tns:joinEvent"/>
|
<wsdl:input message="tns:joinWTPSession"/>
|
||||||
<wsdl:output message="tns:joinEventResponse"/>
|
<wsdl:output message="tns:joinWTPSessionResponse"/>
|
||||||
</wsdl:operation>
|
</wsdl:operation>
|
||||||
<wsdl:operation name="configureStatusEvent">
|
<wsdl:operation name="configureStatusWTPSession">
|
||||||
<wsdl:input message="tns:configureStatusEvent"/>
|
<wsdl:input message="tns:configureStatusWTPSession"/>
|
||||||
<wsdl:output message="tns:configureStatusEventResponse"/>
|
<wsdl:output message="tns:configureStatusWTPSessionResponse"/>
|
||||||
</wsdl:operation>
|
</wsdl:operation>
|
||||||
<wsdl:operation name="changeStateEvent">
|
<wsdl:operation name="changeStateWTPSession">
|
||||||
<wsdl:input message="tns:changeStateEvent"/>
|
<wsdl:input message="tns:changeStateWTPSession"/>
|
||||||
<wsdl:output message="tns:changeStateEventResponse"/>
|
<wsdl:output message="tns:changeStateWTPSessionResponse"/>
|
||||||
</wsdl:operation>
|
</wsdl:operation>
|
||||||
<wsdl:operation name="runningEvent">
|
<wsdl:operation name="runningWTPSession">
|
||||||
<wsdl:input message="tns:runningEvent"/>
|
<wsdl:input message="tns:runningWTPSession"/>
|
||||||
<wsdl:output message="tns:runningEventResponse"/>
|
<wsdl:output message="tns:runningWTPSessionResponse"/>
|
||||||
</wsdl:operation>
|
</wsdl:operation>
|
||||||
<wsdl:operation name="teardownEvent">
|
<wsdl:operation name="teardownWTPSession">
|
||||||
<wsdl:input message="tns:teardownEvent"/>
|
<wsdl:input message="tns:teardownWTPSession"/>
|
||||||
<wsdl:output message="tns:teardownEventResponse"/>
|
<wsdl:output message="tns:teardownWTPSessionResponse"/>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="checkWTPSession">
|
||||||
|
<wsdl:input message="tns:checkWTPSession"/>
|
||||||
|
<wsdl:output message="tns:checkWTPSessionResponse"/>
|
||||||
</wsdl:operation>
|
</wsdl:operation>
|
||||||
</wsdl:portType>
|
</wsdl:portType>
|
||||||
<wsdl:binding name="Presence" type="tns:Presence">
|
<wsdl:binding name="Presence" type="tns:Presence">
|
||||||
@ -142,7 +153,7 @@
|
|||||||
</wsdl:binding>
|
</wsdl:binding>
|
||||||
<wsdl:binding name="AccessController" type="tns:AccessController">
|
<wsdl:binding name="AccessController" type="tns:AccessController">
|
||||||
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
|
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
<wsdl:operation name="authorizeJoin">
|
<wsdl:operation name="authorizeWTPSession">
|
||||||
<soap:operation soapAction=""/>
|
<soap:operation soapAction=""/>
|
||||||
<wsdl:input>
|
<wsdl:input>
|
||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
@ -151,7 +162,7 @@
|
|||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
</wsdl:output>
|
</wsdl:output>
|
||||||
</wsdl:operation>
|
</wsdl:operation>
|
||||||
<wsdl:operation name="joinEvent">
|
<wsdl:operation name="joinWTPSession">
|
||||||
<soap:operation soapAction=""/>
|
<soap:operation soapAction=""/>
|
||||||
<wsdl:input>
|
<wsdl:input>
|
||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
@ -160,7 +171,7 @@
|
|||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
</wsdl:output>
|
</wsdl:output>
|
||||||
</wsdl:operation>
|
</wsdl:operation>
|
||||||
<wsdl:operation name="configureStatusEvent">
|
<wsdl:operation name="configureStatusWTPSession">
|
||||||
<soap:operation soapAction=""/>
|
<soap:operation soapAction=""/>
|
||||||
<wsdl:input>
|
<wsdl:input>
|
||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
@ -169,7 +180,7 @@
|
|||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
</wsdl:output>
|
</wsdl:output>
|
||||||
</wsdl:operation>
|
</wsdl:operation>
|
||||||
<wsdl:operation name="changeStateEvent">
|
<wsdl:operation name="changeStateWTPSession">
|
||||||
<soap:operation soapAction=""/>
|
<soap:operation soapAction=""/>
|
||||||
<wsdl:input>
|
<wsdl:input>
|
||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
@ -178,7 +189,7 @@
|
|||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
</wsdl:output>
|
</wsdl:output>
|
||||||
</wsdl:operation>
|
</wsdl:operation>
|
||||||
<wsdl:operation name="runningEvent">
|
<wsdl:operation name="runningWTPSession">
|
||||||
<soap:operation soapAction=""/>
|
<soap:operation soapAction=""/>
|
||||||
<wsdl:input>
|
<wsdl:input>
|
||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
@ -187,7 +198,16 @@
|
|||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
</wsdl:output>
|
</wsdl:output>
|
||||||
</wsdl:operation>
|
</wsdl:operation>
|
||||||
<wsdl:operation name="teardownEvent">
|
<wsdl:operation name="teardownWTPSession">
|
||||||
|
<soap:operation soapAction=""/>
|
||||||
|
<wsdl:input>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output>
|
||||||
|
<soap:body use="literal"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="checkWTPSession">
|
||||||
<soap:operation soapAction=""/>
|
<soap:operation soapAction=""/>
|
||||||
<wsdl:input>
|
<wsdl:input>
|
||||||
<soap:body use="literal"/>
|
<soap:body use="literal"/>
|
||||||
|
Loading…
Reference in New Issue
Block a user