I've written a simple WebService in D8 that sends back XML files and String.
This is what I getting back from the Web Service:
<string xmlns="http://tempuri.org/"><NewDataSet>
<BankarKey>
<CompID>ELIA</CompID>
<CompName>ELIA Bankar</CompName>
</BankarKey>
<BankarKey>
<CompID>ELIT</CompID>
<CompName>ELIT Bankar</CompName>
</BankarKey>
</NewDataSet>
</string>
Now comes the problem of loading it into the client application.
I've tried to load it into TXMLDocument and it goes active without a hitch.
Then I tried loading it into a TClientDataSet with this statement:
ClientDataSet1.XMLData := XMLDocument1.ToString;
I've also tried loading it into a Memo and from there to the ClientDataSet
but I get the same error.
Mismatch in datapacket.
What other components do I need to read the XML as a Table?
regards,
nisbus
If I understand it correctly you are trying to use .NET DataSet returned from
.NET web service with TClientDataSet component (in Win32 application).
Microsoft and Borland have different format of XML data/schema for their
dataset components so you can assign them directly. You need to convert them.
You can use XML Transformation (available in Enterprise+ edition only) to
create individual transformation for particular dataset. But if its format
changes in the future you would need to recreate the transformation again.
To solve this I wrote code which can do (to some extent only) automatic
transformation between .NET DataSet diffgram format and ClientDataSet
DATAPACKET format. I can send you current version (for Delphi 7) if you want.
Petr.