You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Matt Valerio <mv...@armadacentral.com> on 2004/09/29 16:26:13 UTC

custom serializer problems

I'm trying to write a custom serializer for the jdom Element (org.jdom.Element).  I've written the serializer,deserializer,factories and added the type mapping to the wsdd file.  The service deploys and updates the server-config with the typeMapping Element but when javaToWsdl tries to generate the wsdl I having some problems.  Specifically I'm getting the following message;
	- The class org.jdom.Element does not contain a default constructor, which is a requirement for a bean class.  The class cannot be converted into an xml schema type.  An xml schema anyType will be used to define this class in the wsdl file.

The typeMapping node in the wsdd file is 
<typeMapping qname="myjdomNS:LeinResponse" xmlns:myjdomNS="http://jdom.soapenabled.armada.com"
  	languageSpecificType="java:org.jdom.Element"
  	serializer="com.armada.soapenabled.JdomElementSerializerFactory"
  	deserializer="com.armada.soapenabled.JdomElementDeserializerFactory"
  	encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>

And once this is deployed the typeMapping node in the server-config.wsdd file is
<typeMapping deserializer="com.armada.soapenabled.JdomElementDeserializerFactory" 	encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" qname="ns1:LeinResponse" 	serializer="com.armada.soapenabled.JdomElementSerializerFactory" type="java:org.jdom.Element" 
	xmlns:ns1="http://soapenabled.armada.com"/>

The is not much documentation on creating a custom serializer but I think I've got it.  I believe the problem may lie in the javaToWSDL code but I'm not sure.  My plan was to let the WSDL get generated and then tweak as needed but that may not be possible.  Anyone have any thoughts?