4 Replies Latest reply on Jan 16, 2007 9:09 AM by ntsiii

    Working with webservice XML Results

    JMR4ID
      I am getting the following xml from a native sql webservice. The results are formatted as "e4x" and it only seems to work if i use a XMLList. The XMLList that I end up with is a list of one item that is the whole xml document. I would like to be able to access individual items (i.e. the rows) and also load the MonthID and MonthName into a datagrid but cant seem to figure this out. Any suggestions would be greatly appreciated.

      <method:GetMonthsResponse xmlns:method="http//localhost/" xmlns:sql=" http://schemas.microsoft.com/sqlserver/2004/SOAP" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:sqlmessage=" http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlMessage" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:sqlsoaptypes=" http://schemas.microsoft.com/sqlserver/2004/SOAP/types" xmlns:xsd=" http://www.w3.org/2001/XMLSchema" xmlns:sqltypes=" http://schemas.microsoft.com/sqlserver/2004/sqltypes" xmlns:sqltransaction=" http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlTransaction" xmlns:SOAP-ENV=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:sqlresultstream=" http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlResultStream" xmlns:sqlrowcount=" http://schemas.microsoft.com/sqlserver/2004/SOAP/types/SqlRowCount">
      <method:GetMonthsResult>
      <sqlresultstream:SqlRowSet msdata:UDTColumnValueWrapped="true" xsi:type="sqlsoaptypes:SqlRowSet" msdata:UseDataSetSchemaOnly="true">
      <diffgr:diffgram xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
      <SqlRowSet1 xmlns="urn:schemas-microsoft-com:sql:SqlRowSet1">
      <row>
      <MonthID>1</MonthID>
      <MonthName>January</MonthName>
      </row>
      <row>
      <MonthID>2</MonthID>
      <MonthName>February</MonthName>
      </row>
      <row>
      <MonthID>3</MonthID>
      <MonthName>March</MonthName>
      </row>
      <row>
      <MonthID>4</MonthID>
      <MonthName>April</MonthName>
      </row>
      <row>
      <MonthID>5</MonthID>
      <MonthName>May</MonthName>
      </row>
      <row>
      <MonthID>6</MonthID>
      <MonthName>June</MonthName>
      </row>
      <row>
      <MonthID>7</MonthID>
      <MonthName>July</MonthName>
      </row>
      <row>
      <MonthID>8</MonthID>
      <MonthName>August</MonthName>
      </row>
      <row>
      <MonthID>9</MonthID>
      <MonthName>September</MonthName>
      </row>
      <row>
      <MonthID>10</MonthID>
      <MonthName>October</MonthName>
      </row>
      <row>
      <MonthID>11</MonthID>
      <MonthName>November</MonthName>
      </row>
      <row>
      <MonthID>12</MonthID>
      <MonthName>December</MonthName>
      </row>
      </SqlRowSet1>
      </diffgr:diffgram>
      </sqlresultstream:SqlRowSet>
      <sqlresultstream:SqlRowCount xsi:type="sqlrowcount:SqlRowCount">
      <sqlrowcount:Count>12</sqlrowcount:Count>
      </sqlresultstream:SqlRowCount>
      <sqlresultstream:SqlResultCode xsi:type="sqlsoaptypes:SqlResultCode">0</sqlresultstream:SqlResultCode>
      </method:GetMonthsResult>
      </method:GetMonthsResponse>