How do I deserialize a SAML assertion in Rampart/C (Axis2/C)?

Up vote 1 down vote favorite share g+ share fb share tw.

I have SAML 1.1 and SAML 1.0 responses in utf-8 char * buffers, and I would like to transform them into Rampart/C saml_response_t * objects. My question is this: What is the correct method for creating a saml_response_t from a string? Ideally I'd like a code sample in C that does this and then disposes of the various parser tools in the correct order, since Axis2/C has some odd ideas about how to free memory.

My efforts to do this have met with failure, resulting mainly in memory faults, but here's what I have. Keep in mind that the deserialize_buffer() method does just what it says -- converts a buffer into an axiom_node_t *, but I'm open to replacing it as well. /* : get the raw XML from the SAML assertion */ xml_data = Tcl_GetStringFromObj (objv2, &xml_length); /* : parse the response XML for processing */ stream = gstream_mem_create (xml_data, xml_length); node = Axis2_axiom_deserialize_buffer (env, stream); /* : build a SAML response from the parsed XML */ saml_response = saml_response_create (env); saml_response_build (saml_response, node, env); arraylist = saml_response_get_assertions (saml_response, env); /* : create our return value object */ obj = Tcl_NewListObj (0, NULL); /* :- convert the SAML assertion into a string */ for (i = 0; I = NULL) { assertion_node = saml_assertion_to_om (saml_assertion, NULL, env); element = Tcl_NewStringObj (axiom_node_to_string (node, env), -1); Tcl_ListObjAppendElement (interp, obj, element); axiom_node_free_tree (assertion_node, env); } } saml rampart axis2c link|improve this question edited Dec 7 '11 at 12:38Jonathan Spooner3,1562818 asked Oct 23 '08 at 0:48Chris R4,32433172 60% accept rate.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions