On Sunday 05 December 2004 22:11, Lyndon Tiu wrote:
> On December 5, 2004 12:50 pm, Michael Schuerig wrote:

> > Does this result in sensible XML being transferred over the net? By
> > that I mostly mean XML that's not just usable between the two
> > applications you can control, but that makes interoperability
> > possible. If not, you might get cleaner results with custom
> > de/serializers.
>
> In our case, we control both ends of the wire so our "object to array
> to object" code is a mirror - what one does the other undoes.

Obviously I don't know your situation, but I'm curious why you are using 
SOAP at all. If you control both ends of the communications channel -- 
and assuming that both are written in Java -- why not just use RMI?

> But I also read that axis's complex data types are not compatible
> with .Net and the only sure way for interoperability are simple
> String arrays.

I don't want to suggest that you're doing anything wrong, I'm still very 
much of a web services newbie. Still (or because of that), I don't see 
why there has to be a problem. My understanding is that one of the keys 
to interoperability is to start out with a WSDL definition of the 
offered service. From there, get the servlet engine to produce 
conforming XML on the wire. If Axis, in this case, doesn't do it 
correctly all by itself, then give it a hand with custom serializers 
and deserializers. In terms of architecture, this nicely keeps code 
that deals with data formats localized.

In my own case, I've used this approach to serialize a JDBC ResultSet 
into exactly the kind of XML I want. On the client I deserialize it to 
my own domain objects with the help of a Commons Digester. (Regarding 
my above admonitions on using RMI, this was for a proof of concept 
only.) It works nicely.

Michael

-- 
Michael Schuerig                           The more it stays the same,
mailto:[EMAIL PROTECTED]                        The less it changes!
http://www.schuerig.de/michael/      --Spinal Tap, The Majesty of Rock

Reply via email to