![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Hello. In response to your questions regarding the automatic (on the fly) generation of the proxy for the DataSet. The DataSet does not actually change any proxy settings anywhere. If you have a DS object getting passed back as a return value on a method call, the client will expect a DataSet object until you go in and manually change it. I think that you're refering to the fact that a DataSet object can obviously return different data in the form of DataTables, Rows, etc. Each DataSet can be completely different and yet all the client has to do is expect a single DataSet and it works. Is this what you're talking about? If so, then let's talk a bit about the inner workings of a DataSet. The DS implements the ISerializable interface and will basically turn all of the data it carries into XML format to pass back to the client. A DataSet object containing the authors table in the pubs database would look something like the soap response below. You would have to implement the ISerializable interface if you want something like that. ?xml version="1.0" encoding="utf-8" ? - <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" - <soap:Body - <GimmeDataResponse xmlns="http://tempuri.org/" - <GimmeDataResult - <xs:schema id="ScottsDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" - <xs:element name="ScottsDataSet" msdata:IsDataSet="true" - <xs:complexType - <xs:choice maxOccurs="unbounded" - <xs:element name="authors" - <xs:complexType - <xs:sequence + <xs:element name="au_id" - <xs:simpleType - <xs:restriction base="xs:string" xs:maxLength value="11" / /xs:restriction /xs:simpleType /xs:element - <xs:element name="au_lname" - <xs:simpleType - <xs:restriction base="xs:string" xs:maxLength value="40" / /xs:restriction /xs:simpleType /xs:element - <xs:element name="au_fname" - <xs:simpleType - <xs:restriction base="xs:string" xs:maxLength value="20" / /xs:restriction /xs:simpleType /xs:element - <xs:element name="phone" - <xs:simpleType - <xs:restriction base="xs:string" xs:maxLength value="12" / /xs:restriction /xs:simpleType /xs:element - <xs:element name="address" minOccurs="0" - <xs:simpleType - <xs:restriction base="xs:string" xs:maxLength value="40" / /xs:restriction /xs:simpleType /xs:element - <xs:element name="city" minOccurs="0" - <xs:simpleType - <xs:restriction base="xs:string" xs:maxLength value="20" / /xs:restriction /xs:simpleType /xs:element - <xs:element name="state" minOccurs="0" - <xs:simpleType - <xs:restriction base="xs:string" xs:maxLength value="2" / /xs:restriction /xs:simpleType /xs:element - <xs:element name="zip" minOccurs="0" - <xs:simpleType - <xs:restriction base="xs:string" xs:maxLength value="5" / /xs:restriction /xs:simpleType /xs:element xs:element name="contract" type="xs:boolean" / /xs:sequence /xs:complexType /xs:element /xs:choice /xs:complexType - <xs:unique name="Constraint1" msdata:PrimaryKey="true" xs:selector xpath=".//authors" / xs:field xpath="au_id" / /xs:unique /xs:element /xs:schema - <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1" - <ScottsDataSet xmlns="" - <authors diffgr:id="authors1" msdata:rowOrder="0" au_id>172-32-1176</au_id au_lname>Black</au_lname au_fname>Johnson</au_fname phone>408 496-7223</phone address>10932 Bigge Rd.</address city>Menlo Park</city state>CA</state zip>94025</zip contract>true</contract /authors - <authors diffgr:id="authors2" msdata:rowOrder="1" au_id>213-46-8915</au_id au_lname>Green</au_lname au_fname>Marjorie</au_fname phone>415 986-7020</phone address>309 63rd St. #411</address city>Oakland</city state>CA</state zip>94618</zip contract>true</contract /authors etc. Thank you, Scott Mason Microsoft This posting is provided "AS IS", with no warranties, and confers no rights. |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
By deafult Web service proxy will include all public classes ,This is generated by .NET frame work,We can't change this behaviour would explain all. But there is an "except" to this senteces! |
|
in my example I didn't see any Namespace differences between Dataset and Custom class |
#8
| |||
| |||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |