Package org.jupnp.transport.impl
Klasse SOAPActionProcessorImpl
java.lang.Object
org.jupnp.transport.impl.PooledXmlProcessor
org.jupnp.transport.impl.SOAPActionProcessorImpl
- Alle implementierten Schnittstellen:
SOAPActionProcessor,ErrorHandler
public class SOAPActionProcessorImpl
extends PooledXmlProcessor
implements SOAPActionProcessor, ErrorHandler
Default implementation based on the W3C DOM XML processing API.
- Autor:
- Christian Bauer
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected ActionArgumentValuecreateValue(ActionArgument arg, String value) Creates an instance ofActionArgumentValueand wraps anInvalidValueExceptionas anActionExceptionwith the appropriateErrorCode.voidvoidprotected NodefindActionArgumentNode(List<Node> nodes, ActionArgument arg) Returns the node with the same unprefixed name as the action argument name/alias ornull.getMatchingNodes(NodeList nodeList, ActionArgument[] args) Finds all element nodes in the list that match any argument name or argument alias, throwsActionExceptionif not all arguments were found.protected StringgetMessageBody(ActionMessage message) protected StringgetUnprefixedNodeName(Node node) voidreadActionInputArguments(Element actionRequestElement, ActionInvocation actionInvocation) protected voidreadActionOutputArguments(Element actionResponseElement, ActionInvocation actionInvocation) protected ElementreadActionRequestElement(Element bodyElement, ActionRequestMessage message, ActionInvocation actionInvocation) protected ElementreadActionResponseElement(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.voidreadBody(ActionRequestMessage requestMessage, ActionInvocation actionInvocation) Converts SOAP XML content of the request message and sets input argument values on the given invocation.voidreadBody(ActionResponseMessage responseMsg, ActionInvocation actionInvocation) Converts SOAP XML content of the response message and sets output argument values on the given invocation.protected Elementprotected ActionExceptionreadBodyFailure(Document d, Element bodyElement) protected voidreadBodyRequest(Document d, Element bodyElement, ActionRequestMessage message, ActionInvocation actionInvocation) protected voidreadBodyResponse(Document d, Element bodyElement, ActionResponseMessage message, ActionInvocation actionInvocation) protected ActionExceptionreadFaultElement(Element bodyElement) protected Stringvoidprotected voidwriteActionInputArguments(Document d, Element actionRequestElement, ActionInvocation actionInvocation) protected voidwriteActionOutputArguments(Document d, Element actionResponseElement, ActionInvocation actionInvocation) protected ElementwriteActionRequestElement(Document d, Element bodyElement, ActionRequestMessage message, ActionInvocation actionInvocation) protected ElementwriteActionResponseElement(Document d, Element bodyElement, ActionResponseMessage message, ActionInvocation actionInvocation) voidwriteBody(ActionRequestMessage requestMessage, ActionInvocation actionInvocation) Converts the given invocation input into SOAP XML content, setting on the given request message.voidwriteBody(ActionResponseMessage responseMessage, ActionInvocation actionInvocation) Converts the given invocation output into SOAP XML content, setting on the given response message.protected Elementprotected voidwriteBodyFailure(Document d, Element bodyElement, ActionResponseMessage message, ActionInvocation actionInvocation) protected voidwriteBodyRequest(Document d, Element bodyElement, ActionRequestMessage message, ActionInvocation actionInvocation) protected voidwriteBodyResponse(Document d, Element bodyElement, ActionResponseMessage message, ActionInvocation actionInvocation) protected voidwriteFaultElement(Document d, Element bodyElement, ActionInvocation actionInvocation) Von Klasse geerbte Methoden org.jupnp.transport.impl.PooledXmlProcessor
newDocument, readDocument, readDocument
-
Konstruktordetails
-
SOAPActionProcessorImpl
public SOAPActionProcessorImpl()
-
-
Methodendetails
-
writeBody
public void writeBody(ActionRequestMessage requestMessage, ActionInvocation actionInvocation) throws UnsupportedDataException Beschreibung aus Schnittstelle kopiert:SOAPActionProcessorConverts the given invocation input into SOAP XML content, setting on the given request message.- Angegeben von:
writeBodyin SchnittstelleSOAPActionProcessor- Parameter:
requestMessage- The request message on which the SOAP content is set.actionInvocation- The action invocation from which input argument values are read.- Löst aus:
UnsupportedDataException
-
writeBody
public void writeBody(ActionResponseMessage responseMessage, ActionInvocation actionInvocation) throws UnsupportedDataException Beschreibung aus Schnittstelle kopiert:SOAPActionProcessorConverts the given invocation output into SOAP XML content, setting on the given response message.- Angegeben von:
writeBodyin SchnittstelleSOAPActionProcessor- Parameter:
responseMessage- The response message on which the SOAP content is set.actionInvocation- The action invocation from which output argument values are read.- Löst aus:
UnsupportedDataException
-
readBody
public void readBody(ActionRequestMessage requestMessage, ActionInvocation actionInvocation) throws UnsupportedDataException Beschreibung aus Schnittstelle kopiert:SOAPActionProcessorConverts SOAP XML content of the request message and sets input argument values on the given invocation.- Angegeben von:
readBodyin SchnittstelleSOAPActionProcessor- Parameter:
requestMessage- The request message from which SOAP content is read.actionInvocation- The action invocation on which input argument values are set.- Löst aus:
UnsupportedDataException
-
readBody
public void readBody(ActionResponseMessage responseMsg, ActionInvocation actionInvocation) throws UnsupportedDataException Beschreibung aus Schnittstelle kopiert:SOAPActionProcessorConverts SOAP XML content of the response message and sets output argument values on the given invocation.- Angegeben von:
readBodyin SchnittstelleSOAPActionProcessor- Parameter:
responseMsg- The response message from which SOAP content is read.actionInvocation- The action invocation on which output argument values are set.- Löst aus:
UnsupportedDataException
-
writeBodyFailure
protected void writeBodyFailure(Document d, Element bodyElement, ActionResponseMessage message, ActionInvocation actionInvocation) throws Exception - Löst aus:
Exception
-
writeBodyRequest
protected void writeBodyRequest(Document d, Element bodyElement, ActionRequestMessage message, ActionInvocation actionInvocation) throws Exception - Löst aus:
Exception
-
writeBodyResponse
protected void writeBodyResponse(Document d, Element bodyElement, ActionResponseMessage message, ActionInvocation actionInvocation) throws Exception - Löst aus:
Exception
-
readBodyFailure
- Löst aus:
Exception
-
readBodyRequest
protected void readBodyRequest(Document d, Element bodyElement, ActionRequestMessage message, ActionInvocation actionInvocation) throws Exception - Löst aus:
Exception
-
readBodyResponse
protected void readBodyResponse(Document d, Element bodyElement, ActionResponseMessage message, ActionInvocation actionInvocation) throws Exception - Löst aus:
Exception
-
writeBodyElement
-
readBodyElement
-
writeActionRequestElement
protected Element writeActionRequestElement(Document d, Element bodyElement, ActionRequestMessage message, ActionInvocation actionInvocation) -
readActionRequestElement
protected Element readActionRequestElement(Element bodyElement, ActionRequestMessage message, ActionInvocation actionInvocation) -
writeActionResponseElement
protected Element writeActionResponseElement(Document d, Element bodyElement, ActionResponseMessage message, ActionInvocation actionInvocation) -
readActionResponseElement
-
writeActionInputArguments
protected void writeActionInputArguments(Document d, Element actionRequestElement, ActionInvocation actionInvocation) -
readActionInputArguments
public void readActionInputArguments(Element actionRequestElement, ActionInvocation actionInvocation) throws ActionException - Löst aus:
ActionException
-
writeActionOutputArguments
protected void writeActionOutputArguments(Document d, Element actionResponseElement, ActionInvocation actionInvocation) -
readActionOutputArguments
protected void readActionOutputArguments(Element actionResponseElement, ActionInvocation actionInvocation) throws ActionException - Löst aus:
ActionException
-
writeFaultElement
protected void writeFaultElement(Document d, Element bodyElement, ActionInvocation actionInvocation) -
readFaultElement
-
getMessageBody
- Löst aus:
UnsupportedDataException
-
toString
- Löst aus:
Exception
-
getUnprefixedNodeName
-
readArgumentValues
protected ActionArgumentValue[] readArgumentValues(NodeList nodeList, ActionArgument[] args) throws ActionException The UPnP spec says that action arguments must be in the order as declared by the service. This method however is lenient, the action argument nodes in the XML can be in any order, as long as they are all there everything is OK.- Löst aus:
ActionException
-
getMatchingNodes
protected List<Node> getMatchingNodes(NodeList nodeList, ActionArgument[] args) throws ActionException Finds all element nodes in the list that match any argument name or argument alias, throwsActionExceptionif not all arguments were found.- Löst aus:
ActionException
-
createValue
Creates an instance ofActionArgumentValueand wraps anInvalidValueExceptionas anActionExceptionwith the appropriateErrorCode.- Löst aus:
ActionException
-
findActionArgumentNode
Returns the node with the same unprefixed name as the action argument name/alias ornull. -
warning
- Angegeben von:
warningin SchnittstelleErrorHandler- Löst aus:
SAXException
-
error
- Angegeben von:
errorin SchnittstelleErrorHandler- Löst aus:
SAXException
-
fatalError
- Angegeben von:
fatalErrorin SchnittstelleErrorHandler- Löst aus:
SAXException
-