<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>XML Web Services</title><link>http://forums.asp.net/28.aspx</link><description>All about building XML Web Services with ASP.NET - SOAP, WSDL, WCF, etc. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=66&amp;c=17" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: XML serialisation problem</title><link>http://forums.asp.net/thread/939134.aspx</link><pubDate>Fri, 27 May 2005 15:59:45 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:939134</guid><dc:creator>mikecole</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/939134.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=939134</wfw:commentRss><description>&amp;lt;cite&amp;gt;&lt;BR&gt;&lt;FONT face=Arial&gt;Or should I manually copy all the properties from my BusinessLogicLayer.Order class to the WrightWebService.Order class before passing it to the webservice?&lt;BR&gt;&amp;lt;/cite&amp;gt;&lt;BR&gt;Yes! Thats exactly it -&amp;nbsp;you answered your&amp;nbsp;question. &amp;nbsp;At first look it seems like this is a bunch of overhead, right? Think of it this way, though... as you are copying the properties, what you are really doing is building an outbound document.&amp;nbsp; &lt;BR&gt;&lt;BR&gt;&amp;lt;cite&amp;gt;&lt;BR&gt;All I really need is my Order data in a sensible structure at the remote end!&lt;BR&gt;&amp;lt;/cite&amp;gt;&lt;BR&gt;Yep. And thats what you will have. WrightWebService.Order represents the sensible structure. Its the contract the webservice supports. Your actual order business objects on the client and on the server can vary independently.&amp;nbsp; You just need methods on the client and server to map to &amp;amp; from the contract.&lt;BR&gt;&lt;BR&gt;For some additional background, check out this&amp;nbsp;post by Kirk Evans: &lt;A HREF="/879657/ShowPost.aspx"&gt;http://forums.asp.net/879657/ShowPost.aspx&lt;/A&gt;&amp;nbsp; He explains here the advantages of defining our contracts first, rather than striving to remote our objects over web-services.&lt;BR&gt;&lt;BR&gt;HTH,&lt;BR&gt;Mike&lt;BR&gt;&amp;nbsp;&lt;/FONT&gt;</description></item><item><title>Re: XML serialisation problem</title><link>http://forums.asp.net/thread/938936.aspx</link><pubDate>Fri, 27 May 2005 13:54:18 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:938936</guid><dc:creator>nickg</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/938936.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=938936</wfw:commentRss><description>&lt;FONT face=Arial&gt;Perhaps you're correct and I'm approaching this wrong way, but I a problem and others told me that editing Reference.cs to point to my 'real' classes was the only way to solve the problem.&amp;nbsp; If instead I elect to use the generated classes, how do I pass my "Order" to the webservice and make sense of it at the other end? Perhaps you are able to give me some advice on the&amp;nbsp;'proper' way to solve my problem:&amp;nbsp;&lt;BR&gt;&lt;BR&gt;I always get the following error:&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;Wright.BusinessLogicLayer.WrightWebService.OrderWebService webService = &lt;FONT color=#0000ff&gt;new&lt;/FONT&gt; Wright.BusinessLogicLayer.WrightWebService.OrderWebService();&lt;BR&gt;MessageLabel.Text = webService.EchoOrder(order); // EchoOrder takes a Wright.BusinessLogicLayer.Order &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;c:\inetpub\wwwroot\wright\cdwebsite\checkout.aspx.cs(103,24): error CS1502: The best overloaded method match for 'Wright.BusinessLogicLayer.WrightWebService.OrderWebService.EchoOrder(Wright.BusinessLogicLayer.WrightWebService.Order)' has some invalid arguments&lt;BR&gt;c:\inetpub\wwwroot\wright\cdwebsite\checkout.aspx.cs(103,45): error CS1503: Argument '1': cannot convert from 'Wright.BusinessLogicLayer.Order' to 'Wright.BusinessLogicLayer.WrightWebService.Order'&lt;BR&gt;&lt;/FONT&gt;&lt;BR&gt;&lt;FONT face=Arial&gt;It doesn't seem to like converting my local "Order" class to the remote "Order" class.&amp;nbsp; Or should I manually copy all the properties from my BusinessLogicLayer.Order class to the WrightWebService.Order class before passing it to the webservice?&lt;BR&gt;&lt;BR&gt;I think I'm a bit lost... All I really need is my Order data in a sensible structure at the remote end! :)&lt;BR&gt;&lt;BR&gt;Thanks,&lt;BR&gt;&lt;BR&gt;Nick...&lt;/FONT&gt;&lt;/P&gt;</description></item><item><title>Re: XML serialisation problem</title><link>http://forums.asp.net/thread/937912.aspx</link><pubDate>Thu, 26 May 2005 16:20:56 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:937912</guid><dc:creator>tomasr</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/937912.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=937912</wfw:commentRss><description>Nickg,&lt;br&gt;
&lt;br&gt;
I agree with the other poster here: WS are not about remoting or
distributed object-oriented systems. With WS, what you're moving around
are XML documents, not objects. The fact that the platform allows you
to see the messages as if they were strongly typed classes instead of
the raw XML is just a convinience of the object model, but not the end
itself of the technology.&lt;br&gt;
&lt;br&gt;</description></item><item><title>Re: XML serialisation problem</title><link>http://forums.asp.net/thread/937788.aspx</link><pubDate>Thu, 26 May 2005 15:17:53 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:937788</guid><dc:creator>mikecole</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/937788.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=937788</wfw:commentRss><description>&lt;P&gt;&amp;lt;cite&amp;gt;&lt;BR&gt;The automatically generated reference.cs is just a basic example which usually contains many problems. For example, it creates server side skeleton classes which contain the properties of your own business classes but do not contain any of the methods. Therefore it's useless to most people.&lt;BR&gt;&amp;lt;/cite&amp;gt;&lt;BR&gt;&lt;BR&gt;Respectfully, you are missing the boat a little here. There is a really, really good reason why there are no methods generated in your proxy classes. The idea behind web services is to move documents around - not to move objects. &lt;BR&gt;&lt;BR&gt;By sharing type (classes) between your server and clients, you are creating a fragile architecture. The code on your server cannot vary independently from your clients.&amp;nbsp; Do you really want to distribute a new assembly to all your clients whenever you need to make a change? How about your java-clients? What are they going to do with&amp;nbsp;your .net&amp;nbsp;assembly?&lt;BR&gt;&lt;BR&gt;Certainly, your approach may&amp;nbsp;work fine in&amp;nbsp;your scenario. That is, sharing type in a&amp;nbsp;dcom/.net remoting style. However, it is not&amp;nbsp;in the spirit of webservices and SOA.&amp;nbsp; &amp;nbsp;Consider leaving your reference.cs alone.... think of these classes as transfer objects -- use them to load your business objects, only. These&amp;nbsp;transfer objects describe a contract you have with the webservice - that is their only responsibility. They provide you convenient&amp;nbsp;mechanism to parse the xml coming back&amp;nbsp;from the webservice. Don't confuse them with your actual business objects.&lt;BR&gt;&lt;BR&gt;Mike&lt;BR&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Re: XML serialisation problem</title><link>http://forums.asp.net/thread/937396.aspx</link><pubDate>Thu, 26 May 2005 08:50:24 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:937396</guid><dc:creator>nickg</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/937396.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=937396</wfw:commentRss><description>&amp;gt; There's no need for you to go around modifying reference.cs directly.... &lt;BR&gt;&lt;BR&gt;Of course there is. The automatically generated reference.cs is just a basic example which usually contains many problems.&lt;BR&gt;&amp;nbsp;&lt;BR&gt;For example, it creates server side skeleton classes which contain the properties of your own business classes but do not contain any of the methods. Therefore it's useless to most people. Every time I regenerate the reference.cs file, I have to go in and delete all these classes and instead include the namespace of where my real classes reside so I have the full functionality of the class at the server end as well as the client end. &lt;BR&gt;&lt;BR&gt;It's good enough for writing "hello world" but not much else...&lt;BR&gt;&lt;BR&gt;Nick...</description></item><item><title>Re: XML serialisation problem</title><link>http://forums.asp.net/thread/937219.aspx</link><pubDate>Thu, 26 May 2005 03:39:42 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:937219</guid><dc:creator>tomasr</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/937219.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=937219</wfw:commentRss><description>There's no need for you to go around modifying reference.cs
directly.... you can just click on the web reference and select
"refresh" (or is it update? can't remember right now) from the drop
down menu, and VS will go and fetch the updated WSDL and regenerate the
code for you.&lt;br&gt;</description></item><item><title>Re: XML serialisation problem</title><link>http://forums.asp.net/thread/936736.aspx</link><pubDate>Wed, 25 May 2005 19:12:42 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:936736</guid><dc:creator>nickg</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/936736.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=936736</wfw:commentRss><description>Thanks for that...&lt;br&gt;
&lt;br&gt;
What do you mean by "regenerating the client proxy"?&amp;nbsp; Reference.cs
was from the web reference in my client application.&amp;nbsp; After I
edited it, I recompiled... Shouldn't that have been enough?&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
&lt;br&gt;
Nick...&lt;br&gt;
&lt;br&gt;</description></item><item><title>Re: XML serialisation problem</title><link>http://forums.asp.net/thread/936681.aspx</link><pubDate>Wed, 25 May 2005 18:30:46 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:936681</guid><dc:creator>tomasr</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/936681.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=936681</wfw:commentRss><description>Nick,&lt;br&gt;
&lt;br&gt;
SoapInclude doesn't work because that attribute is used when using
RPC/Encoded services (the default for ASP.NET is to use
document/literal encoding).&lt;br&gt;
&lt;br&gt;
Also, regarding modifying reference.cs, was that from a client proxy?
if so, then regenerating the proxy once you changed the service
should've been enough....&lt;br&gt;
&lt;br&gt;
&lt;br&gt;</description></item><item><title>Re: XML serialisation problem</title><link>http://forums.asp.net/thread/936399.aspx</link><pubDate>Wed, 25 May 2005 15:09:51 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:936399</guid><dc:creator>nickg</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/936399.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=936399</wfw:commentRss><description>&lt;P&gt;&lt;FONT face=Arial size=2&gt;I fixed it by just changing SoapInclude to XmlInclude and it started working! Not quite sure why SoapInclude doesn't work. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;&lt;FONT size=2&gt;&lt;FONT face="Courier New"&gt;[WebMethod]&lt;BR&gt;[&lt;STRONG&gt;XmlInclude&lt;/STRONG&gt;(&lt;FONT color=#0000ff&gt;typeof&lt;/FONT&gt;(OrderLine))]&lt;BR&gt;&lt;FONT color=#0000ff&gt;public&lt;/FONT&gt; &lt;FONT color=#0000ff&gt;string&lt;/FONT&gt; EchoOrder(Order order) {&lt;BR&gt;&lt;FONT color=#0000ff&gt;&amp;nbsp;&amp;nbsp; return&lt;/FONT&gt; &lt;FONT color=#008000&gt;"WebService: "&lt;/FONT&gt; + order.ToString();&lt;BR&gt;}&lt;/FONT&gt;&lt;BR&gt;&lt;BR&gt;Now that I've put XmlInclude in instead, it seems to have added an extra line in Reference.cs which I didn't have before:&lt;BR&gt;&lt;BR&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;[System.Xml.Serialization.XmlIncludeAttribute(&lt;FONT color=#0000ff&gt;typeof&lt;/FONT&gt;(OrderLine))]&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial size=2&gt;The odd thing is, I tried inserting that line manually myself but it didn't fix it completely (I got a different error about a type conversion problem), so it must have changed something else as well.&lt;BR&gt;&lt;BR&gt;Thanks for your replies,&lt;BR&gt;&lt;BR&gt;Nick...&lt;BR&gt;&lt;/FONT&gt;&lt;/P&gt;</description></item><item><title>Re: XML serialisation problem</title><link>http://forums.asp.net/thread/936369.aspx</link><pubDate>Wed, 25 May 2005 14:55:58 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:936369</guid><dc:creator>tomasr</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/936369.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=936369</wfw:commentRss><description>Try this, instead:&lt;br&gt;
&lt;br&gt;
using System.Xml.Serialization;&lt;br&gt;
...&lt;br&gt;
&lt;br&gt;
[ XmlArray(), XmlArrayItem(typeof(OrderItem)) ]&lt;br&gt;
&lt;font face="Arial" size="2"&gt;&lt;font face="Courier New"&gt;public ArrayList OrderItems {&lt;br&gt;&amp;nbsp;&amp;nbsp; get { return orderItems; }&lt;br&gt;&amp;nbsp;&amp;nbsp; set { orderItems = value; }&lt;br&gt;}&lt;/font&gt;&lt;/font&gt;&lt;br&gt;
&lt;br&gt;</description></item><item><title>Re: XML serialisation problem</title><link>http://forums.asp.net/thread/936361.aspx</link><pubDate>Wed, 25 May 2005 14:52:19 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:936361</guid><dc:creator>blahhumbug</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/936361.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=936361</wfw:commentRss><description>I seem to recall a similiar issue I had like this, and I believe that I
resolved it by creating a custom collection class which inherited from
CollectionBase instead of using the ArrayList. Here's my implementation
below. &lt;br&gt;
&lt;br&gt;
The odd thing was that the web service implemented the CollectionBase class as an Array of RegistrationFields&lt;br&gt;
&lt;br&gt;
[Serializable]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public class EventRegistration&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public EventRegistration()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _eventData = new EventData();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; _eventFields = new FieldsCollection();&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; private EventData _eventData;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; private FieldsCollection _eventFields;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; private string _formName;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public EventData EventInfo&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; get{return _eventData;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set{_eventData = value;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public FieldsCollection EventFields&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; get{return _eventFields;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set{_eventFields = value;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public string FormName&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; get{return _formName;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set{_formName = value;}&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
[Serializable]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public class FieldsCollection : CollectionBase&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public FieldsCollection()&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public int Add(RegistrationField field)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return List.Add(field);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public void Remove(RegistrationField field)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; List.Remove(field);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public RegistrationField this[int index]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; get&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return ((RegistrationField)List[index]);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; List[index] = value;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
Web Service Proxy code for using the above classes:&lt;br&gt;
&lt;br&gt;
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.tq3navigant.com/WebServices/EventsWS")]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public class EventRegistration {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;remarks/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public EventData EventInfo;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;remarks/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public RegistrationField[]
EventFields;&amp;nbsp; // NOTE: EventFields is now an Array of
RegistrationFields, not a FieldsCollection object.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;remarks/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string FormName;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;remarks/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://www.tq3navigant.com/WebServices/EventsWS")]&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public class RegistrationField {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;remarks/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string FieldName;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;remarks/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string FieldValue;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;remarks/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public int Sequence;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /// &amp;lt;remarks/&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public char EncryptFlag;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
Anyway, Good luck,&lt;br&gt;
Sam&lt;br&gt;
&lt;br&gt;</description></item><item><title>Re: XML serialisation problem</title><link>http://forums.asp.net/thread/936325.aspx</link><pubDate>Wed, 25 May 2005 14:31:08 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:936325</guid><dc:creator>nickg</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/936325.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=936325</wfw:commentRss><description>&lt;font face="Arial" size="2"&gt;The odd thing is, if I change my class so that it has a single OrderLine object instead of an arraylist of them:&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;font face="Courier New"&gt;&amp;nbsp; public OrderLine Item {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; get { return item; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set { item = value; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
as opposed to:&lt;br&gt;
&lt;br&gt;
&lt;font face="Courier New"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public ArrayList OrderItems {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; get { return orderItems; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set { orderItems = value; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
Then it works fine. So it's obviously having trouble serializing the ArrayList of OrderItems.&lt;br&gt;
&lt;br&gt;
I don't know how to fix this and I can't proceed with my project until
I've got this working! Needless to say - I'm getting very stressed and
worried!&lt;br&gt;
&lt;br&gt;
Nick...&lt;/font&gt;&lt;br&gt;</description></item><item><title>Re: XML serialisation problem</title><link>http://forums.asp.net/thread/936210.aspx</link><pubDate>Wed, 25 May 2005 13:28:16 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:936210</guid><dc:creator>nickg</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/936210.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=936210</wfw:commentRss><description>&lt;font size="2"&gt;&lt;font face="Arial"&gt;My order class is just this:&lt;/font&gt;&lt;br&gt;
&lt;/font&gt;&lt;font face="Courier New" size="2"&gt;&lt;br&gt;
using System;&lt;br&gt;
using System.Collections;&lt;br&gt;
using System.Text;&lt;br&gt;
&lt;br&gt;
namespace Wright.BusinessLogicLayer {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public class Order {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; private ArrayList orderItems;&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public Order() {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public ArrayList OrderItems {&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; get { return orderItems; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; set { orderItems = value; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
But if I mark it as Serializable it doesn't seem to make any difference.&lt;br&gt;
&lt;/font&gt;&lt;font size="2"&gt;&lt;br&gt;
&lt;/font&gt;&lt;br&gt;</description></item><item><title>Re: XML serialisation problem</title><link>http://forums.asp.net/thread/936169.aspx</link><pubDate>Wed, 25 May 2005 13:06:13 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:936169</guid><dc:creator>blahhumbug</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/936169.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=936169</wfw:commentRss><description>Is your Order class marked Serializable? &lt;br&gt;</description></item><item><title>XML serialisation problem</title><link>http://forums.asp.net/thread/936056.aspx</link><pubDate>Wed, 25 May 2005 11:23:53 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:936056</guid><dc:creator>nickg</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/936056.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=28&amp;PostID=936056</wfw:commentRss><description>&lt;font face="Arial" size="2"&gt;Hi,&lt;br&gt;
&lt;br&gt;
I'm developing a webservice that will accept an Order and forward it to
a backend system, but I'm having a problem with transferring my "Order"
class over a webservice.&lt;br&gt;
&lt;br&gt;
When I try and call the webservice and pass it an Order, I get the following error message:&lt;br&gt;
&lt;br&gt;
The type Wright.BusinessLogicLayer.OrderLine was not expected. Use the
XmlInclude or SoapInclude attribute to specify types that are not known
statically. &lt;br&gt;
&lt;br&gt;
Source Error: &lt;br&gt;
&lt;br&gt;
&lt;font face="Courier New"&gt;Line 55:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public string EchoOrder(Order order) {&lt;br&gt;
Line
56:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
object[] results = this.Invoke("EchoOrder", new object[] {&lt;br&gt;
Line
57:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
order});&lt;br&gt;
Line 58:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ((string)(results[0]));&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
My Order class contains a single property, which is just an ArrayList of&amp;nbsp; OrderLines.&lt;br&gt;
&lt;br&gt;
I've tried adding the SoapAttribute but it seems to have no effect:&lt;br&gt;
&lt;br&gt;
&lt;font face="Courier New"&gt;[WebMethod]&lt;br&gt;
[SoapInclude(typeof(OrderLine))]&lt;br&gt;
public string EchoOrder(Order order) {&lt;br&gt;
&amp;nbsp;&amp;nbsp; return order.ToString();&lt;br&gt;
}&lt;/font&gt;&lt;br&gt;
&lt;br&gt;
Any ideas what am I doing wrong?&lt;br&gt;
&lt;br&gt;
Thanks!&lt;br&gt;
&lt;br&gt;
Nick...&lt;br&gt;
&lt;br&gt;
&lt;/font&gt;&lt;br&gt;</description></item></channel></rss>