コード例 #1
0
ファイル: soap_body.c プロジェクト: MI-LA01/kt_wso2-php5.3
/**
 * Indicates whether a soap fault is available with this soap body
 * @param soap_body axiom_soap_body struct
 * @param env environment must not be null
 * @return AXIS2_TRUE if fault is available, AXIS2_FALSE otherwise
 */
AXIS2_EXTERN axis2_bool_t AXIS2_CALL
axiom_soap_body_has_fault(
    axiom_soap_body_t * soap_body,
    const axutil_env_t * env)
{
    if(soap_body->soap_fault)
    {
        soap_body->has_fault = AXIS2_TRUE;
    }
    else
    {
        /* This soap body could have been built programatically. Do the following only if soap
         * body is created from soap_builder. Check for last child is to make sure body's child
         * are not yet built. If atleast one child is built, we don't need to build it again,
         * because , if fault, first child node of body node should be the fault node. If the child
         * is not built yet, trigger it to be built. */
        if(soap_body->soap_builder && !axiom_node_is_complete(soap_body->om_ele_node, env) &&
            !axiom_node_get_last_child(soap_body->om_ele_node, env))
        {
            axiom_soap_builder_next(soap_body->soap_builder, env);
            if(soap_body->soap_fault)
            {
                soap_body->has_fault = AXIS2_TRUE;
            }
        }
    }

    return soap_body->has_fault;
}
コード例 #2
0
ファイル: sp_util.c プロジェクト: EOxServer/soap-proxy
//-----------------------------------------------------------------------------
axiom_node_t *
sp_get_last_text_node(
    axiom_node_t       *node,
    const axutil_env_t *env)
{
	if (NULL == node) return NULL;

	axiom_node_t *child = axiom_node_get_last_child (node, env);
	while (child != NULL &&
			axiom_node_get_node_type(child, env) != AXIOM_TEXT)
	{
		child = axiom_node_get_previous_sibling(child, env);
	}
	return child;
}