public class SOAPActionProcessorImpl extends PooledXmlProcessor implements SOAPActionProcessor, ErrorHandler
| Constructor and Description |
|---|
SOAPActionProcessorImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected ActionArgumentValue |
createValue(ActionArgument arg,
String value)
Creates an instance of
ActionArgumentValue and wraps an
InvalidValueException as an ActionException with the
appropriate ErrorCode. |
void |
error(SAXParseException e) |
void |
fatalError(SAXParseException e) |
protected Node |
findActionArgumentNode(List<Node> nodes,
ActionArgument arg)
Returns the node with the same unprefixed name as the action argument
name/alias or
null. |
protected List<Node> |
getMatchingNodes(NodeList nodeList,
ActionArgument[] args)
Finds all element nodes in the list that match any argument name or argument
alias, throws
ActionException if not all arguments were found. |
protected String |
getMessageBody(ActionMessage message) |
protected String |
getUnprefixedNodeName(Node node) |
void |
readActionInputArguments(Element actionRequestElement,
ActionInvocation actionInvocation) |
protected void |
readActionOutputArguments(Element actionResponseElement,
ActionInvocation actionInvocation) |
protected Element |
readActionRequestElement(Element bodyElement,
ActionRequestMessage message,
ActionInvocation actionInvocation) |
protected Element |
readActionResponseElement(Element bodyElement,
ActionInvocation actionInvocation) |
protected ActionArgumentValue[] |
readArgumentValues(NodeList nodeList,
ActionArgument[] args)
The UPnP spec says that action arguments must be in the order as declared
by the service.
|
void |
readBody(ActionRequestMessage requestMessage,
ActionInvocation actionInvocation)
Converts SOAP XML content of the request message and sets input argument values on the given invocation.
|
void |
readBody(ActionResponseMessage responseMsg,
ActionInvocation actionInvocation)
Converts SOAP XML content of the response message and sets output argument values on the given invocation.
|
protected Element |
readBodyElement(Document d) |
protected ActionException |
readBodyFailure(Document d,
Element bodyElement) |
protected void |
readBodyRequest(Document d,
Element bodyElement,
ActionRequestMessage message,
ActionInvocation actionInvocation) |
protected void |
readBodyResponse(Document d,
Element bodyElement,
ActionResponseMessage message,
ActionInvocation actionInvocation) |
protected ActionException |
readFaultElement(Element bodyElement) |
protected String |
toString(Document d) |
void |
warning(SAXParseException e) |
protected void |
writeActionInputArguments(Document d,
Element actionRequestElement,
ActionInvocation actionInvocation) |
protected void |
writeActionOutputArguments(Document d,
Element actionResponseElement,
ActionInvocation actionInvocation) |
protected Element |
writeActionRequestElement(Document d,
Element bodyElement,
ActionRequestMessage message,
ActionInvocation actionInvocation) |
protected Element |
writeActionResponseElement(Document d,
Element bodyElement,
ActionResponseMessage message,
ActionInvocation actionInvocation) |
void |
writeBody(ActionRequestMessage requestMessage,
ActionInvocation actionInvocation)
Converts the given invocation input into SOAP XML content, setting on the given request message.
|
void |
writeBody(ActionResponseMessage responseMessage,
ActionInvocation actionInvocation)
Converts the given invocation output into SOAP XML content, setting on the given response message.
|
protected Element |
writeBodyElement(Document d) |
protected void |
writeBodyFailure(Document d,
Element bodyElement,
ActionResponseMessage message,
ActionInvocation actionInvocation) |
protected void |
writeBodyRequest(Document d,
Element bodyElement,
ActionRequestMessage message,
ActionInvocation actionInvocation) |
protected void |
writeBodyResponse(Document d,
Element bodyElement,
ActionResponseMessage message,
ActionInvocation actionInvocation) |
protected void |
writeFaultElement(Document d,
Element bodyElement,
ActionInvocation actionInvocation) |
newDocument, readDocument, readDocumentpublic void writeBody(ActionRequestMessage requestMessage, ActionInvocation actionInvocation) throws UnsupportedDataException
SOAPActionProcessorwriteBody in interface SOAPActionProcessorrequestMessage - The request message on which the SOAP content is set.actionInvocation - The action invocation from which input argument values are read.UnsupportedDataExceptionpublic void writeBody(ActionResponseMessage responseMessage, ActionInvocation actionInvocation) throws UnsupportedDataException
SOAPActionProcessorwriteBody in interface SOAPActionProcessorresponseMessage - The response message on which the SOAP content is set.actionInvocation - The action invocation from which output argument values are read.UnsupportedDataExceptionpublic void readBody(ActionRequestMessage requestMessage, ActionInvocation actionInvocation) throws UnsupportedDataException
SOAPActionProcessorreadBody in interface SOAPActionProcessorrequestMessage - The request message from which SOAP content is read.actionInvocation - The action invocation on which input argument values are set.UnsupportedDataExceptionpublic void readBody(ActionResponseMessage responseMsg, ActionInvocation actionInvocation) throws UnsupportedDataException
SOAPActionProcessorreadBody in interface SOAPActionProcessorresponseMsg - The response message from which SOAP content is read.actionInvocation - The action invocation on which output argument values are set.UnsupportedDataExceptionprotected void writeBodyFailure(Document d, Element bodyElement, ActionResponseMessage message, ActionInvocation actionInvocation) throws Exception
Exceptionprotected void writeBodyRequest(Document d, Element bodyElement, ActionRequestMessage message, ActionInvocation actionInvocation) throws Exception
Exceptionprotected void writeBodyResponse(Document d, Element bodyElement, ActionResponseMessage message, ActionInvocation actionInvocation) throws Exception
Exceptionprotected ActionException readBodyFailure(Document d, Element bodyElement) throws Exception
Exceptionprotected void readBodyRequest(Document d, Element bodyElement, ActionRequestMessage message, ActionInvocation actionInvocation) throws Exception
Exceptionprotected void readBodyResponse(Document d, Element bodyElement, ActionResponseMessage message, ActionInvocation actionInvocation) throws Exception
Exceptionprotected Element writeActionRequestElement(Document d, Element bodyElement, ActionRequestMessage message, ActionInvocation actionInvocation)
protected Element readActionRequestElement(Element bodyElement, ActionRequestMessage message, ActionInvocation actionInvocation)
protected Element writeActionResponseElement(Document d, Element bodyElement, ActionResponseMessage message, ActionInvocation actionInvocation)
protected Element readActionResponseElement(Element bodyElement, ActionInvocation actionInvocation)
protected void writeActionInputArguments(Document d, Element actionRequestElement, ActionInvocation actionInvocation)
public void readActionInputArguments(Element actionRequestElement, ActionInvocation actionInvocation) throws ActionException
ActionExceptionprotected void writeActionOutputArguments(Document d, Element actionResponseElement, ActionInvocation actionInvocation)
protected void readActionOutputArguments(Element actionResponseElement, ActionInvocation actionInvocation) throws ActionException
ActionExceptionprotected void writeFaultElement(Document d, Element bodyElement, ActionInvocation actionInvocation)
protected ActionException readFaultElement(Element bodyElement)
protected String getMessageBody(ActionMessage message) throws UnsupportedDataException
UnsupportedDataExceptionprotected ActionArgumentValue[] readArgumentValues(NodeList nodeList, ActionArgument[] args) throws ActionException
ActionExceptionprotected List<Node> getMatchingNodes(NodeList nodeList, ActionArgument[] args) throws ActionException
ActionException if not all arguments were found.ActionExceptionprotected ActionArgumentValue createValue(ActionArgument arg, String value) throws ActionException
ActionArgumentValue and wraps an
InvalidValueException as an ActionException with the
appropriate ErrorCode.ActionExceptionprotected Node findActionArgumentNode(List<Node> nodes, ActionArgument arg)
null.public void warning(SAXParseException e) throws SAXException
warning in interface ErrorHandlerSAXExceptionpublic void error(SAXParseException e) throws SAXException
error in interface ErrorHandlerSAXExceptionpublic void fatalError(SAXParseException e) throws SAXException
fatalError in interface ErrorHandlerSAXExceptionCopyright © 2023 jUPnP.org. All rights reserved.