NonStop SOAP 4.1 User's Manual

The AXIOM APIs that enable you to generate the request AXIOM node and consume the response
AXIOM node are described in the following section:
“Generating the Request AXIOM node using NonStop SOAP 4 APIs (page 107)
“Consuming the Response AXIOM node using NonStop SOAP 4 APIs (page 111)
Generating the Request AXIOM node using NonStop SOAP 4 APIs
NonStop SOAP 4 provides APIs to generate the request AXIOM node using one of the following
approaches:
“Creating an AXIOM node using AXIOM Node Create APIs (page 107)
“Creating an AXIOM node from an XML using AXIOM Document APIs (page 110)
Creating an AXIOM node using AXIOM Node Create APIs
NonStop SOAP 4 provides the following functions to create the response AXIOM node:
“The axiom_node_create()Function (page 107)
“The axiom_node_add_child()Function (page 107)
“The axiom_element_create()Function (page 108)
“The axiom_element_add_attribute()Function (page 108)
“The axiom_attribute_create()Function (page 109)
“The axiom_document_build_all()Function (page 109)
The axiom_node_create()Function
The axiom_node_create()function creates an AXIOM node structure.
Synopsis:
AXIS2_EXTERN axiom_node_t* axiom_node_create
(const axutil_env_t * env)
Parameters:
env
is an input parameter and is a pointer to the environment structure. It cannot have a NULL
value.
Return value:
Pointer to the newly created node structure. If an error occurs, it returns NULL.
The axiom_node_add_child()Function
The axiom_node_add_child()function adds an AXIOM node as a child to a parent AXIOM
node.
Synopsis:
AXIS2_EXTERN axis2_status_t* axiom_node_add_child
( axiom_node_t* om_node,
const axutil_env_t * env,
axiom_node_t* child
)
Parameters:
om_node
is an input parameter and points to the parent node. It cannot have a NULL value.
env
is an input parameter and is a pointer to the environment structure. It cannot have a NULL
value.
NonStop SOAP 4 Client APIs 107