Hi, I just started to use Axis, and I stopped on error like in this post topic - full output which I get from Servlet is: org.xml.sax.SAXException: No deserializer for {http://myfakedomain.com}TailRecord org.apache.axis.AxisFault.makeFault(AxisFault.java:101) org.apache.axis.client.Call.invoke(Call.java:2405) org.apache.axis.client.Call.invoke(Call.java:2301) org.apache.axis.client.Call.invoke(Call.java:1758) org.apache.jsp.Statistics_jsp._jspService(Statistics_jsp.java:85) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
What is wrong with this deserializer error? I provide some other files below, but maybe there is any common reason for such error? Please, can anyone give me the link to the simplest tutorial on using complex types, or tell me which Axis samples consider complex types and is in other hand the easiest to learn (I need to solve it very quickly to show Axis my boss, as a potential WS platform :). tcpmon output shows that there is an answer from service as: HTTP/1.1 200 OK Set-Cookie: JSESSIONID=FAA608C67B93053DB6A645110A000C72; Path=/ Content-Type: text/xml;charset=utf-8 Date: Sun, 12 Dec 2004 14:49:46 GMT Server: Apache-Coyote/1.1 Connection: close <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <tailResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <tailReturn soapenc:arrayType="xsd:anyType[4]" xsi:type="soapenc:Array" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <item href="#id0"/> <item href="#id1"/> <item href="#id2"/> <item href="#id3"/> </tailReturn> </tailResponse> <multiRef id="id3" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns1:TailRecord" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://myfakedomain.com"> <id href="#id4"/> <page xsi:type="soapenc:string">http://localhost:8180/</page> <ip xsi:type="soapenc:string">127.0.0.1</ip> <accessdate xsi:type="xsd:dateTime" xsi:nil="true"/> <accesstime xsi:type="xsd:anyType" xsi:nil="true"/> </multiRef> <multiRef id="id2" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:TailRecord" xmlns:ns2="http://myfakedomain.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <id href="#id5"/> <page xsi:type="soapenc:string">http://localhost:8180/</page> <ip xsi:type="soapenc:string">127.0.0.1</ip> <accessdate xsi:type="xsd:dateTime" xsi:nil="true"/> <accesstime xsi:type="xsd:anyType" xsi:nil="true"/> </multiRef> <multiRef id="id1" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns3:TailRecord" xmlns:ns3="http://myfakedomain.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <id href="#id6"/> <page xsi:type="soapenc:string">http://localhost:8180/</page> <ip xsi:type="soapenc:string">127.0.0.1</ip> <accessdate xsi:type="xsd:dateTime" xsi:nil="true"/> <accesstime xsi:type="xsd:anyType" xsi:nil="true"/> </multiRef> <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns4:TailRecord" xmlns:ns4="http://myfakedomain.com" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <id href="#id7"/> <page xsi:type="soapenc:string">http://localhost:8180/</page> <ip xsi:type="soapenc:string">127.0.0.1</ip> <accessdate xsi:type="xsd:dateTime" xsi:nil="true"/> <accesstime xsi:type="xsd:anyType" xsi:nil="true"/> </multiRef> <multiRef id="id4" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">323</multiRef> <multiRef id="id5" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">324</multiRef> <multiRef id="id7" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">326</multiRef> <multiRef id="id6" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="xsd:int" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">325</multiRef> </soapenv:Body></soapenv:Envelope> File Statistics.jws looks like: import com.myfakedomain.TailRecord; public class Statistics { // ... some other methods to initialize DB public TailRecord[] tail(){ Statement stq; ArrayList ar = new ArrayList(); try { stq = conn.createStatement(); ResultSet rs = stq.executeQuery("select * from statistics order by id desc limit 4"); while(rs.next()){ TailRecord tr = new TailRecord(); tr.setId(rs.getInt(1)); tr.setPage(rs.getString(2)); tr.setIp(rs.getString(3)); //tr.setAccessdate(rs.getDate(4)); //tr.setAccesstime(rs.getTime(5)); ar.add(tr); } } catch (SQLException e) { e.printStackTrace(); } TailRecord ret[] = (TailRecord[]) ar.toArray(new TailRecord[ar.size()]); return ret; } } And file TailRecord finally looks like: /** * TailRecord.java * * This file was auto-generated from WSDL * by the Apache Axis 1.2RC2 Nov 16, 2004 (12:19:44 EST) WSDL2Java emitter. */ package com.myfakedomain; public class TailRecord implements java.io.Serializable { private int id; private java.lang.String page; private java.lang.String ip; private java.util.Calendar accessdate; private java.lang.Object accesstime; public TailRecord() { } public TailRecord( int id, java.lang.String page, java.lang.String ip, java.util.Calendar accessdate, java.lang.Object accesstime) { this.id = id; this.page = page; this.ip = ip; this.accessdate = accessdate; this.accesstime = accesstime; } /** * Gets the id value for this TailRecord. * * @return id */ public int getId() { return id; } /** * Sets the id value for this TailRecord. * * @param id */ public void setId(int id) { this.id = id; } /** * Gets the page value for this TailRecord. * * @return page */ public java.lang.String getPage() { return page; } /** * Sets the page value for this TailRecord. * * @param page */ public void setPage(java.lang.String page) { this.page = page; } /** * Gets the ip value for this TailRecord. * * @return ip */ public java.lang.String getIp() { return ip; } /** * Sets the ip value for this TailRecord. * * @param ip */ public void setIp(java.lang.String ip) { this.ip = ip; } /** * Gets the accessdate value for this TailRecord. * * @return accessdate */ public java.util.Calendar getAccessdate() { return accessdate; } /** * Sets the accessdate value for this TailRecord. * * @param accessdate */ public void setAccessdate(java.util.Calendar accessdate) { this.accessdate = accessdate; } /** * Gets the accesstime value for this TailRecord. * * @return accesstime */ public java.lang.Object getAccesstime() { return accesstime; } /** * Sets the accesstime value for this TailRecord. * * @param accesstime */ public void setAccesstime(java.lang.Object accesstime) { this.accesstime = accesstime; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof TailRecord)) return false; TailRecord other = (TailRecord) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && this.id == other.getId() && ((this.page==null && other.getPage()==null) || (this.page!=null && this.page.equals(other.getPage()))) && ((this.ip==null && other.getIp()==null) || (this.ip!=null && this.ip.equals(other.getIp()))) && ((this.accessdate==null && other.getAccessdate()==null) || (this.accessdate!=null && this.accessdate.equals(other.getAccessdate()))) && ((this.accesstime==null && other.getAccesstime()==null) || (this.accesstime!=null && this.accesstime.equals(other.getAccesstime()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; _hashCode += getId(); if (getPage() != null) { _hashCode += getPage().hashCode(); } if (getIp() != null) { _hashCode += getIp().hashCode(); } if (getAccessdate() != null) { _hashCode += getAccessdate().hashCode(); } if (getAccesstime() != null) { _hashCode += getAccesstime().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(TailRecord.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("http://myfakedomain.com", "TailRecord")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("id"); elemField.setXmlName(new javax.xml.namespace.QName("", "id")); 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("page"); elemField.setXmlName(new javax.xml.namespace.QName("", "page")); elemField.setXmlType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string")); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("ip"); elemField.setXmlName(new javax.xml.namespace.QName("", "ip")); elemField.setXmlType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string")); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("accessdate"); elemField.setXmlName(new javax.xml.namespace.QName("", "accessdate")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "dateTime")); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("accesstime"); elemField.setXmlName(new javax.xml.namespace.QName("", "accesstime")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "anyType")); 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); } } Best regards and thx in advance, Lee