public IncomingActionRequestMessage(StreamRequestMessage source, LocalService service) throws ActionException { super(source); SoapActionHeader soapActionHeader = getHeaders().getFirstHeader(UpnpHeader.Type.SOAPACTION, SoapActionHeader.class); if (soapActionHeader == null) { throw new ActionException(ErrorCode.INVALID_ACTION, "Missing SOAP action header"); } SoapActionType actionType = soapActionHeader.getValue(); this.action = service.getAction(actionType.getActionName()); if (this.action == null) { throw new ActionException(ErrorCode.INVALID_ACTION, "Service doesn't implement action: " + actionType.getActionName()); } if (!QueryStateVariableAction.ACTION_NAME.equals(actionType.getActionName())) { if (!service.getServiceType().implementsVersion(actionType.getServiceType())) { throw new ActionException(ErrorCode.INVALID_ACTION, "Service doesn't support the requested service version"); } } this.actionNamespace = actionType.getTypeString(); }
public IncomingActionRequestMessage(StreamRequestMessage source, LocalService service) throws ActionException { super(source); SoapActionHeader soapActionHeader = getHeaders().getFirstHeader(UpnpHeader.Type.SOAPACTION, SoapActionHeader.class); if (soapActionHeader == null) { throw new ActionException(ErrorCode.INVALID_ACTION, "Missing SOAP action header"); } SoapActionType actionType = soapActionHeader.getValue(); this.action = service.getAction(actionType.getActionName()); if (this.action == null) { throw new ActionException(ErrorCode.INVALID_ACTION, "Service doesn't implement action: " + actionType.getActionName()); } if (!QueryStateVariableAction.ACTION_NAME.equals(actionType.getActionName())) { if (!service.getServiceType().implementsVersion(actionType.getServiceType())) { throw new ActionException(ErrorCode.INVALID_ACTION, "Service doesn't support the requested service version"); } } this.actionNamespace = actionType.getTypeString(); }
public IncomingActionRequestMessage(StreamRequestMessage source, LocalService service) throws ActionException { super(source); SoapActionHeader soapActionHeader = getHeaders().getFirstHeader(UpnpHeader.Type.SOAPACTION, SoapActionHeader.class); if (soapActionHeader == null) { throw new ActionException(ErrorCode.INVALID_ACTION, "Missing SOAP action header"); } SoapActionType actionType = soapActionHeader.getValue(); this.action = service.getAction(actionType.getActionName()); if (this.action == null) { throw new ActionException(ErrorCode.INVALID_ACTION, "Service doesn't implement action: " + actionType.getActionName()); } if (!QueryStateVariableAction.ACTION_NAME.equals(actionType.getActionName())) { if (!service.getServiceType().implementsVersion(actionType.getServiceType())) { throw new ActionException(ErrorCode.INVALID_ACTION, "Service doesn't support the requested service version"); } } this.actionNamespace = actionType.getTypeString(); }