Return-Path: Delivered-To: apmail-xml-axis-user-archive@xml.apache.org Received: (qmail 38922 invoked by uid 500); 15 Nov 2002 17:53:24 -0000 Mailing-List: contact axis-user-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@xml.apache.org Received: (qmail 38910 invoked from network); 15 Nov 2002 17:53:24 -0000 Content-Type: text/plain; charset="iso-8859-1" From: Ben Souther To: axis-user@xml.apache.org Subject: Re: Serializing / Deserializing Date: Fri, 15 Nov 2002 12:53:33 -0500 User-Agent: KMail/1.4.1 References: <4A32342FB3C84C4EAEE771E5002296EF0EB22C@pat.Freeserve.com> In-Reply-To: <4A32342FB3C84C4EAEE771E5002296EF0EB22C@pat.Freeserve.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200211151253.33393.bsouther@fwdco.com> X-Virus-Scanned: Cape.Com VirusScan, no known virus found X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Are you calling: call.registerTypeMapping(args...) anywhere in your code= ? Is the class file for you javabean available to your client? On Friday 15 November 2002 12:46 pm, Russell Brown wrote: > Cheers ben, > > That is pretty much line for line what I have, except that the service > provider is java:EJB and maybe that is where my problem is. It migt be = the > marshalling at the EJB end that is returning the wrong type. I just don= 't > know enough about this to debug it. I have got the Axis source code and= am > reading through the stack trace trying to figure out why this works in = the > client > > TypeMapping tm =3D call.getTypeMapping(); > DeserializerFactory dsf =3D > (org.apache.axis.encoding.DeserializerFactory)tm.getDeserializer(qn); > if(dsf !=3D null) { > FSDeserializer fsd =3D > (com.freeserve.fsmap.encoding.FSDeserializer)dsf.getDeserializerAs(Cons= tant >s.AXIS_SAX); } > > but not in the RPCHandler class ( where the error is being thrown ) > > if (dser =3D=3D null) { > //hack this to get our deserializer: > //***************************************************** > > TypeMapping tmfs =3D context.getTypeMapping(); > DeserializerFactory dsf =3D > (org.apache.axis.encoding.DeserializerFactory)tmfs.getDeserializer(qnam= e); > if(dsf !=3D null) { > =09dser =3D > (org.apache.axis.encoding.Deserializer)dsf.getDeserializerAs(Constants.= AXIS >_SAX); } else { > =09System.out.println("Still couldn't find it!!!"); > throw new SAXException(Messages.getMessage("noDeser01", localName,"" + > type)); } > > //***************************************************** > //end hack > } > > > So, thanks for your help, I'll post to the list if I can find out what = is > going wrong with my code . > > Regards > > Russell > > -----Original Message----- > From: Ben Souther [mailto:bsouther@fwdco.com] > Sent: 15 November 2002 17:39 > To: axis-user@xml.apache.org > Subject: Re: Serializing / Deserializing > > > > This is up and working with Axis 1.0. on tomcat 4.1.12. > I'm sorry if it's sloppy. > Good luck. > > > > > From the WSDD: > > > value=3D"com.someone.somwhere.service.PayrollSummaryService"/> name=3D"allowedMethods" value=3D"*" /> > > xmlns:ns1=3D"com.someone.somewhere.payrollsummary.sha= red" > =20 > languageSpecificType=3D"java:com.someone.somewhere.payrollsummary.share= d.Payr >ollSummaryDataBean" /> > > xmlns:ns1=3D"com.someone.somewhere.payrollsummary.sha= red" > =20 > languageSpecificType=3D"java:com.someone.somewhere.payrollsummary.share= d.Empl >oyeeListDataBean" /> > > > > > From the client: > > > try{ > 112 Service service =3D new Service(); > 113 Call call =3D (Call)service.createCall(); > 114 call.setTargetEndpointAddress( > 115 new URL(_payrollSummaryServiceURL)); > 116 > 117 QName qName =3D new QName( > 118 "PayrollSummaryService", > 119 "getPayrollSummaryData" > 120 ); > 121 call.setOperationName(qName); > 122 > 123 // > 124 // The QName for mapping the PayrollSummaryDataBean > 125 // to the return value from the web service. > 126 // > 127 QName returnQName =3D new QName( > 128 "com.someone.somewhere.payrollsummary.shared", > 129 "PayrollSummaryDataBean" > 130 ); > 131 > 132 call.registerTypeMapping( > 133 PayrollSummaryDataBean.class, > 134 returnQName, > 135 new BeanSerializerFactory( > 136 PayrollSummaryDataBean.class, > 137 returnQName > 138 ), > 139 new BeanDeserializerFactory( > 140 PayrollSummaryDataBean.class, > 141 returnQName > 142 ) > 143 ); > 144 > 145 call.setReturnType( > 146 returnQName, > 147 PayrollSummaryDataBean.class > 148 ); > 149 > 150 System.out.println("period: " + _period); > 151 > 152 _dataBean =3D (PayrollSummaryDataBean)call.invoke( > 153 new Object[]{ > 154 _clientID, > 155 _employeeID, > 156 _period, > 157 _year > 158 } > 159 ); > 160 }catch(Exception e){ > 161 System.out.println( > 162 "Error in PayrollSummaryBean: " > 163 + e > 164 ); > 165 } > 16 > > On Friday 15 November 2002 11:42 am, Russell Brown wrote: > > Hi, > > > > Has anyone on this list managed to serialize AND deserialize a bean w= ith > > Axis's bean serializer or there own custom serializer / deserializer = ever > > ? > > > > Just to know that it has been done once will fill me with a renewed h= ope. > > If you can tell me how you side stepped the ubiquitous error (Error : > > org.xml.sax.SAXException: Deserializing parameter 'arg1': could not = find > > deserializer for type ANYTYPEWHATSOEVEREXCEPTPRIMATIVES) as well I ma= y > > very well weep with joy. > > > > Many thanks > > > > Russell > > > > PS check this out: > > > > call.registerTypeMapping(ArgumentSet.class, qn, > > FSSerializerFactory.class, FSDeserializerFactory.class, t); > > > > TypeMapping tm =3D call.getTypeMapping(); > > boolean isit =3D tm.isRegistered(ArgumentSet.class, qn); > > > > System.out.println("Well isit ? : "+isit); > > > > DeserializerFactory dsf =3D > > (org.apache.axis.encoding.DeserializerFactory)tm.getDeserializer(qn); > > > > if(dsf !=3D null) { > > =09FSDeserializer fsd =3D > > (com.freeserve.fsmap.encoding.FSDeserializer)dsf.getDeserializerAs(Co= nsta > >nt s.AXIS_SAX); } > > > > all works, yes I can find the f***** deserializer but AxisEngine cann= ot: > > anyone, anyone ?? > > > > RB