0 Replies Latest reply on May 16, 2007 3:15 PM by theblueyak

    Problem updating a SOAP Web Service with ArrayCollection

    theblueyak
      Hello,

      I am having issues POST'ing an ArrayCollection to a C# Web Method. Here's how I have my application set up:

      I have a DataGrid in my application and set the dataProvider to be the result object of a Web Service operation. I set the DataGrid's editable property to "true" and would like to be able to edit the data and send off the DataGrid's dataProvider as the parameter for the Web Method. If I edit the first row of the DataGrid and trigger the operation, it gets saved just fine. If I try to edit any other row this way, it keeps sending the same packet (as verified by a packet sniffer) not allowing me to update any other row. It seems the Web Service is sending the first 255 characters of the serialized ArrayCollection.

      My questions are: why is this happening?

      and

      How can I fix this?


      Here is the request of my Web Service operation:

      <mx:request xmlns="">
      <GlossaryTerms>
      {GlossaryArrayCollection}
      </GlossaryTerms>
      </mx:request>

      This is the definition of GlossaryArrayCollection:

      [Bindable]
      public var GlossaryArrayCollection:ArrayCollection = new ArrayCollection();

      Here is the SOAP packet that the C# Web Method is expecting:

      <?xml version="1.0" encoding="utf-8"?>
      <soap12:Envelope xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=" http://www.w3.org/2001/XMLSchema" xmlns:soap12=" http://www.w3.org/2003/05/soap-envelope">
      <soap12:Body>
      <GlossaryUpdate xmlns="">
      <GlossaryTerms>
      <Glossary cID="int" cDeleted="boolean" cTerm="string" cDefinition="string" cURL="string" cPublic="boolean" cRowVersion="string"/>
      <Glossary cID="int" cDeleted="boolean" cTerm="string" cDefinition="string" cURL="string" cPublic="boolean" cRowVersion="string" />
      </GlossaryTerms>
      </GlossaryUpdate>
      </soap12:Body>
      </soap12:Envelope>


      Thanks to anyone for their help.

      Brian Cary