C# SSRS和WCF测试中Soap请求的查询方法
我正在寻找一个好的测试工具,用于生成Xml查询请求,并了解如何将它们与返回Xml for SSR的soap请求一起使用 我看到一些关于测试WCF服务的SOAP请求的线程,这些线程推荐了一些产品,还有人在codeplex上提到了“WebServiceStudio:”。问题在于,该工具似乎无法直接生成“xml请求”部分。我不确定这种语法是属于SSRS还是属于SOAP家族的一部分,所以我真的在寻找关于从哪里开始的建议,并且认为我只能在BusinessIntelligenceDevelopmentStudio BIDS中单独测试似乎有点疯狂 到目前为止所做工作的一点背景:C# SSRS和WCF测试中Soap请求的查询方法,c#,wcf,soap,reporting-services,C#,Wcf,Soap,Reporting Services,我正在寻找一个好的测试工具,用于生成Xml查询请求,并了解如何将它们与返回Xml for SSR的soap请求一起使用 我看到一些关于测试WCF服务的SOAP请求的线程,这些线程推荐了一些产品,还有人在codeplex上提到了“WebServiceStudio:”。问题在于,该工具似乎无法直接生成“xml请求”部分。我不确定这种语法是属于SSRS还是属于SOAP家族的一部分,所以我真的在寻找关于从哪里开始的建议,并且认为我只能在BusinessIntelligenceDevelopmentStu
public List<tblState> GetStatesTable()
{
using (SSRSReportsEntities re = new SSRSReportsEntities())
{
return re.tblStates.ToList();
}
}
public List<tblState> GetStateLike(string state)
{
using (SSRSReportsEntities re = new SSRSReportsEntities())
{
return re.tblStates.Where(n => n.State.Contains(state)).ToList();
}
}
public List<fMonthly_Result> GetMonthlyData(DateTime aStart, DateTime aEnd)
{
using (SSRSReportsEntities re = new SSRSReportsEntities())
{
return re.fMonthly(aStart, aEnd, null).ToList();
}
}
public List GetStatesTable()
{
使用(ssrsreportsenties re=new ssrsreportsenties())
{
返回re.tblStates.ToList();
}
}
公共列表GetStateLike(字符串状态)
{
使用(ssrsreportsenties re=new ssrsreportsenties())
{
返回re.tblStates.Where(n=>n.State.Contains(State)).ToList();
}
}
公共列表GetMonthlyData(DateTime aStart、DateTime aEnd)
{
使用(ssrsreportsenties re=new ssrsreportsenties())
{
返回re.fMonthly(aStart,aEnd,null).ToList();
}
}
< Query>
< Method Name="GetStatesTable" Namespace="http://tempuri.org/">
< /Method>
< SoapAction>
http://tempuri.org/IReportingService/GetStatesTable
</SoapAction>
</Query>
< Query>
< Method Name="GetStateLike" Namespace="http://tempuri.org/">
< Parameters>
<Parameter Name="state">
</Parameter>
</Parameters>
</Method>
< SoapAction>
http://tempuri.org/IReportingService/GetStateLike
</SoapAction>
</Query>
< Query>
< Method Name="GetMonthlyData" Namespace="http://tempuri.org/">
< Parameters>
< Parameter Name="aStart"></Parameter>
< Parameter Name="aEnd"></Parameter>
</Parameters>
</Method>
< SoapAction>
http://tempuri.org/IReportingService/GetMonthlyData
</SoapAction>
</Query>
http://tempuri.org/IReportingService/GetStatesTable
<参数>
http://tempuri.org/IReportingService/GetStateLike
<参数>
http://tempuri.org/IReportingService/GetMonthlyData
第三个给出了关于数据类型的错误,它无法对数据类型System.DataTime实现“4/1/2013”。我需要进行故障排除,但不确定从何处开始测试。非常感谢您的帮助。好吧,我的答案有点站不住脚,不是我想要的,但它很有效。我将GetMonthly的签名改为接受字符串输入。然后我将它们转换为方法主体中的日期时间。似乎我可以在SSRS中验证一个合法的DateTime,作为WCF服务在XML中识别为文本的参数。因此,对合法日期的错误检查是在SSRS上进行的,但字符串将转换为.NET System.DateTime。我真的不喜欢这个答案,但它是有效的
public List<fMonthly_Result> GetMonthlyData2(string aStart, string aEnd)
{
using (SSRSReportsEntities re = new SSRSReportsEntities())
{
DateTime dstart = DateTime.Parse(aStart);
DateTime dend = DateTime.Parse(aEnd);
return re.fMonthly(dstart, dend, null).ToList();
}
}
public List getmonthlydata(字符串aStart,字符串aEnd)
{
使用(ssrsreportsenties re=new ssrsreportsenties())
{
DateTime dstart=DateTime.Parse(aStart);
DateTime dend=DateTime.Parse(aEnd);
返回re.fMonthly(dstart,dend,null).ToList();
}
}
现在,只要我先输入参数并将其映射到报表项目中定义的现有参数,这将起作用:
< Query>
< Method Name="GetMonthlyData" Namespace="http://tempuri.org/">
< Parameters>
< Parameter Name="aStart"></Parameter>
< Parameter Name="aEnd"></Parameter>
</Parameters>
</Method>
< SoapAction>
http://tempuri.org/IReportingService/GetMonthlyData
</SoapAction>
</Query>
<参数>
http://tempuri.org/IReportingService/GetMonthlyData