s.aijaz1
07-04-2011, 07:49 AM
hi
i am a beginner in android application development. I have developed a web service in dotnet. the methods of the webservice are returning dataset. I need a help to understand how do we bind a webservice to list view for android(Eclipse). im stuck please help. below is web method:
[WebMethod(Description = "the method fetches clean log for a customer")]
public DataSet FetchCleanLog(int CustomerID)
{
DataSet aDataSet = new DataSet();
CleanLogBL bl = new CleanLogBL(0);
bl.FetchAllForCustomer(aDataSet, CustomerID);
return aDataSet;
}
WEB SERVICE GENERATED XML
----------------------------------------------
<DataSet xmlns="http://tempuri.org/">
<xs:schema xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"id="NewDataSet">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="tbCleanLog">
<xs:complexType>
<xs:sequence>
<xs:element name="CleanLog" type="xs:long" minOccurs="0"/>
<xs:element name="Customer" type="xs:long" minOccurs="0"/>
<xs:element name="Name" type="xs:string" minOccurs="0"/>
<xs:element name="Cleaned" type="xs:boolean" minOccurs="0"/>
<xs:element name="Color" type="xs:long" minOccurs="0"/>
<xs:element name="ColorName" type="xs:string" minOccurs="0"/>
<xs:element name="CleanDate" type="xs:string" minOccurs="0"/>
<xs:element name="CreatedBySystemUser" type="xs:long" minOccurs="0"/>
<xs:element name="CreatedOnDate" type="xs:string" minOccurs="0"/>
<xs:element name="ModifiedBySystemUser" type="xs:long" minOccurs="0"/>
<xs:element name="ModifiedOnDate" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet xmlns="">
<tbCleanLog diffgr:id="tbCleanLog1" msdata:rowOrder="0">
<CleanLog>1</CleanLog>
<Customer>1</Customer>
<Name>Hitler</Name>
<Cleaned>true</Cleaned>
<Color>1</Color>
<ColorName>Yellow Brava</ColorName>
<CleanDate>01/06/2011</CleanDate>
<CreatedBySystemUser>1</CreatedBySystemUser>
</tbCleanLog>
</NewDataSet>
</diffgr:diffgram>
</DataSet>
i am a beginner in android application development. I have developed a web service in dotnet. the methods of the webservice are returning dataset. I need a help to understand how do we bind a webservice to list view for android(Eclipse). im stuck please help. below is web method:
[WebMethod(Description = "the method fetches clean log for a customer")]
public DataSet FetchCleanLog(int CustomerID)
{
DataSet aDataSet = new DataSet();
CleanLogBL bl = new CleanLogBL(0);
bl.FetchAllForCustomer(aDataSet, CustomerID);
return aDataSet;
}
WEB SERVICE GENERATED XML
----------------------------------------------
<DataSet xmlns="http://tempuri.org/">
<xs:schema xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"id="NewDataSet">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="tbCleanLog">
<xs:complexType>
<xs:sequence>
<xs:element name="CleanLog" type="xs:long" minOccurs="0"/>
<xs:element name="Customer" type="xs:long" minOccurs="0"/>
<xs:element name="Name" type="xs:string" minOccurs="0"/>
<xs:element name="Cleaned" type="xs:boolean" minOccurs="0"/>
<xs:element name="Color" type="xs:long" minOccurs="0"/>
<xs:element name="ColorName" type="xs:string" minOccurs="0"/>
<xs:element name="CleanDate" type="xs:string" minOccurs="0"/>
<xs:element name="CreatedBySystemUser" type="xs:long" minOccurs="0"/>
<xs:element name="CreatedOnDate" type="xs:string" minOccurs="0"/>
<xs:element name="ModifiedBySystemUser" type="xs:long" minOccurs="0"/>
<xs:element name="ModifiedOnDate" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet xmlns="">
<tbCleanLog diffgr:id="tbCleanLog1" msdata:rowOrder="0">
<CleanLog>1</CleanLog>
<Customer>1</Customer>
<Name>Hitler</Name>
<Cleaned>true</Cleaned>
<Color>1</Color>
<ColorName>Yellow Brava</ColorName>
<CleanDate>01/06/2011</CleanDate>
<CreatedBySystemUser>1</CreatedBySystemUser>
</tbCleanLog>
</NewDataSet>
</diffgr:diffgram>
</DataSet>