SophiaFramework UNIVERSE 5.3 |
SophiaFramework provides the following SOAP classes.
Table 19.13. SOAP class
Class name | Description |
---|---|
SFXSOAPParser | Class for parsing SOAP message using DOM method. |
SFXSOAPWriter | Class for creating SOAP message. |
SFXSOAPRPC | Class for handling SOAP-RPC protocol. |
SOAP ( Simple Object Access Protocol ) document consists of three elements: Envelope, Header and Body.
SFXSOAPParser class inherites SFXXMLDOMParser class and expands the DOM tree onto memory. Any SOAP message information can be obtained only by parsing the SOAP message without the need to get the DOM tree.
Main functions of SFXSOAPParser class
Table 19.14. Main Function of SFXSOAPParser
Function Name | Description |
---|---|
SFXSOAPParser::GetEnvelope | Get the envelope element of the SOAP message. |
SFXSOAPParser::GetHeader | Get the header element of the SOAP message. |
SFXSOAPParser::GetBody | Get the body element of the SOAP message. |
SFXSOAPParser::GetFault | Get the fault element of the SOAP message. |
Table 19.15. Main Helper Function
Function Name | Description |
---|---|
SFXSOAPParser::GetBodyEntries | Get all the entry nodes in the body of the SOAP message. |
SFXSOAPParser::GetHeaderEntries | Get all the entry nodes in the header of the SOAP message. |
SFXSOAPParser::GetBodyEntry | Get the entry node in the body of the SOAP message. |
SFXSOAPParser::GetRPCParameter | Get parameter element in the body of the SOAP message. |
SFXSOAPParser::GetRPCResult | Get the first child element of the first entry in the body of the SOAP message. |
SFXSOAPParser::GetRPCStruct | Get the first entry in the body of the SOAP message. |
SFXSOAPWriter is a class to create the elements of the SOAP message using SFXXMLDocument.
SFXSOAPRPC is the class to implement SOAP-RPC protocol using SFXSOAPParser and SFXSOAPWriter.
Web service is called by setting the Web service method name, the targetted URI, parameters, Web service IP address, soapAction attribute of Web service functions, and the callback function.
Set the SOAP message created by using the SFXSOAPWriter class as argument of the SFXSOAPRPC::Invoke function, then the Web service is called. In the shortest case, its code size may be less than 10 lines.
If SFXSOAPRPC is used, the parameters must be correctly set on the basis of the SOAP message.
If SFXSOAPRPC are used, connecting to a server is through the HTTP protocol.
The replied message in SOAP format is obtained using a callback function. The replied mesage should be parsed by one of the following three functions.
Frequently Used Method | |
---|---|
To parse the SOAP message, usually adopt the first method using the SFXSOAPParser function. |
SOAP Fault | |
---|---|
If the SOAP message replied from the web server includes the SOAP Fault message, the error value to be notified to the callback function will be SFERR_SOAP_FAULT_MESSAGE. Moreover, detailed information on this error value can be obtained by accessing the SOAP Fault message of the SFXSOAPRPC::FAULT structure. |
Copyright(c) 2002 - 2024 Sophia Cradle Incorporated All Rights Reserved. |