NonStop SOAP 4.1 User's Manual
Return values:
Pointer to the AXIOM node created from the XML stream.
Creating an AXIOM node from an XML using AXIOM Document APIs
If you create the service response AXIOM node from an XML message, use the AXIOM document
APIs to create the AXIOM node from the response XML.
NOTE: You need not use the AXIOM document APIs if the service builds the response using
AXIOM APIs. The AXIOM document APIs interpret the hierarchy and relationship between the
elements in an XML message and generate the AXIOM node that mirrors the relationships in the
XML message. Unlike the AXIOM document APIs, when you use the AXIOM API to build the
AXIOM node, you need to set the relationships between the elements.
NonStop SOAP 4 uses the Streaming API for XML (StAX) parser to convert the XML payload into
an AXIOM node. The StAX parser is a pull-based XML parser that transfers the parsing control to
the client. This allows the NonStop SOAP 4 clients to request the next token from the parser. StAX
parses the XML payload and converts it into the corresponding AXIOM node. The StAX parser
consumes the XML payload and produces an AXIOM document structure. The AXIOM document
structure is queried to retrieve the AXIOM nodes.
The NonStop SOAP 4 APIs provide the following functions to process the AXIOM document structure:
• “The axiom_document_create()Function” (page 110)
• “The axiom_document_build_all()Function” (page 110)
• “The axiom_document_free()Function” (page 111)
The axiom_document_create()Function
The axiom_document_create()function creates an axiom_document_t structure. This
structure holds the AXIOM node representation of the input XML payload.
Synopsis:
AXIS2_EXTERN axiom_document_t* axiom_document_create
( const axutil_env_t * env,
axiom_node_t * root,
struct axiom_stax_builder * builder )
Parameters:
env
is an input parameter and is a pointer to the environment structure. It cannot have a NULL
value.
root
is an input parameter and is a pointer to the root node of the XML document.
builder
is an input parameter and is a pointer to the StAX parser.
Return Value:
Pointer to the newly created AXIOM document. If an error occurs, it returns NULL.
The axiom_document_build_all()Function
The axiom_document_build_all()function builds the XML input stream from the current
position of the StAX parser till the root element is complete.
Synopsis:
AXIS2_EXTERN axiom_node_t* axiom_document_build_all
( struct axiom_document * document,
const axutil_env_t * env )
110 NonStop SOAP 4 Client APIs










