Re: Converting objects thru Web Services or Disconnected
From: DC (dinoch_at_online.microsoft.com)
Date: 08/04/04
- Next message: James Wong: "Re: Problem in passing encoding information to WebServices 2"
- Previous message: Haytham: "Securing web service Discovering"
- In reply to: Jeffrey Hasan: "Re: Converting objects thru Web Services or Disconnected"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 3 Aug 2004 22:05:12 -0400
also, maybe this article will help
http://msdn.microsoft.com/library/en-us/dnservice/html/service07162002.asp
-D
"Jeffrey Hasan" <anonymous@noemail.com> wrote in message
news:uR$U5oSeEHA.3864@TK2MSFTNGP10.phx.gbl...
> You will need to cast the datatype explicitly, even though you know it's
the
> same type. It seems redundant, but if you think about it, there's only one
> workaround, which is to have both the Web service and the client reference
> the same type definition assembly. To do this, you would (ideally)
generate
> an XSD file for the custom type, then use xsd.exe to generate the code
> definition of the type. You would then compile this definition into an
> assembly, that you could reference from clients, services, whoever needed
> access to the exact same type definition.
>
> Of course, this approach is not practical in most cases, and it creates a
> level of tight coupling that goes against SOA tenets. So you pretty much
> have no choice but to treat the Web Service version and the local version
as
> two separate data types that can cast to eachother. I would still generate
> an XSD definition, because this abstracts the definition away from any one
> implementation.
>
> Jeffrey Hasan, MCSD
> President, Bluestone Partners, Inc.
> -----------------------------------------------
> Author of: Expert SOA in C# Using WSE 2.0 (APress, 2004)
> http://www.bluestonepartners.com/soa.aspx
>
> "John Wilson" <JW@nospam.com> wrote in message
> news:e2I$i5EeEHA.1652@TK2MSFTNGP09.phx.gbl...
> > I have an application that can access data both locally and through web
> > services (it may be working in a disconnected mode). I have defined my
> data
> > objects (e.g. ObjectA) in a separate component (e.g. DataDefiner) and
> placed
> > this on the local machine and the webserver.
> >
> >
> >
> > When I get my Object A back from the webserver, Visual Studio tells me
> that
> > it cannot convert WebService.ObjectA to DataDefiner.ObjectA. How can I
> > define objects that can be read locally or via webservices, using the
same
> > objects?
> >
> >
> >
> > I appreciate your help, please let me know if the above makes no sense.
> >
> >
> >
> > JW
> > I have an application that can access data both locally and through web
> > services (it may be working in a disconnected mode). I have defined my
> data
> > objects (e.g. ObjectA) in a separate component (e.g. DataDefiner) and
> placed
> > this on the local machine and the webserver.
> >
> >
> >
> > When I get my Object A back from the webserver, Visual Studio tells me
> that
> > it cannot convert WebService.ObjectA to DataDefiner.ObjectA. How can I
> > define objects that can be read locally or via webservices, using the
same
> > objects?
> >
> >
> >
> > I appreciate your help, please let me know if the above makes no sense.
> >
> >
> >
> > JW
> >
> >
>
>
- Next message: James Wong: "Re: Problem in passing encoding information to WebServices 2"
- Previous message: Haytham: "Securing web service Discovering"
- In reply to: Jeffrey Hasan: "Re: Converting objects thru Web Services or Disconnected"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|