axis-c-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Liu_Edw...@emc.com
Subject SOAP Fault Segmentation Fault
Date Tue, 21 Aug 2007 14:52:35 GMT
I am just to run this snippet of code that I have designed:

	if (axiom_soap_body_has_fault((axiom_soap_body_t*)create_resp,
env))
	{
		axiom_soap_fault_t* fault = 
			axiom_soap_body_get_fault(
				(axiom_soap_body_t*)create_resp, env);

		axiom_soap_fault_code_t* code = 
			axiom_soap_fault_get_code(fault, env);
		axiom_soap_fault_value_t* value = 
			axiom_soap_fault_code_get_value(code, env);
		axis2_char_t* text =
axiom_soap_fault_value_get_text(value, 
	
env);
		printf("\n%s\n", text);

		axiom_soap_fault_reason_t* reason = 
			axiom_soap_fault_get_reason(fault, env);
		axiom_soap_fault_text_t* reason_text = 
	
axiom_soap_fault_reason_get_first_soap_fault_text(
				reason, env);
		axis2_char_t* value_text = 
			axiom_soap_fault_text_get_text(reason_text,
env);
		printf("\n%s\n", value_text);
	}

create_resp is type-casted since it is originally an object of type
axiom_node_t*.  I am trying to test how to process a SOAP fault that the
client receives from the server.  If I comment out the second portion of
the if section (the part starting with the code object), I see (null)
printed out for value_text, which is not what I expected.  When I keep
in the second portion, I get a segmentation fault on the line:
axis2_char_t* text = axiom_soap_fault_value_get_text(value, env);  Here
is the exact part that the error occurs:

Program received signal SIGSEGV, Segmentation fault.
axiom_node_get_node_type (om_node=0x772e7777772f2f3a, env=0x508340) at
om_node.c:811
811         return om_node->node_type;

Is this an error on my end or bug in the Axis2/C library?  Also, seeing
(null) for value_text is not correct, as I can see the returning SOAP
fault payload, and the Value is not null is the payload.  The server is
supposed to return a SOAP 1.1 message, but the payload is in SOAP 1.2.
Could that be the issue for the null problem?

Thanks for the help on my two issues!
Edward


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-user-help@ws.apache.org


Mime
View raw message