Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java.io.IOException: No serializer found for class  RSS feed

 
tushar joshi
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,
i have very urgent problem.
i have to return array of beans from web service.

like
public WSEmpScheduleDO[] getEmployeeSchedule(WSEmpRequestDO wsEmpRequestDO) throws Exception


so i have written wsdd file as

<service name="EmployeeScheduleService" provider="java:RPC">

<parameter name="className" value="com.webservices.getemployeeschedule.EmployeeScheduleWS"/>


<parameter name="allowedMethods" value="*"/>

<beanMapping qname="myNS:WSEmpRequestDO" xmlns:myNS="WSEmpRequestDO"

languageSpecificType="java:com.webservices.getemployeeschedule.WSEmpRequestDO"/>


<typeMapping


qname="myNS1:WSEmpScheduleDO"

xmlns:myNS1="WSEmpScheduleDO"

languageSpecificType="java:com.webservices.getemployeeschedule.WSEmpScheduleDO[]"

serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"

deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"

encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />


</service>


and written client as

QName qname = new QName("WSEmpRequestDO", "WSEmpRequestDO");
QName schqname = new QName("WSEmpScheduleDO", "WSEmpScheduleDO");

Service service = new Service();

Call call = (Call) service.createCall();

call.setTargetEndpointAddress(new java.net.URL(endPointURL));
call.setOperationName(new QName("EmployeeScheduleService", methodName));

call.registerTypeMapping(WSEmpRequestDO.class,qname,BeanSerializerFactory.class,BeanDeserializerFactory.class);

call.registerTypeMapping(WSEmpScheduleDO[].class,Constants.SOAP_ARRAY,new ArraySerializerFactory(),new ArrayDeserializerFactory());


call.addParameter("wsEmpRequestDO", qname, ParameterMode.IN);
WSEmpScheduleDO[] schdl = (WSEmpScheduleDO[]) call.invoke(param);
System.out.println("Message from web service=" + schdl.length);


but i am getting error like this

java.io.IOException: No serializer found for class com.webservices.getemployeeschedule.WSEmpScheduleDO in registry org.apache.axis.encoding.TypeMappingImp
l@162e703

what to do to solve this issue?
i have tried whole day for finding solution
Please help me out
Thanks in advance
 
sudheshna Iyer
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For using the non standard data types,
you should write xsd for the DO and use "autotype" ant task for generating
serializer and deserializer classes or you should write these serializer/deserializer classes by userself.

Refer to :
http://www.developer.com/java/ejb/article.php/3410691 or
http://e-docs.bea.com/wls/docs70/webserv/customdata.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!