Mike
I'd go with custom classes instead of DataSets... The guidelines tell us
that DataSets don't fit well into interop. scenarios. For example InfoPath
doesn't like them, but also BizTalk for example works easier with serialized
custom classes. What you can do is:
- Create the InfoPath form (start from scratch, no data connections)
- Extract the XSD from the XSN file
- Use the XSD.EXE tool to generate classes for that XSD
- Use those classes as a return value of your web service
This should save you some work!
--
Greetz,
Jan
________________________
Read my weblog:
http://weblogs.asp.net/jan
"Mike Morisoli" <> schreef in bericht
news:%...
> I am trying to figure out the proper way to return a .net dataset to
> InfoPath so that it likes it and the schema looks normal.
>
> InfoPath seems to want pure standard XML, nothing else. IP SP1 can read a
> standard .NET dataset, but the structure is very strange
> and convoluted.
>
> Here are some examples that don't work. I am hoping that someone has done
> this before and knows a simple way. The only other examples I have found
> take the dataset and walk thru it one row at a time creating a series of
> arrays and returning an arrary structure for the dataset.
>
> Example 1:
>
> [WebMethod( Description = "Returns a list of all the Axapta vendors we are
> authorized to purchase from. Typically used to fill dropdown list
> boxes." )]
> public DataSet GetAuthorizedVendors()
> {
> DataSet ds =
>
SqlHelper.ExecuteDataset(ConfigurationSettings.App Settings["ConnectionString
> "], "GetAuthorizedVendors");
> return ds;
> }
>
> I have tried to convert the ds into an XML document using this method,
which
> is better, but still produces a strange schema.
>
> [WebMethod( Description = "Returns an xml list of all the Axapta vendors
we
> are authorized to purchase from. Typically used to fill dropdown list
> boxes." )]
> public XmlDataDocument GetAuthorizedVendorsXML()
> {
> XmlDataDocument xmlDoc = new
XmlDataDocument(this.GetAuthorizedVendors());
> return xmlDoc;
> }
>
> The only other examples I have seen create a series of array elements
which
> require a ton of code and will be hard to maintain.
>
> Can anyone provide me with some better ways to go?
>
> Thanks for your time, Mike
>
>