I found the answer! The problem was right in front of my face! :sigh:
Looking at the
GetInventory()
method signature:
public string GetInventory(string site, string part, string wolot, out GetInventory_blocRow[] bloc);
You'll see that the out parameter
GetInventory_blocRow
is an array because it'll be returning multiple rows of data. When I was creating my type, it was just a single instance variable. I needed to create an array of my types. Once I realized that (after some much needed sleep) I found
this [
^]link. The answer I got from there was, instead of creating my instance like this:
Type type = invoker.webServiceAssembly.GetType("GetInventory_blocRow");
var instance = Activator.CreateInstance(type);
I can create it like this:
Type type = invoker.webServiceAssembly.GetType("GetInventory_blocRow");
System.Collections.IList instance = Array.CreateInstance(type,10);
I can then use
instance
as my argument!
Thank you very much for your assistance you guys!
I really appreciate your time!
Now I just need to figure out how to make the array dynamic since I won't know how many records I'll be getting back.