Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting an Xml string to dataset
Message
 
To
13/12/2005 14:03:58
General information
Forum:
ASP.NET
Category:
Web Services
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Miscellaneous
Thread ID:
01077591
Message ID:
01077801
Views:
40
Sid,

To follow up on what Bonnie has said, when I did some web services that passed data as XML from VFP, I used the additional parameters of the CURSORTOXML() to make your call look like this:
CursorToXML("CsrAllSkus", "cTestxml", 1, 8, 0, "1")
The key there (I think) is the last parameter which puts the schema inline.

HTH,
Chad

>Have you tried it this way:
>
>[WebMethod]
>public bool UpadateOrderDetailComponent(string xmlRplSkus)
>{
>  DataSet ds = new DataSet();
>  StringReader sr = new StringReader(xmlRplSkus);
>  ds.ReadXml(sr, XmlReadMode.InferSchema);
>  .
>  .
>  .
>  return true;
>}
>
>This will work fine, as long as your CursorToXML returns XML that .NET recognizes. I haven't done anything lately with XML from VFP, but I seem to remember a potential problem with CursorToXML (but I don't remember anything else about it ... it was a few years ago and my memory ain't what it used to be. <g>)
>
>~~Bonnie
>
>
>
>>I'm calling a c# web service (vs 2005) from vfp7. What I have to do is: (1) Convert vfp7 cursor to xml, (2) pass the xml string to the ws method, and (3) create dataset from the xml string.
>>
>>Code in vfp7 side:
>>----------------------
>>
>>o = CREATEOBJECT("MSSoap.SoapClient")
>>
>>=o.MSSoapInit("http://localhost:2947/ChangeBomSkuProcess/Service.asmx?WSDL")
>>=CursorToXML("CsrAllSkus", "cTestxml")
>>?o.UpadateOrderDetailComponent(cTestxml)
>>
>>
>>code in c# side:
>>---------------------
>>
>>[WebMethod]
>>public bool UpadateOrderDetailComponent(string xmlRplSkus)
>>{
>> XmlDataDocument xmlDataDocument = new XmlDataDocument();
>> xmlDataDocument.LoadXml(xmlRplSkus);
>> DataSet ds = xmlDataDocument.DataSet;
>> .
>> .
>> .
>> return true;
>>}
>>
>>
>>Now, when I step thru the code in C#, in the watch window ds is of type dataset. But the dataset is empty.
>>
>>Am I using the right command to convert the xml string to a dataset?
_________________________________
There are 2 types of people in the world:
    Those who need closure
Previous
Reply
Map
View

Click here to load this message in the networking platform