axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason McCormick <jmli...@lexi.com>
Subject QName identifiers for custom serialization
Date Thu, 19 Feb 2004 21:42:52 GMT
Hello all,

  I'm working through a webservice that is littered with objects that 
require customer serializers.  I have all of the serializers written, 
but I'm a little unclear as to how to name them in the .wsdd and how to 
use them in the client code.  For example an object of User, I'm 
currently calling "User" as the namespace.  For example:

<typeMapping
	xmlns:ns="urn:Server"
        qname="ns:User"
        type="java:com.lexi.publish.publishobjects.User"
        serializer="com.lexi.publish.ser.UserSerFactory"
        deserializer="com.lexi.publish.ser.UserSerFactory"
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
/>

And inside of client code:

QName UserMap = new QName("urn:Server", "User");
c.registerTypeMapping(
	User.class, 
	UserMap,
	new UserSerFactory(User.class, UserMap),
	new UserDeserFactory(User.class, UserMap)
);
c.addParameter("user", UserMap, ParameterMode.IN);

Are both of these code snippets appropriate?  Specifally the qname 
attribute in the <typeMapping> combined with the QName object inside of 
the code.  I'm not sure where/when/if it's appropriate to use ns:

Thanks
-- Jason



Mime
View raw message