On Monday 18 October 2004 22:28, [EMAIL PROTECTED]
wrote:
> To see how to register see my email on Re: Bean
> Serializer/Deserializer. For an example serializer you can even look
> at the axis code. I have attached it.
Thanks for your help! The (de)serialization is not my problem -- well,
at least for now... First, I need to come to terms with SOAP and Axis.
Let's see if I've got things right. Here's the plan.
Server-side
I've got a JDBC ResultSet and I've already got a way to create a
javax.xml.transform.sax.SAXSource from it. What I still need is a
javax.xml.transform.Result that calls the appropriate startElement()
etc. methods on a SerializationContext.
The ResultSet get wrapped into a new class, MyResultSet, in order to
make it distinguishable. Then I need to implement a Serializer that
puts the pieces together, i.e., that transforms from my Source to the
Result. This Serializers needs to be registered with Axis in the
deploy.wsdd like this
<typeMapping
xmlns:ns="http://example.com"
qname="ns:myElement"
type="java:"com.example.MyClass"
serializer="com.example.MySerializerFactory"
deserializer="com.example.MyDeserializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>
From there on, Axis will pick things up. Well, I'll see when I get
there. Ah, yes, in order for Axis to generate usable WSDL, the
Serializer must supply the required schema information.
Client-side
I need to implement a Deserializer, MyDeserializer, that generate
business objects to my liking from the SOAP reply. A factory for this
MyDeserializer needs to be registered with the TypeMappingRegistry for
the Service.
Am I on the right path?
Michael
--
Michael Schuerig Failures to use one's frontal lobes
mailto:[EMAIL PROTECTED] can result in the loss of them.
http://www.schuerig.de/michael/ --William H. Calvin