Re: avoiding XML serialization, different WSDL generation, soap serialization

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Dino Chiesa [Microsoft] (dinoch_at_online.microsoft.com)
Date: 07/27/04


Date: Tue, 27 Jul 2004 17:57:23 -0400

Rather than transmitting the actual entities, have you considered using an
Adapter (GoF 139) or Visitor (331) or Memento (283) ?

-D

"Ramunas Urbonas" <ramas_nospam_@fortas.ktu.lt> wrote in message
news:ecenViibEHA.2844@TK2MSFTNGP12.phx.gbl...
> Hello,
>
> I think my problem is interesting for most of developers who wish to
> exchange actual business entities with webservices, not just xml stubs.
>
> I can not use XML serialization, when generating wsdl, because some of
> transmited entities have only getters. It is required by our framework and
> cannot be avoided (to ensure data consistency in most cases).
>
> How do I exchange business entities in that case? I found several
solutions,
> basically they all imply serializing my classes with soap/binary
formatters
> and passing parameters as XmlElements, strings or byte arrays. That
implies:
> 1. versioning problems (but that can be avoided with extra work),
> 2. anonymous parametes (any serialized object will be passed as
> XmlElement, or any other selected transfer type. Type validation will be
> performed only during run time, which leads to bugs).
> 3. using XML serialization either way, just ussing "always XML
> serializable" format for parameters.
>
> How else could this problem be addressed? Suggestions are very welcome..
>
> regards,
> Ramunas Urbonas
>
>