Derive a WebService Proxy Class

  • Thread starter Thread starter Michael
  • Start date Start date
M

Michael

Hi

I use VS.NET 2005.
I generated a Proxy file (reference.vb) with the build in WSDL
Generator -> so far so good.
I have to provide some classes from that to COM via the interop-layer
-> okay.

There are some (data)classes with members declared as
System.Nullable(Of Long).
The problem is this members are not exported to the COM-Interface
trough the interop-layer.
That is right because you can't set a long variable for instance in
Visual Basic to null, because it is a primitive type.
My Idea is now to make my own COM-Classes from deriving this
Proxy-Classes and check with an addition porperty parameter if the
VB-Client wants to set a long member to null.
so far so good, but when i call a webservice (via the proxy file with
the invoke method) and my COM-Data Class then i get an XML-Serializer
error.
Another point behind this idea with the separated COM-Class is the
independency of proxy which will be always overriden by the WSDL
generator when i recreate (update) the proxy !!!
I tried to cast my COM-Class to the proxy class, but that doesn't
really work !!!

Maybe there is complete another idea to provide this functionality.

please help
thx in advance
michael
 
There is nothing inherently wrong with setting up a translation layer to
abstract the web proxy. In fact, in many instances, it is precisely what you
would want to do. There is no need, however, to add properties to represent
the null, at least not on the .NET side, and you might be able to represent
the null in other ways on the COM side (for example, if valid values on your
long are always positive, set a negative to indicate null -- this has to be
documented in case the system ever has to change).

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
 
Back
Top