Click here to Skip to main content
15,905,504 members
Home / Discussions / C#
   

C#

 
GeneralRe: FileStream write into file Pin
Ennis Ray Lynch, Jr.18-Feb-09 4:32
Ennis Ray Lynch, Jr.18-Feb-09 4:32 
GeneralRe: FileStream write into file Pin
musefan18-Feb-09 7:04
musefan18-Feb-09 7:04 
GeneralRe: FileStream write into file Pin
Ennis Ray Lynch, Jr.18-Feb-09 7:13
Ennis Ray Lynch, Jr.18-Feb-09 7:13 
GeneralRe: FileStream write into file Pin
musefan18-Feb-09 7:24
musefan18-Feb-09 7:24 
QuestionSplit a Zip into smaller zip file of Size 1MB using .NET console application VS 2005 Pin
Member 322226417-Feb-09 19:33
Member 322226417-Feb-09 19:33 
AnswerRe: Split a Zip into smaller zip file of Size 1MB using .NET console application VS 2005 Pin
N a v a n e e t h17-Feb-09 20:41
N a v a n e e t h17-Feb-09 20:41 
QuestionUpload a File to SFTP server using VS 2005 Pin
Member 322226417-Feb-09 19:29
Member 322226417-Feb-09 19:29 
AnswerRe: Upload a File to SFTP server using VS 2005 Pin
N a v a n e e t h17-Feb-09 20:49
N a v a n e e t h17-Feb-09 20:49 
AnswerRe: Upload a File to SFTP server using VS 2005 Pin
Ashfield17-Feb-09 20:57
Ashfield17-Feb-09 20:57 
QuestionList Box Control Styling Pin
Soptik Dutta17-Feb-09 19:10
Soptik Dutta17-Feb-09 19:10 
AnswerRe: List Box Control Styling Pin
musefan17-Feb-09 22:07
musefan17-Feb-09 22:07 
QuestionCan i ask some question About ZedGraph?? Pin
Vampirejk17-Feb-09 19:04
Vampirejk17-Feb-09 19:04 
QuestionDefine multiple variables with the same initial value Pin
CodingLover17-Feb-09 18:53
CodingLover17-Feb-09 18:53 
AnswerRe: Define multiple variables with the same initial value Pin
Vikram A Punathambekar17-Feb-09 21:29
Vikram A Punathambekar17-Feb-09 21:29 
AnswerRe: Define multiple variables with the same initial value Pin
Guffa17-Feb-09 23:24
Guffa17-Feb-09 23:24 
QuestionMy regular expression skiping one data How can I fix it [modified] Pin
Naveed72717-Feb-09 18:09
Naveed72717-Feb-09 18:09 
QuestionSocket issue Pin
yesu prakash17-Feb-09 17:54
yesu prakash17-Feb-09 17:54 
AnswerRe: Socket issue Pin
carbon_golem18-Feb-09 2:28
carbon_golem18-Feb-09 2:28 
GeneralRe: Socket issue Pin
yesu prakash18-Feb-09 17:57
yesu prakash18-Feb-09 17:57 
QuestionC# Web Service Custom Return Object Problem Pin
WhatDoIHaveToDoToGetAUniqueName17-Feb-09 10:54
WhatDoIHaveToDoToGetAUniqueName17-Feb-09 10:54 
AnswerRe: C# Web Service Custom Return Object Problem Pin
Calin Tatar17-Feb-09 11:05
Calin Tatar17-Feb-09 11:05 
GeneralRe: C# Web Service Custom Return Object Problem [modified] Pin
WhatDoIHaveToDoToGetAUniqueName17-Feb-09 12:37
WhatDoIHaveToDoToGetAUniqueName17-Feb-09 12:37 
I see the custom object in the client app just fine.

I just tried adding [SoapInclude(typeof(CustomObject))] attribute to the custom object (and yes I did replace "CustomObject" with the actual object), but unfortunately I get the same result. (I also tried it with [XmlInclude(typeof(CustomObject))], same result.) All arrays are zero length and I get the 'out of bounds' error if I try and access any of the elements of an array.

Any other ideas? I haven't been able to find an example of something similar to what I'm doing as far as nesting arrays of common types inside a custom web service return object.

EDIT:

I just tried adding [XmlElement()] attribute to each array property, and the fields in the object became null. I then tried [XmlArray()] instead and got the same result. Here's my object as it exists now:

    /// <summary>
    /// Result object for 'Ping' web method.
    /// </summary>
    [SoapInclude(typeof(PingResult))]
    [Serializable()]
    public class WebMethodResult
    {
        private Int32 a;
        private String[] b;
        private UInt32[] c;
        private UInt32[] d;
        private UInt32[] e;
        private Int16[] f;

        public Int32 A
        {
            get { return this.a; }
            set { this.a= value; }
        }
        [XmlArray()]
        public String[] B
        {
            get { return this.b; }
            set { this.b= value; }
        }
        [XmlArray()]
        public UInt32[] C
        {
            get { return this.c; }
            set { this.c= value; }
        }
        [XmlArray()]
        public UInt32[] D
        {
            get { return this.d; }
            set { this.d= value; }
        }
        [XmlArray()]
        public UInt32[] E
        {
            get { return this.e; }
            set { this.e= value; }
        }
        [XmlArray()]
        public Int16[] F
        {
            get { return this.f; }
            set { this.f= value; }
        }

        public WebMethodResult() 
        {
            //leave empty - serializer constructor
        }
}


modified on Tuesday, February 17, 2009 7:14 PM

GeneralRe: C# Web Service Custom Return Object Problem Pin
Ennis Ray Lynch, Jr.17-Feb-09 15:21
Ennis Ray Lynch, Jr.17-Feb-09 15:21 
GeneralRe: C# Web Service Custom Return Object Problem [modified] Pin
WhatDoIHaveToDoToGetAUniqueName18-Feb-09 10:00
WhatDoIHaveToDoToGetAUniqueName18-Feb-09 10:00 
GeneralRe: C# Web Service Custom Return Object Problem Pin
Ennis Ray Lynch, Jr.18-Feb-09 10:22
Ennis Ray Lynch, Jr.18-Feb-09 10:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.