Click here to Skip to main content
15,893,266 members
Home / Discussions / C#
   

C#

 
GeneralRe: Event in visual C# Pin
Heath Stewart22-Apr-04 2:59
protectorHeath Stewart22-Apr-04 2:59 
Generalgraphics in c Pin
kcal22-Apr-04 0:09
kcal22-Apr-04 0:09 
GeneralRe: graphics in c Pin
Mazdak22-Apr-04 0:42
Mazdak22-Apr-04 0:42 
GeneralRe: graphics in c Pin
Dave Kreskowiak22-Apr-04 0:41
mveDave Kreskowiak22-Apr-04 0:41 
QuestionHow to use variable in property (attribute) Pin
A.Wegierski22-Apr-04 0:05
A.Wegierski22-Apr-04 0:05 
AnswerRe: How to use variable in property (attribute) Pin
Heath Stewart22-Apr-04 3:00
protectorHeath Stewart22-Apr-04 3:00 
AnswerRe: How to use variable in property (attribute) Pin
leppie22-Apr-04 7:12
leppie22-Apr-04 7:12 
AnswerRe: How to use variable in property (attribute) Pin
A.Wegierski22-Apr-04 19:42
A.Wegierski22-Apr-04 19:42 
GeneralExit statment in visual C# Pin
Hemant Mane21-Apr-04 23:54
Hemant Mane21-Apr-04 23:54 
GeneralRe: Exit statment in visual C# Pin
A.Wegierski22-Apr-04 0:19
A.Wegierski22-Apr-04 0:19 
GeneralRe: Exit statment in visual C# Pin
Heath Stewart22-Apr-04 3:01
protectorHeath Stewart22-Apr-04 3:01 
GeneralRe: Exit statment in visual C# Pin
A.Wegierski22-Apr-04 19:59
A.Wegierski22-Apr-04 19:59 
GeneralRe: Exit statment in visual C# Pin
SJ_Phoenix22-Apr-04 0:42
SJ_Phoenix22-Apr-04 0:42 
GeneralC++ Bit Fields implementation in C# Pin
Vini Deep21-Apr-04 23:33
Vini Deep21-Apr-04 23:33 
GeneralRe: C++ Bit Fields implementation in C# Pin
A.Wegierski22-Apr-04 1:10
A.Wegierski22-Apr-04 1:10 
GeneralRe: C++ Bit Fields implementation in C# Pin
Vini Deep22-Apr-04 1:31
Vini Deep22-Apr-04 1:31 
GeneralRe: C++ Bit Fields implementation in C# Pin
Member 363026618-Dec-08 19:53
Member 363026618-Dec-08 19:53 
GeneralRe: C++ Bit Fields implementation in C# Pin
Tim Kohler22-Apr-04 1:22
Tim Kohler22-Apr-04 1:22 
GeneralRe: C++ Bit Fields implementation in C# Pin
A.Wegierski22-Apr-04 19:57
A.Wegierski22-Apr-04 19:57 
GeneralRe: C++ Bit Fields implementation in C# Pin
leppie22-Apr-04 7:22
leppie22-Apr-04 7:22 
Generalstruct/class .vs. Datasets Pin
BernardYardley21-Apr-04 23:17
BernardYardley21-Apr-04 23:17 
GeneralRe: struct/class .vs. Datasets Pin
Heath Stewart22-Apr-04 3:07
protectorHeath Stewart22-Apr-04 3:07 
GeneralRe: struct/class .vs. Datasets Pin
BernardYardley22-Apr-04 3:20
BernardYardley22-Apr-04 3:20 
GeneralRe: struct/class .vs. Datasets Pin
Heath Stewart22-Apr-04 4:05
protectorHeath Stewart22-Apr-04 4:05 
GeneralRe: struct/class .vs. Datasets Pin
BernardYardley22-Apr-04 4:33
BernardYardley22-Apr-04 4:33 
To cut this down to the bone, I've got three projects, MyClasses, MyClient and MyWebService and let's assume that the namespaces are the same as the project names. MyClasses contains the definition for MyClass. MyClient and MyWebService both reference the MyClasses namespace. Now let's say that MyWebService has a webservice in it, MyWS.asmx that in turn has a method whose parameter is of type MyClass or, to be precise, MyClasses.MyClass.

When I add MyWS as a web reference to MyClient, VS invokes WSDL to build a proxy for MyWS for MyClient to use which includes a new definition for MyClass. So we now have a situation where MyClient is aware of MyClasses.MyClass and is calling a Method with that type as parameter but the proxy is expecting an object of type localhost.MyWebService.MyClass (or whatever). Hence the code will not compile.

The example in MSDN seems to get round this issue by only declaring the class on the proxy file but that seems to me to be a backwards way of going about things - but maybe I've misunderstood?

Anyway, is this any clearer?

The WSDL documentation seems to suggest that the correct approach is to generate the proxy class and then modify the code by hand so I still end up back at my core question of whether there is a better or worse way of passing data between the layers from a front end via a web service, then to COM+ and finally to a SQL database or is it just as good to use our own classes as to use strongly-typed Datasets?

Thanks

Bernard

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.