Details
-
Bug
-
Status: Open
-
Critical
-
Resolution: Unresolved
-
1.6.0
-
None
-
None
Description
The axiom_soap_builder allows to decode such message without any error :
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><Header/><soap:Body/></soap:Envelope>
which is bad because the Header element isn't in the Soap 1.2 namespace (in this example).
Later, calling axiom_soap_envelope_get_header succeed but this sequence ends in NULL pointer :
axiom_node_t *aSoapHeaderNode = axiom_soap_header_get_base_node (iSoapHeader,iAxiomEnv);
axiom_element *aSoapHeaderElem = (axiom_element_t *) axiom_node_get_data_element(aSoapHeaderNode,iAxiomEnv);
axiom_namespace *aSoapHeaderNS = axiom_element_get_namespace(aSoapHeaderElem,iAxiomEnv,aSoapHeaderNode); => NULL pointer, should be pointer to axiom_namespace matching either 1.1 or 1.2 Soap namespace !
The axiom_soap_builder_construct_node should check that Header and Body elements are in the same namespace than the Soap Envelope element and if not returns in error.
Regards,
Sebastien