java.lang.Object
org.cybergarage.soap.SOAP
Utility class for SOAP (Simple Object Access Protocol) message handling.
This class provides static methods and constants for creating and manipulating SOAP messages used in UPnP control operations. It includes functionality for:
- Creating SOAP envelope and body structures
- Generating SOAP fault messages
- Handling UPnP-specific SOAP error responses
- SOAP XML namespace and content type management
The class primarily serves as a factory for creating SOAP message structures and provides constants for standard SOAP elements and namespaces used throughout the UPnP framework.
Field Summary
Modifier and TypeFieldDescriptionstatic final StringName of the SOAP Body element.static final StringContent-Type sent with a SOAP message.static final StringSeparator between a namespace prefix and the element name.static final StringName of the detail element inside a Fault.static final StringEncoding style URL declared on the SOAP envelope.static final StringName of the SOAP Envelope element.static final StringName of the UPnP error code element.static final StringName of the UPnP error description element.static final StringName of the SOAP Fault element.static final StringName of the faultcode element inside a Fault.static final StringName of the faultstring element inside a Fault.static final StringName of the faultactor element inside a Fault.static final StringShort prefix declared for the SOAP method-call namespace.static final StringName of the SOAP Response element.static final StringName of the UPnP ResultStatus element.static final StringName of the UPnP error element.static final StringXML declaration prefixing every SOAP message sent.static final StringShort prefix declared for the SOAP envelope namespace.static final StringNamespace URL declared for the SOAP envelope.private static Parser/////////////////////////////////////////////Constructor Summary
ConstructorsConstructorDescriptionSOAP()The envelope builders below and the element constants are all static, so an instance carries nothing.Method Summary
All MethodsModifier and TypeMethodDescriptionstatic final NodeBuilds an empty SOAP envelope with a Body child.static final ParserReturns the shared XML parser.static final voidsetXMLParser(Parser parser) Installs the shared XML parser used to parse SOAP messages.
Field Details
ENVELOPE
BODY
RESPONSE
FAULT
FAULT_CODE
Name of the faultcode element inside a Fault.- See Also:
FAULT_STRING
Name of the faultstring element inside a Fault.- See Also:
FAULTACTOR
Name of the faultactor element inside a Fault.- See Also:
DETAIL
Name of the detail element inside a Fault.- See Also:
RESULTSTATUS
Name of the UPnP ResultStatus element.- See Also:
UPNP_ERROR
ERROR_CODE
Name of the UPnP error code element.- See Also:
ERROR_DESCRIPTION
Name of the UPnP error description element.- See Also:
XMLNS
Short prefix declared for the SOAP envelope namespace.- See Also:
METHODNS
Short prefix declared for the SOAP method-call namespace.- See Also:
DELIM
Separator between a namespace prefix and the element name.- See Also:
XMLNS_URL
Namespace URL declared for the SOAP envelope.- See Also:
ENCSTYLE_URL
Encoding style URL declared on the SOAP envelope.- See Also:
CONTENT_TYPE
Content-Type sent with a SOAP message.- See Also:
VERSION_HEADER
XML declaration prefixing every SOAP message sent.- See Also:
xmlParser
/////////////////////////////////////////////
Constructor Details
SOAP
public SOAP()The envelope builders below and the element constants are all static, so an instance carries nothing.
Method Details
createEnvelopeBodyNode
Builds an empty SOAP envelope with a Body child.- Returns:
- the SOAP Envelope element, carrying an empty Body child, ready to have a SOAP Action element added to it
setXMLParser
Installs the shared XML parser used to parse SOAP messages.- Parameters:
parser- the parser to install as the shared XML parser used by this class when it has to parse a SOAP message itself
getXMLParser
Returns the shared XML parser.- Returns:
- the shared XML parser installed by setXMLParser, or null if none has been set