how to expose structure of a structure

J

jake

Have a structure a: public struct a{ string st1, int int1} and public struct
b {a[] stra, string str2}

A method returning structure b and taking structure b as a param: public b
method1(b arg1)

When method1 exposed as webmethod, only struct b is visible. Am I doing
something wrong? Thank you very much.
 
J

John Saunders [MVP]

jake said:
Have a structure a: public struct a{ string st1, int int1} and public
struct
b {a[] stra, string str2}

A method returning structure b and taking structure b as a param: public b
method1(b arg1)

When method1 exposed as webmethod, only struct b is visible. Am I doing
something wrong? Thank you very much.

Please be more specific. What do you mean, "only struct b is visible"? What
happens if you reference b.stra[0]?
 
J

jake

Thank you for your reply, John.
What I mean is, the proxy created to be used by the webservice client
doesn't show struct a.

John Saunders said:
jake said:
Have a structure a: public struct a{ string st1, int int1} and public
struct
b {a[] stra, string str2}

A method returning structure b and taking structure b as a param: public b
method1(b arg1)

When method1 exposed as webmethod, only struct b is visible. Am I doing
something wrong? Thank you very much.

Please be more specific. What do you mean, "only struct b is visible"? What
happens if you reference b.stra[0]?
 
J

John Saunders [MVP]

jake said:
Thank you for your reply, John.
What I mean is, the proxy created to be used by the webservice client
doesn't show struct a.

What happens if you reference b.stra[0]?
 
J

jake

jake said:
Thank you for your reply, John.
What I mean is, the proxy created to be used by the webservice client
doesn't show struct a.If I reference b.stra[0], it will produce an error

John Saunders said:
jake said:
Have a structure a: public struct a{ string st1, int int1} and public
struct
b {a[] stra, string str2}

A method returning structure b and taking structure b as a param: public b
method1(b arg1)

When method1 exposed as webmethod, only struct b is visible. Am I doing
something wrong? Thank you very much.

Please be more specific. What do you mean, "only struct b is visible"? What
happens if you reference b.stra[0]?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,815
Latest member
treekmostly22

Latest Threads

Top