Hi imranmm7
(nice name)
calling axis2_msg_ctx_get_soap_enevlop returns you an axiom_sopa_envelope
calling axiom_soap_enevelope_serialize returns you an axiom_output_t which is
complex structure and IT HAS YOUR XML WRITER
from there and only as an example, you have to relate various structures
together
response_node (from my code) below should be your envelope
from axawl_serialize_output_payload, a larger part of a larger output . . .
just as a hint / example . . .
so basically
1. you need a write
writer = axiom_xml_writer_create_for_memory(env, "ISO8859-1", AXIS2_TRUE,
0, AXIS2_XML_PARSER_TYPE_BUFFER);
2. writer needs to be part of om_output struc
om_output_t om_output = axiom_output_create(env, writer);
3. the om_output needs to know about encoding
axiom_output_write_xml_version_encoding(om_output, env);
4. om_output and response_node (your envelope) needs to be associated, come
together
status = axiom_node_serialize(response_node, env , om_output);
5. and now you can call to get xml data by using the writer which has all
associations among om_output
output_buffer = (axis2_char_t*)axiom_xml_writer_get_xml(writer, env);
6. use proper lengt pointer types, your output_buffer has it all,
scnt = (unsigned __int32)strlen(output_buffer);
7. free memory
(*payload_out) = axutil_strdup(env, output_buffer);
axiom_node_free_tree(response_node, env);
axiom_output_free(om_output, env);
8. logg what you have
AXIS2_LOG_DEBUG(env->log, AXIS2_LOG_SI, "\n End
axawl_serialize_output_payload() .... Bytes(%d) %d",scnt,2);
return AXIS2_SUCCESS;
} //axawl_serialize_output_payload
Josef
-----Ursprüngliche Nachricht-----
Von: imranmm7 [mailto:[email protected]]
Gesendet: Samstag, 19. November 2011 14:31
An: [email protected]
Betreff: how to parse soap_envelope or soap_body (Axiom)
hello all,
I am working with axis2C in linux. A webservice is deployed on apache engine
and inside apache engine i collected the SOAP message with the following
code
soap_envelope = axis2_msg_ctx_get_soap_envelope(Message Context ctx, axutil
Environment env)
from here i can get the base node and body with the corresponding method.
My question is: How i parse the soap_envelope with Axiom library or libxml2
library?
I want to parse the whole soap_envelope, go element by element and prints
the result to .xml file.
any idea? or code response in C??
thanks
--
View this message in context:
http://old.nabble.com/how-to-parse-soap_envelope-or-soap_body-%28Axiom%29-tp32868228p32868228.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]