Hi, I have an issue using JBoss4.0.4GA and JBossWS1.0.1GA.
My pojo: | public class Client { | private String username; | private java.util.Date dateCreated; | | // getters and setters | } | When I create an instance of this class and try to send this via soap all works as expected but when this class is loaded via hibernate I get a classcastexception | javax.xml.rpc.JAXRPCException: Cannot create or send response message | at org.jboss.ws.server.ServiceEndpoint.postProcessResponse(ServiceEndpoint.java:296) | at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:221) | at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355) | at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:109) | at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) | at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:75) | at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter | .... | Caused by: java.lang.ClassCastException: java.sql.Date | at org.jboss.xb.binding.SimpleTypeBindings.marshal(SimpleTypeBindings.java:1150) | at org.jboss.xb.binding.XercesXsMarshaller.marshalCharacters(XercesXsMarshaller.java:1169) | at org.jboss.xb.binding.XercesXsMarshaller.marshalSimpleType(XercesXsMarshaller.java:451) | at org.jboss.xb.binding.XercesXsMarshaller.marshalElementType(XercesXsMarshaller.java:405) | at org.jboss.xb.binding.XercesXsMarshaller.marshalElement(XercesXsMarshaller.java:380) | at org.jboss.xb.binding.XercesXsMarshaller.marshalElementOccurence | .... | >From looking at the code within fisheye you can see that only the type of >java.util.Date is checked for: | from SimpleTypeBindings | | else if(typeCode == XS_DATETIME) | 1140 { | 1141 Calendar c; | 1142 if(value.getClass() == java.util.Date.class) | 1143 { | 1144 c = Calendar.getInstance(TimeZone.getTimeZone("GMT")); | 1145 c.clear(); | 1146 c.setTime((java.util.Date)value); | 1147 } | 1148 else | 1149 { | 1150 c = (Calendar)value; | 1151 } | 1152 result = marshalDateTime(c); | 1153 } | | surely the line 1142 should either be changed to: if(value instanceof java.util.Date) or if((value.getClass() == java.util.Date.class) || (value.getClass() == java.sql.Date.class)) Gareth View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3954637#3954637 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3954637 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user