i need to develop a .net library which exposes a java web service proxy to a legacy vb6 asp web application . Being the first time i do such a task and not knowing vb6 programming language, i need some clearifications by a more experienced programmers.
To begin i’ve searched the web and i’ve found the following link (in case someone might find it useful ) : http://migrationguide.artinsoft.com/Migration-Guide-Faq-Chapter-14.aspx
yet there are still some things that aren’t clear to me :
-
the web service proxy’s methods take complex types (objects) parameters and return complex types (for instance a list of “records” ) . How should i map thoose types to make them usable by vb6 : structures or classes (some of them are nested into other structures ) ? or arrays of simple types, eventually matrixes for nested types ?
-
i think it’s obviuos i can’t use generics, but can i use collections or should i use only arrays ?
-
what kind of exceptions should i throw from inside my library ? COMException ? Any kind of exception i whish ? and how does the vb6 web application consume them : i mean i’d like to give a better feedback than “and exception has been raised” . i’ve found some posts around but they are quite old and related to older version of the .net (actually i’m using 3.5 )
Thank you in advance for any help
In the end i’ve found that the raccomanded pratice is to expose the library as a Com object.
In case other beginners like me might find it useful, the official msdn guide is :
msdn.microsoft.com/en-us/library/zsfww439(v=VS.71).aspx
Since arrays has caused me a bit of trouble the following hints might be helpful:
below i’ve added the msdn guide to marshalling arrays and another post i’ve found useful:
msdn.microsoft.com/en-us/library/z6cfh6e6.aspx
huntjason.spaces.live.com/blog/cns!9D2E96F2AA6AE85F!378.entry
thank everybody for the opinions and examples provided