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:...
> 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
>
>
|