将日期发布到可运行的Web服务失败 [英] POSTing date times to operationalized webservice fails

查看:85
本文介绍了将日期发布到可运行的Web服务失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用R  mrsdeploy中的发布服务设置了一个简单的Web服务.它工作正常,但如果通过网络发送日期失败,则失败(请参见下文).任何想法都将受到欢迎.

I've setup a simple web service using publishService from the R mrsdeploy.  It works fine except it fails if dates are sent across the wire (see below).  Any ideas would be welcome.

 错误:
< Error>
    ------------------------------------------------ ----------------
   成功:FALSE
 网址:http://pacman.westus.cloudapp.azure.com:12800/api/blinky/v1.0.0
   方法:POST
 状态代码:400
   内容: 
     链接:https://go.microsoft.com/fwlink/?linkid = 830136
     消息:我没有将DateTimeOffset []类型转换为Sexp的自动转换规则.
      ExceptionType:ArgumentException

 Error: 
<Error>
   ----------------------------------------------------------------
   success: FALSE
   url: http://pacman.westus.cloudapp.azure.com:12800/api/blinky/v1.0.0
   method: POST
   status_code: 400
   content: 
      Link: https://go.microsoft.com/fwlink/?linkid=830136
      Message: I don't have an automatic conversion rule for type DateTimeOffset[] to Sexp.
      ExceptionType: ArgumentException

推荐答案

从您的错误日志中,我认为这应该与DateTimeOffset有关.请参阅以下文档以查看其转换规则.

From your error log, I think it should be something related to DateTimeOffset. Please refer to following document to see the conversion rule of that.

https://docs.microsoft.com/zh-cn/dotnet/standard/datetime/instantiating-a-datetimeoffset-object#implicit-type-conversion

https://docs.microsoft.com/en-us/dotnet/standard/datetime/instantiating-a-datetimeoffset-object#implicit-type-conversion

我仍然会为此工作,并告诉您是否还有更多更新.

I will still work for it, and tell you if I have more update.

此致

雨桐


这篇关于将日期发布到可运行的Web服务失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆