Re: Using User-Defined Data Type



Hi Serkan,

the issue here is you are trying to share a class, not a type.

By deleting the "generated class based on the type specified by the
WebService" you essentially invalidate the proxy you created.

When dealing with WebServices, you (exceptions left alone) generally
share a WSDL file. NOT the assembly with the dataclasses exposed by
the WebService.

The WSDL file is then used on the client for generating "Proxy
classes" for you. These classes are NOT THE SAME classes as the server
exposes, but ARE THE SAME TYPES.

The framework will take care of serializing & deserializing. U can
just deal with "objects" in your code on both Server & Client side.

Hope this helps,

Marvin Smit.


On Fri, 17 Jun 2005 23:36:32 +0300, "Serkan DIRIARIN"
<activex@xxxxxxxxxxxxxxx> wrote:

>hi! i have created a document class. I have a .net client application and a
>web service. Both of them using same object model and referencing a
>doctypes.dll file. But when i want to run a client application getting
>error InvalidCastException. I deleted class declaration in reference.vb in
>web reference defination and reference my document dll file, altough it is
>still has error... What is the problem..
>
>thanks....
>
>Serkan
>

.



Relevant Pages

  • RE: Error on SOAP Call on only one machine: Could not find default endpoint element that references
    ... "Service Reference" is a proxy class used for consuming WCF service. ... Though WCF client can also consume standard XML webservice, ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.languages.vb)
  • Add Web Service advice
    ... We have an SOA application that includes an ASP.NET webservice and WinForms ... My question is regarding the use of Add Web Reference in Visual ... business objects for use with the webservice methods. ... available to the client application, so we'd like to continue to reference ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Using User-Defined Data Type
    ... webservice and being used by a client of that webservice. ... > error InvalidCastException. ... > web reference defination and reference my document dll file, ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Sharing Types between Webservice and Client
    ... The wsdl file contains the right namespaces. ... >> I've also created a client application that consumes this webservice. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: I need to consum a java webserice in my C# app.
    ... Is your java web service exposing a WSDL file? ... I have just realised that i can no longer add web reference as i usually ... "add web refrence " men with the url of the webservice, ... description but it seems like i need to manually generate the proxy class. ...
    (microsoft.public.dotnet.languages.csharp)

Quantcast