servicestack,Reporting Services,servicestack" /> servicestack,Reporting Services,servicestack" />

Reporting services Servicestack作为SSRS数据源

Reporting services Servicestack作为SSRS数据源,reporting-services,servicestack,Reporting Services,servicestack,我正在尝试使用servicestack作为我的SSRS报告的数据源。这可能吗?现在我有一个简单的操作,将日期作为参数,在C中是这样的# [DataContract] [Route(“/Reports/SummaryBySymbol/{SummaryDate}”,Summary=“按特定日期的符号汇总交易。”)] 公共类GetTradesGroupedBySymbol:IReturn { [数据成员] [ApiMember(Name=“摘要日期”, Description=“交易汇总的日期..”,

我正在尝试使用servicestack作为我的SSRS报告的数据源。这可能吗?现在我有一个简单的操作,将日期作为参数,在C中是这样的#

[DataContract]
[Route(“/Reports/SummaryBySymbol/{SummaryDate}”,Summary=“按特定日期的符号汇总交易。”)]
公共类GetTradesGroupedBySymbol:IReturn
{
[数据成员]
[ApiMember(Name=“摘要日期”,
Description=“交易汇总的日期..”,
DataType=“DateTime”,
IsRequired=true)]
公共日期时间摘要日期{get;set;}
}
[数据合同]
公共类TradesGroupedBySymbolResponse
{
[DataMember]公共IList结果{get;set;}
}
我正在尝试使用以下方法在SSRS中创建数据集: 作为数据源

当数据集要求查询时,我不知道输入什么作为文本,当我点击“下一步”按钮时,示例总是导致界面冻结(因此我必须假设我输入了错误的内容)

以下是我尝试输入的查询:

<Query>
  <Method Namespace="http://www.company.com/types" Name="GetTradesGroupedBySymbol" />
  <SoapAction>
      http://www.company.com/types/GetTradesGroupedBySymbol
  </SoapAction>
  <Parameters>
    <Parameter Name="SummaryDate" Type="XML"/>
  </Parameters>
  <ElementPath IgnoreNamespaces="True"> 
    GetTradesGroupedBySymbolResponse{}/Result{}/SymbolSummary
  </ElementPath> 
</Query>

http://www.company.com/types/GetTradesGroupedBySymbol
GetTradesGroupedBySymbolResponse{}/Result{}/SymbolSummary
以下是服务的wsdl:

    <wsdl:definitions xmlns:svc="http://www.company.com/types" xmlns:tns="http://www.company.com/types" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" name="Soap11" targetNamespace="http://www.company.com/types">
  <wsdl:types>
    <xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/">
      <xs:element name="anyType" nillable="true" type="xs:anyType"/>
      <xs:element name="anyURI" nillable="true" type="xs:anyURI"/>
      <xs:element name="base64Binary" nillable="true" type="xs:base64Binary"/>
      <xs:element name="boolean" nillable="true" type="xs:boolean"/>
      <xs:element name="byte" nillable="true" type="xs:byte"/>
      <xs:element name="dateTime" nillable="true" type="xs:dateTime"/>
      <xs:element name="decimal" nillable="true" type="xs:decimal"/>
      <xs:element name="double" nillable="true" type="xs:double"/>
      <xs:element name="float" nillable="true" type="xs:float"/>
      <xs:element name="int" nillable="true" type="xs:int"/>
      <xs:element name="long" nillable="true" type="xs:long"/>
      <xs:element name="QName" nillable="true" type="xs:QName"/>
      <xs:element name="short" nillable="true" type="xs:short"/>
      <xs:element name="string" nillable="true" type="xs:string"/>
      <xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte"/>
      <xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt"/>
      <xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong"/>
      <xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort"/>
      <xs:element name="char" nillable="true" type="tns:char"/>
      <xs:simpleType name="char">
        <xs:restriction base="xs:int"/>
      </xs:simpleType>
      <xs:element name="duration" nillable="true" type="tns:duration"/>
      <xs:simpleType name="duration">
        <xs:restriction base="xs:duration">
          <xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
          <xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
          <xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="guid" nillable="true" type="tns:guid"/>
      <xs:simpleType name="guid">
        <xs:restriction base="xs:string">
          <xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/>
        </xs:restriction>
      </xs:simpleType>
      <xs:attribute name="FactoryType" type="xs:QName"/>
      <xs:attribute name="Id" type="xs:ID"/>
      <xs:attribute name="Ref" type="xs:IDREF"/>
    </xs:schema>
    <xs:schema xmlns:tns="http://www.company.com/types" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.company.com/types">
      <xs:complexType name="GetTradesGroupedBySymbol">
        <xs:sequence>
          <xs:element minOccurs="0" name="SummaryDate" type="xs:dateTime"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="GetTradesGroupedBySymbol" nillable="true" type="tns:GetTradesGroupedBySymbol"/>
      <xs:complexType name="GetTradesGroupedBySymbolResponse">
        <xs:sequence>
          <xs:element minOccurs="0" name="Result" nillable="true" type="tns:ArrayOfSymbolSummary"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="GetTradesGroupedBySymbolResponse" nillable="true" type="tns:GetTradesGroupedBySymbolResponse"/>
      <xs:complexType name="ArrayOfSymbolSummary">
        <xs:sequence>
          <xs:element minOccurs="0" maxOccurs="unbounded" name="SymbolSummary" nillable="true" type="tns:SymbolSummary"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="ArrayOfSymbolSummary" nillable="true" type="tns:ArrayOfSymbolSummary"/>
      <xs:complexType name="SymbolSummary">
        <xs:sequence>
          <xs:element minOccurs="0" name="BuyQuantityFilled" type="xs:int"/>
          <xs:element minOccurs="0" name="BuyTotalValue" type="xs:double"/>
          <xs:element minOccurs="0" name="BuyWeightedAveragePrice" type="xs:double"/>
          <xs:element minOccurs="0" name="CompanyName" nillable="true" type="xs:string"/>
          <xs:element minOccurs="0" name="SellQuantityFilled" type="xs:int"/>
          <xs:element minOccurs="0" name="SellTotalValue" type="xs:double"/>
          <xs:element minOccurs="0" name="SellWeightedAveragePrice" type="xs:double"/>
          <xs:element minOccurs="0" name="Ticker" nillable="true" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="SymbolSummary" nillable="true" type="tns:SymbolSummary"/>
    </xs:schema>
  </wsdl:types>
  <wsdl:message name="GetTradesGroupedBySymbolIn">
    <wsdl:part name="par" element="tns:GetTradesGroupedBySymbol"/>
  </wsdl:message>
  <wsdl:message name="GetTradesGroupedBySymbolOut">
    <wsdl:part name="par" element="tns:GetTradesGroupedBySymbolResponse"/>
  </wsdl:message>
  <wsdl:portType name="ISyncReply">
    <wsdl:operation name="GetTradesGroupedBySymbol">
      <wsdl:input message="svc:GetTradesGroupedBySymbolIn"/>
      <wsdl:output message="svc:GetTradesGroupedBySymbolOut"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="BasicHttpBinding_ISyncReply" type="svc:ISyncReply">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="GetTradesGroupedBySymbol">
      <soap:operation soapAction="http://www.company.com/types/GetTradesGroupedBySymbol" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="SyncReply">
    <wsdl:port name="BasicHttpBinding_ISyncReply" binding="svc:BasicHttpBinding_ISyncReply">
      <soap:address location="http://serverName:port/soap11"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

我希望查询在尝试运行soapAction(或至少出错)之前询问我一个参数,但接口只是锁定了,我必须杀死Visual Studio。有没有关于我做错了什么的想法

编辑1


修改了上述查询和wsdl,以显示使其工作的最新尝试。VS仍然冻结。

问题似乎是长时间运行的webservice响应导致向导中的连接超时,并导致整个VS2017环境冻结(不是最佳行为)。一旦我创建了一个虚拟版本的webservice,它用相同的DTO和两个虚拟行进行响应,但在不到一秒钟的时间内返回,一切都正常了。生成了报告,然后我可以进入数据集,将超时时间更改为2分钟,然后将查询更改为指向真实的web方法,并按预期工作


作为后续详细信息,如果要将日期传递给ServiceStack,请使用“字符串”数据类型(不是XML),并确保日期格式为yyyy mm dd(如果月和日是个位数,则必须用零填充)。

测试数据源时,它是否表示成功?如何测试XML数据源?如果您所说的测试是指Web服务是否工作并返回结果,那么是的。如果你的意思是其他的,请解释。当你在SSRS中创建数据源时,有一个“测试连接”按钮。这将告诉我们它是否能够建立连接。在运行查询之前,这必须起作用。我不确定您使用的visual studio的版本,但在VS2017上没有用于xml数据源的“测试连接”按钮(请参阅上面的链接“我可以找到”,以查看我的连接对话框的屏幕截图)。
    <wsdl:definitions xmlns:svc="http://www.company.com/types" xmlns:tns="http://www.company.com/types" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" name="Soap11" targetNamespace="http://www.company.com/types">
  <wsdl:types>
    <xs:schema xmlns:tns="http://schemas.microsoft.com/2003/10/Serialization/" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://schemas.microsoft.com/2003/10/Serialization/">
      <xs:element name="anyType" nillable="true" type="xs:anyType"/>
      <xs:element name="anyURI" nillable="true" type="xs:anyURI"/>
      <xs:element name="base64Binary" nillable="true" type="xs:base64Binary"/>
      <xs:element name="boolean" nillable="true" type="xs:boolean"/>
      <xs:element name="byte" nillable="true" type="xs:byte"/>
      <xs:element name="dateTime" nillable="true" type="xs:dateTime"/>
      <xs:element name="decimal" nillable="true" type="xs:decimal"/>
      <xs:element name="double" nillable="true" type="xs:double"/>
      <xs:element name="float" nillable="true" type="xs:float"/>
      <xs:element name="int" nillable="true" type="xs:int"/>
      <xs:element name="long" nillable="true" type="xs:long"/>
      <xs:element name="QName" nillable="true" type="xs:QName"/>
      <xs:element name="short" nillable="true" type="xs:short"/>
      <xs:element name="string" nillable="true" type="xs:string"/>
      <xs:element name="unsignedByte" nillable="true" type="xs:unsignedByte"/>
      <xs:element name="unsignedInt" nillable="true" type="xs:unsignedInt"/>
      <xs:element name="unsignedLong" nillable="true" type="xs:unsignedLong"/>
      <xs:element name="unsignedShort" nillable="true" type="xs:unsignedShort"/>
      <xs:element name="char" nillable="true" type="tns:char"/>
      <xs:simpleType name="char">
        <xs:restriction base="xs:int"/>
      </xs:simpleType>
      <xs:element name="duration" nillable="true" type="tns:duration"/>
      <xs:simpleType name="duration">
        <xs:restriction base="xs:duration">
          <xs:pattern value="\-?P(\d*D)?(T(\d*H)?(\d*M)?(\d*(\.\d*)?S)?)?"/>
          <xs:minInclusive value="-P10675199DT2H48M5.4775808S"/>
          <xs:maxInclusive value="P10675199DT2H48M5.4775807S"/>
        </xs:restriction>
      </xs:simpleType>
      <xs:element name="guid" nillable="true" type="tns:guid"/>
      <xs:simpleType name="guid">
        <xs:restriction base="xs:string">
          <xs:pattern value="[\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}"/>
        </xs:restriction>
      </xs:simpleType>
      <xs:attribute name="FactoryType" type="xs:QName"/>
      <xs:attribute name="Id" type="xs:ID"/>
      <xs:attribute name="Ref" type="xs:IDREF"/>
    </xs:schema>
    <xs:schema xmlns:tns="http://www.company.com/types" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://www.company.com/types">
      <xs:complexType name="GetTradesGroupedBySymbol">
        <xs:sequence>
          <xs:element minOccurs="0" name="SummaryDate" type="xs:dateTime"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="GetTradesGroupedBySymbol" nillable="true" type="tns:GetTradesGroupedBySymbol"/>
      <xs:complexType name="GetTradesGroupedBySymbolResponse">
        <xs:sequence>
          <xs:element minOccurs="0" name="Result" nillable="true" type="tns:ArrayOfSymbolSummary"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="GetTradesGroupedBySymbolResponse" nillable="true" type="tns:GetTradesGroupedBySymbolResponse"/>
      <xs:complexType name="ArrayOfSymbolSummary">
        <xs:sequence>
          <xs:element minOccurs="0" maxOccurs="unbounded" name="SymbolSummary" nillable="true" type="tns:SymbolSummary"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="ArrayOfSymbolSummary" nillable="true" type="tns:ArrayOfSymbolSummary"/>
      <xs:complexType name="SymbolSummary">
        <xs:sequence>
          <xs:element minOccurs="0" name="BuyQuantityFilled" type="xs:int"/>
          <xs:element minOccurs="0" name="BuyTotalValue" type="xs:double"/>
          <xs:element minOccurs="0" name="BuyWeightedAveragePrice" type="xs:double"/>
          <xs:element minOccurs="0" name="CompanyName" nillable="true" type="xs:string"/>
          <xs:element minOccurs="0" name="SellQuantityFilled" type="xs:int"/>
          <xs:element minOccurs="0" name="SellTotalValue" type="xs:double"/>
          <xs:element minOccurs="0" name="SellWeightedAveragePrice" type="xs:double"/>
          <xs:element minOccurs="0" name="Ticker" nillable="true" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="SymbolSummary" nillable="true" type="tns:SymbolSummary"/>
    </xs:schema>
  </wsdl:types>
  <wsdl:message name="GetTradesGroupedBySymbolIn">
    <wsdl:part name="par" element="tns:GetTradesGroupedBySymbol"/>
  </wsdl:message>
  <wsdl:message name="GetTradesGroupedBySymbolOut">
    <wsdl:part name="par" element="tns:GetTradesGroupedBySymbolResponse"/>
  </wsdl:message>
  <wsdl:portType name="ISyncReply">
    <wsdl:operation name="GetTradesGroupedBySymbol">
      <wsdl:input message="svc:GetTradesGroupedBySymbolIn"/>
      <wsdl:output message="svc:GetTradesGroupedBySymbolOut"/>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="BasicHttpBinding_ISyncReply" type="svc:ISyncReply">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="GetTradesGroupedBySymbol">
      <soap:operation soapAction="http://www.company.com/types/GetTradesGroupedBySymbol" style="document"/>
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="SyncReply">
    <wsdl:port name="BasicHttpBinding_ISyncReply" binding="svc:BasicHttpBinding_ISyncReply">
      <soap:address location="http://serverName:port/soap11"/>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>