SSRS XML Query Issue

250 Views Asked by At

I have an issue with an XML Query that I have been chewing for a while and I can't get past it. I have:

  1. Created a Shared XML Data Source pointing to an ASMX web service.
  2. Attempted to create a Dataset using XML Query.

a) If I take the web service results and run the XML Query using <XMLData>, then I get a resultset back. Obviously the query doesn't include Method or SoapAction since it is directly accessing the <XMLData>. I do include the following <ElementPath>outboundMessage/clinicLocationPanel/clinicLocation</ElementPath>.

b) If I exclude the <XMLData> and include both the SoapAction and the Method and use the wildcard <ElementPath IgnoreNamespaces="true">*</ElementPath> then I get a resultset back.

c) However, if I try doing "b)" with <ElementPath>outboundMessage/clinicLocationPanel/clinicLocation</ElementPath>, then it returns no results (a bunch of empty rows).

Sample for "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>

Side Note: When I use SQL Profiler, I see that the parameter is being passed correctly and if take the same query from the SQL profiler and execute it, it will return XML. I think my problem might be related to the <Method> or <ElementPath> tags.

0

There are 0 best solutions below