Hi,
This is my client code.
WorkRetrievalServiceStub stub2;
try {
stub2 = new
WorkRetrievalServiceStub("http://localhost:7001/axis2/services/WorkRetrievalService");
String title = "I LOVE YOU";
FindWorkDetails findWorkDetails0 = new FindWorkDetails();
findWorkDetails0.setTitle(title);
Enumeration ewks = (Enumeration)
stub2.findWorkDetails(findWorkDetails0).get_return();
wksRetrieveEDIDtl wksret=null;
while(ewks.hasMoreElements()){
wksret=(wksRetrieveEDIDtl) ewks.nextElement();
System.out.println(wksret.getWorksNo());
System.out.println(wksret.getWkTitle());
System.out.println(wksret.getArtisteName());
System.out.println(wksret.getComposerName());
System.out.println(wksret.getTxnStatus());
}
} catch (Exception e) {
e.printStackTrace();
}
I am getting following exception while executing it.
java.lang.ClassCastException:
com.netreachasia.webservices.WorkRetrievalServiceStub$Enumeration cannot be
cast to java.util.Enumeration
at com.netreachasia.client.Client2.main(Client2.java:19)
This is my webservice method.
rs = stmt.executeQuery(query);
while(rs.next()){
sdtl = new wksRetrieveEDIDtl();
sdtl.setWorksNo(rs.getLong(1));
sdtl.setWkTitle(rs.getString(2));
sdtl.setComposerName(rs.getString(3));
sdtl.setArtisteName(rs.getString(4));
sdtl.setTxnStatus(rs.getString(5));
colvector.addElement(sdtl);
}
Where wksRetrieveEDIDtl is normal class.
WS is created and deployed using AXIS2-Eclipse plugin.
Same way, WSDL is created from it using AXIS2-Eclipse plugin.
Same way, Clinent side stub and handler are created using AXIS2-Eclipse
plugin.
I have attached the WSDL for reference.
Can you please help me to find out what is the issue.
Regards,
Meet. http://old.nabble.com/file/p29836592/WorkRetrievalService.wsdl
WorkRetrievalService.wsdl
--
View this message in context:
http://old.nabble.com/Webservice-Enumeration-classcastexception-in-AXIS2-WS-tp29836592p29836592.html
Sent from the Axis - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]