axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Owen D Burroughs" <>
Subject Re: Fw: Specifying simple serializers in dynamic invocations with WSIF
Date Thu, 12 Sep 2002 15:18:11 GMT


WSIF does not directly carry out serializing/deserializing, this is handled
by whatever provider is in use. The provider will typically use the API it
is a wrapper for. For example the Apache SOAP provider will by default use
the BeanSerializer from Apache SOAP.

The core WSIF API is independent of any specific provider. As such it does
not provide any mechanism for registering your custom
serializers/deserializers. If however you want to provide your own
serializers/deserializers for the Apache SOAP provider to use then you can.
If you know that you are using the Apache SOAP provider, you can get a
reference to the SOAPMappingRegistry object used in the invocation of the
service. This can be done by casting your instance of WSIFPort to
WSIFPort_ApacheSOAP and then calling the public getSOAPMappingRegistry
method on it. Once you have a reference to the SOAPMappingRegistry you can
register your serializer/deserializer in the same way you would if using
the Apache SOAP API directly. So if you want to subclass
XMLParameterSerializer that should be fine.

Hope this helps,


Owen Burroughs

                      "Jeff Greif"                                                       
                      <jgreif@alumni.pri        To:       <>
            >               cc:                                   
                                                Subject:  Fw: Specifying simple serializers
in dynamic invocations with WSIF            
                      11/09/2002 00:22                                                   
                      Please respond to                                                  

There seems to be more discussion of wsif on this list than on axis-users,
so I'm trying again here.  Please pardon me if this is a breach of
----- Original Message -----
From: "Jeff Greif" <>
To: "Axis Users" <>
Sent: Monday, September 09, 2002 1:04 PM
Subject: Specifying simple serializers in dynamic invocations with WSIF

> I'm trying to produce a generic invoker of WSDL-described services and
> operations.  WSIF looks like an elegant way to do this.  The clients of
> component are trafficking in XML schema instances, and using XPath to
> manipulate them, rather than native Java classes.  (They work entirely
> declarative information in XML specifying what web service to call and
> kinds of things to pass to it when they need to talk to the web service
> world.)
> Thus my generic invoker could take parameters for and return values from
> invoked operations which are thinly wrapped versions of these (e.g., an
> object specifying a type that must be present in the WSDL for the
> and a org.w3c.dom.Element holding the value, which might be an instance
> complex type) if they are not instances of simple types.  So I could have
> something like
> public class ComplexTypeWrapper {
>     public ComplexTypeWrapper(QName typename, Element data);
>     public QName getTypeName();   // XML Type
>     public Element getData();
>     ...
> }
> This is a little like a Bean, except that its type is an XML type rather
> than a Java class.
> I'm assuming that I would be able to create a WSIFService as is done in
> DynamicInvoker example, and then do for each input and output part which
> not a simple type,
>   ComplexTypeWrapper x = ...;
>   service.mapType(x.getTypeName(), ComplexTypeWrapper.class);
> Such an object has simple serialization/deserialization for SOAP --
> basically, to serialize the object, optionally check the type against the
> required type, and if it matches, optionally check the value to see if it
> validates against the type (or let the invoked service object if it
> , and if so, emit the Element, and similarly, to deserialize, construct a
> ComplexTypeWrapper using the typename and the Element corresponding to
> content of the part.  What I haven't figured out yet is where in the WSIF
> framework is the standard place to hook in this
> serialization/deserialization scheme, and where to put the
> serialization/deserialization code.  It appears that if I were just using
> straight SOAP, I might make a subclass of the
> org.apache.soap.encoding.literalxml.XMLParameterSerializer, but is this
> Right Way (TM) for WSIF?  I'd appreciate a hint about these things.
> Jeff
P.S. I've since managed to handle complex response parts in stubless
invocation (where all of those are deserialized to the wrapper object
described above), but have not yet figured out how to set up the
serialization for input complex types.

View raw message