SSRS XML查询问题

时间:2018-05-22 13:10:26

标签: xml reporting-services asmx qxmlquery

我有一个XML查询的问题,我一直在咀嚼一段时间,我无法通过它。我有:

  1. 创建了一个指向ASMX Web服务的共享XML数据源。
  2. 尝试使用XML查询创建数据集。
  3. a)如果我使用<XMLData>获取Web服务结果并运行XML查询,那么我将返回结果集。显然,查询不包括Method或SoapAction,因为它直接访问<XMLData>.我包括以下<ElementPath>outboundMessage/clinicLocationPanel/clinicLocation</ElementPath>.

    b)如果我排除<XMLData>并同时包含SoapAction和Method并使用通配符<ElementPath IgnoreNamespaces="true">*</ElementPath>,那么我会得到一个结果集。

    c)但是,如果我尝试用<ElementPath>outboundMessage/clinicLocationPanel/clinicLocation</ElementPath>做“b)”,那么它不会返回任何结果(一堆空行)。

    “a)”的样本:

    <Query xmlns="http://sample.org/pcp">
      <XmlData>
    <?xml version="1.0" encoding="UTF-8"?>
    <outboundMessage xmlns="http://sample.org/pcp">
      <messageType>ADT</messageType>
      <triggerType>A28</triggerType>
      <outboundGUID>48B30711-4FC4-4A9A-8B73-BCF78EA7E23A</outboundGUID>
      <inmateProfile>
        <patientType/>
        <patientClass/>
        <accountNumber>123456789</accountNumber>
      </inmateProfile>
      <providerPanel>
        <provider>
          <medicalProviderAlias>1115</medicalProviderAlias>
          <medicalProviderID>CERN1948697</medicalProviderID>
          <providerType>PCP</providerType>
        </provider>
        <provider>
          <medicalProviderAlias>27201535</medicalProviderAlias>
          <medicalProviderID>CERN3114945</medicalProviderID>
          <providerType>RN</providerType>
        </provider>
        <provider>
          <medicalProviderAlias>4004132</medicalProviderAlias>
          <medicalProviderID>CERN1618580</medicalProviderID>
          <providerType>DDS</providerType>
        </provider>
      </providerPanel>
      <clinicLocationPanel>
        <clinicLocation>
          <medicalClinicAlias>31821049</medicalClinicAlias>
          <medicalClinicID>31868323</medicalClinicID>
          <clinicType>Nursing</clinicType>
        </clinicLocation>
        <clinicLocation>
          <medicalClinicAlias>31823201</medicalClinicAlias>
          <medicalClinicID>31870163</medicalClinicID>
          <clinicType>Medical</clinicType>
        </clinicLocation>
        <clinicLocation>
          <medicalClinicAlias>31821081</medicalClinicAlias>
          <medicalClinicID>31822493</medicalClinicID>
          <clinicType>Pharmacy</clinicType>
        </clinicLocation>
        <clinicLocation>
          <medicalClinicAlias>31821089</medicalClinicAlias>
          <medicalClinicID>31823145</medicalClinicID>
          <clinicType>Radiology</clinicType>
        </clinicLocation>
        <clinicLocation>
          <medicalClinicAlias>31821097</medicalClinicAlias>
          <medicalClinicID>31823145</medicalClinicID>
          <clinicType>MentalHealth</clinicType>
        </clinicLocation>
        <clinicLocation>
          <medicalClinicAlias>32909551</medicalClinicAlias>
          <medicalClinicID>31821579</medicalClinicID>
          <clinicType>Therapies</clinicType>
        </clinicLocation>
        <clinicLocation>
          <medicalClinicAlias>32909567</medicalClinicAlias>
          <medicalClinicID>31823145</medicalClinicID>
          <clinicType>Specialties</clinicType>
        </clinicLocation>
        <clinicLocation>
          <medicalClinicAlias>32909581</medicalClinicAlias>
          <medicalClinicID>31822109</medicalClinicID>
          <clinicType>Telemed</clinicType>
        </clinicLocation>
      </clinicLocationPanel>
    </outboundMessage>
      </XmlData>
    <ElementPath>outboundMessage/clinicLocationPanel/clinicLocation</ElementPath>
    </Query>
    

    备注:当我使用SQL事件探查器时,我看到参数正在正确传递,如果从SQL事件探查器获取相同的查询并执行它,它将返回XML。我认为我的问题可能与<Method><ElementPath>代码有关。

0 个答案:

没有答案