Title: .NET and Axis
ahh, sorry, I don't know much about custom serializers for AXIS, someone else maybe on the list can help you with that.  maybe you need to restate the question (it has been a long-ish thread, and probably lots of people tuned out).
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 15, 2005 6:30 AM
To: [email protected]
Subject: RE: .NET and Axis

Hi Dino,
 
you can get it working because you are using the Axis generated Java beans which contains class specific Serializer and Deserializer code.
 
If I cut and paste the Axis generated Serializer and Deserializer code into my existing classes it works aswell. 
 
Thanks to you I have recognised the problem, i.e., that using the de/serializers specified in the server-config.wsdd file creates name space issues.
 

<typeMapping deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" qname="ns5:BankIdentifier" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" type="java:com.rbc.gpb.util.BankIdentifier" xmlns:ns5="http://util.gpb.rbc.com"/>

<typeMapping deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" qname="ns6:Code" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" type="java:com.rbc.gpb.util.Code" xmlns:ns6="http://util.gpb.rbc.com"/>

Any idea how I can continue to use my preexisting Java classes (and there are a lot of them) without having to cut and paste the de/serializer code into each of them?
 

Example of Axis generated Serializer and Deserializer code

private static org.apache.axis.description.TypeDesc typeDesc =

new org.apache.axis.description.TypeDesc(BankIdentifier.class, true);

static {

typeDesc.setXmlType(new javax.xml.namespace.QName("http://util.gpb.rbc.com", "BankIdentifier"));

org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();

elemField.setFieldName("bank");

elemField.setXmlName(new javax.xml.namespace.QName("http://util.gpb.rbc.com", "bank"));

elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));

typeDesc.addFieldDesc(elemField);

elemField = new org.apache.axis.description.ElementDesc();

elemField.setFieldName("transit");

elemField.setXmlName(new javax.xml.namespace.QName("http://util.gpb.rbc.com", "transit"));

elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));

typeDesc.addFieldDesc(elemField);

elemField = new org.apache.axis.description.ElementDesc();

elemField.setFieldName("key");

elemField.setXmlName(new javax.xml.namespace.QName("http://util.gpb.rbc.com", "key"));

elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));

elemField.setNillable(true);

typeDesc.addFieldDesc(elemField);

elemField = new org.apache.axis.description.ElementDesc();

elemField.setFieldName("number");

elemField.setXmlName(new javax.xml.namespace.QName("http://util.gpb.rbc.com", "number"));

elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));

typeDesc.addFieldDesc(elemField);

}

/**

* Return type metadata object

*/

public static org.apache.axis.description.TypeDesc getTypeDesc() {

return typeDesc;

}

/**

* Get Custom Serializer

*/

public static org.apache.axis.encoding.Serializer getSerializer(

java.lang.String mechType,

java.lang.Class _javaType,

javax.xml.namespace.QName _xmlType) {

return

new org.apache.axis.encoding.ser.BeanSerializer(

_javaType, _xmlType, typeDesc);

}

/**

* Get Custom Deserializer

*/

public static org.apache.axis.encoding.Deserializer getDeserializer(

java.lang.String mechType,

java.lang.Class _javaType,

javax.xml.namespace.QName _xmlType) {

return

new org.apache.axis.encoding.ser.BeanDeserializer(

_javaType, _xmlType, typeDesc);

}

------------------------------------------------------------

This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.

Ce courrier �lectronique est confidentiel et prot�g�. L'exp�diteur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) d�sign�(s) est interdite. Si vous recevez ce courrier �lectronique par erreur, veuillez m'en aviser imm�diatement, par retour de courrier �lectronique ou par un autre moyen.

============================================================

Reply via email to