protected void handleResponse(IncomingActionResponseMessage responseMsg) throws ActionException { try { log.fine("Received response for outgoing call, reading SOAP response body: " + responseMsg); getUpnpService().getConfiguration().getSoapActionProcessor().readBody(responseMsg, actionInvocation); } catch (UnsupportedDataException ex) { log.fine("Error reading SOAP body: " + ex); log.log(Level.FINE, "Exception root cause: ", Exceptions.unwrap(ex)); throw new ActionException( ErrorCode.ACTION_FAILED, "Error reading SOAP response message. " + ex.getMessage(), false ); } }
protected StreamResponseMessage sendRemoteRequest(OutgoingActionRequestMessage requestMessage) throws ActionException, RouterException { try { log.fine("Writing SOAP request body of: " + requestMessage); getUpnpService().getConfiguration().getSoapActionProcessor().writeBody(requestMessage, actionInvocation); log.fine("Sending SOAP body of message as stream to remote device"); return getUpnpService().getRouter().send(requestMessage); } catch (RouterException ex) { Throwable cause = Exceptions.unwrap(ex); if (cause instanceof InterruptedException) { if (log.isLoggable(Level.FINE)) { log.fine("Sending action request message was interrupted: " + cause); } throw new ActionCancelledException((InterruptedException)cause); } throw ex; } catch (UnsupportedDataException ex) { if (log.isLoggable(Level.FINE)) { log.fine("Error writing SOAP body: " + ex); log.log(Level.FINE, "Exception root cause: ", Exceptions.unwrap(ex)); } throw new ActionException(ErrorCode.ACTION_FAILED, "Error writing request message. " + ex.getMessage()); } }
protected void handleResponseFailure(IncomingActionResponseMessage responseMsg) throws ActionException { try { log.fine("Received response with Internal Server Error, reading SOAP failure message"); getUpnpService().getConfiguration().getSoapActionProcessor().readBody(responseMsg, actionInvocation); } catch (UnsupportedDataException ex) { log.fine("Error reading SOAP body: " + ex); log.log(Level.FINE, "Exception root cause: ", Exceptions.unwrap(ex)); throw new ActionException( ErrorCode.ACTION_FAILED, "Error reading SOAP response failure message. " + ex.getMessage(), false ); } }
protected StreamResponseMessage sendRemoteRequest(OutgoingActionRequestMessage requestMessage) throws ActionException, RouterException { try { log.fine("Writing SOAP request body of: " + requestMessage); getUpnpService().getConfiguration().getSoapActionProcessor().writeBody(requestMessage, actionInvocation); log.fine("Sending SOAP body of message as stream to remote device"); return getUpnpService().getRouter().send(requestMessage); } catch (RouterException ex) { Throwable cause = Exceptions.unwrap(ex); if (cause instanceof InterruptedException) { if (log.isLoggable(Level.FINE)) { log.fine("Sending action request message was interrupted: " + cause); } throw new ActionCancelledException((InterruptedException)cause); } throw ex; } catch (UnsupportedDataException ex) { if (log.isLoggable(Level.FINE)) { log.fine("Error writing SOAP body: " + ex); log.log(Level.FINE, "Exception root cause: ", Exceptions.unwrap(ex)); } throw new ActionException(ErrorCode.ACTION_FAILED, "Error writing request message. " + ex.getMessage()); } }
protected void handleResponse(IncomingActionResponseMessage responseMsg) throws ActionException { try { log.fine("Received response for outgoing call, reading SOAP response body: " + responseMsg); getUpnpService().getConfiguration().getSoapActionProcessor().readBody(responseMsg, actionInvocation); } catch (UnsupportedDataException ex) { log.fine("Error reading SOAP body: " + ex); log.log(Level.FINE, "Exception root cause: ", Exceptions.unwrap(ex)); throw new ActionException( ErrorCode.ACTION_FAILED, "Error reading SOAP response message. " + ex.getMessage(), false ); } }
protected StreamResponseMessage sendRemoteRequest(OutgoingActionRequestMessage requestMessage) throws ActionException, RouterException { try { log.fine("Writing SOAP request body of: " + requestMessage); getUpnpService().getConfiguration().getSoapActionProcessor().writeBody(requestMessage, actionInvocation); log.fine("Sending SOAP body of message as stream to remote device"); return getUpnpService().getRouter().send(requestMessage); } catch (RouterException ex) { Throwable cause = Exceptions.unwrap(ex); if (cause instanceof InterruptedException) { if (log.isLoggable(Level.FINE)) { log.fine("Sending action request message was interrupted: " + cause); } throw new ActionCancelledException((InterruptedException)cause); } throw ex; } catch (UnsupportedDataException ex) { if (log.isLoggable(Level.FINE)) { log.fine("Error writing SOAP body: " + ex); log.log(Level.FINE, "Exception root cause: ", Exceptions.unwrap(ex)); } throw new ActionException(ErrorCode.ACTION_FAILED, "Error writing request message. " + ex.getMessage()); } }
protected void handleResponseFailure(IncomingActionResponseMessage responseMsg) throws ActionException { try { log.fine("Received response with Internal Server Error, reading SOAP failure message"); getUpnpService().getConfiguration().getSoapActionProcessor().readBody(responseMsg, actionInvocation); } catch (UnsupportedDataException ex) { log.fine("Error reading SOAP body: " + ex); log.log(Level.FINE, "Exception root cause: ", Exceptions.unwrap(ex)); throw new ActionException( ErrorCode.ACTION_FAILED, "Error reading SOAP response failure message. " + ex.getMessage(), false ); } }
protected void handleResponseFailure(IncomingActionResponseMessage responseMsg) throws ActionException { try { log.fine("Received response with Internal Server Error, reading SOAP failure message"); getUpnpService().getConfiguration().getSoapActionProcessor().readBody(responseMsg, actionInvocation); } catch (UnsupportedDataException ex) { log.fine("Error reading SOAP body: " + ex); log.log(Level.FINE, "Exception root cause: ", Exceptions.unwrap(ex)); throw new ActionException( ErrorCode.ACTION_FAILED, "Error reading SOAP response failure message. " + ex.getMessage(), false ); } }
protected void handleResponse(IncomingActionResponseMessage responseMsg) throws ActionException { try { log.fine("Received response for outgoing call, reading SOAP response body: " + responseMsg); getUpnpService().getConfiguration().getSoapActionProcessor().readBody(responseMsg, actionInvocation); } catch (UnsupportedDataException ex) { log.fine("Error reading SOAP body: " + ex); log.log(Level.FINE, "Exception root cause: ", Exceptions.unwrap(ex)); throw new ActionException( ErrorCode.ACTION_FAILED, "Error reading SOAP response message. " + ex.getMessage(), false ); } }