0
辞書、Hashtable、またはNameValueCollectionと共にURLテンプレートベースのIDを受け入れることができるように、OpenRastaハンドラを実装する方法を教えてください。OpenRastaへのPUT/POSTキー/値コレクション
私のURLテンプレートは "/ fielddata/{correlationId}"です。
マイPUTメッセージは次のとおりです。
PUT http://myhost/fielddata/39950 HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 14
X=123&Y=Abc
は、私はこのようなハンドラを試してみました:
public class FieldDataHandler
{
public void Put(string correlationId, NameValueCollection data)
{
}
}
をしかし、このような例外を取得:
openrasta Verbose: 0 : Incoming host request for http://myhost/fielddata/39950
openrasta Verbose: 0 : Adding communication context data
openrasta Verbose: 0 : Found 1 operation(s) with a matching name.
openrasta Verbose: 0 : Found 0 operation(s) with matching [HttpOperation] attribute.
openrasta Information: 0 : Operation FieldDataHandler::Put(String correlationId, NameValueCollection data) selected with 2 required members and 0 optional members, with codec ApplicationXWwwFormUrlencodedKeyedValuesCodec with score 1,333333.
openrasta Error: 0 : An error has occurred and the processing of the request has stopped.
Exception:
System.InvalidOperationException: The operation is not ready for invocation.
at OpenRasta.OperationModel.MethodBased.MethodBasedOperation.Invoke() in c:\Projects\OpenRasta\openrasta-stable\src\core\OpenRasta\OperationModel\MethodBased\MethodBasedOperation.cs:line 56
at OpenRasta.OperationModel.Interceptors.OperationWithInterceptors.<Invoke>b__0() in c:\Projects\OpenRasta\openrasta-stable\src\core\OpenRasta\OperationModel\Interceptors\OperationWithInterceptors.cs:line 47
at OpenRasta.OperationModel.Interceptors.OperationWithInterceptors.Invoke() in c:\Projects\OpenRasta\openrasta-stable\src\core\OpenRasta\OperationModel\Interceptors\OperationWithInterceptors.cs:line 52
at OpenRasta.OperationModel.OperationExecutor.Execute(IEnumerable`1 operations) in c:\Projects\OpenRasta\openrasta-stable\src\core\OpenRasta\OperationModel\OperationExecutor.cs:line 14
at OpenRasta.Pipeline.Contributors.OperationInvokerContributor.ExecuteOperations(ICommunicationContext context) in c:\Projects\OpenRasta\openrasta-stable\src\core\OpenRasta\Pipeline\Contributors\OperationInvokerContributor.cs:line 29
at OpenRasta.Pipeline.PipelineRunner.ExecuteContributor(ICommunicationContext context, ContributorCall call) in c:\Projects\OpenRasta\openrasta-stable\src\core\OpenRasta\Pipeline\PipelineRunner.cs:line 187
openrasta Information: 0 : Executing OperationResult OperationResult: type=InternalServerError, statusCode=500.