It seems that Web Services don't accept a BigDecimal type param.
I receive a null value for that param.
JPA use BigDecimal for PKs annotated with @Id.
So, I have decided to implement this workaround:
Note the conversion from String to BigDecimal.
I receive a null value for that param.
JPA use BigDecimal for PKs annotated with @Id.
So, I have decided to implement this workaround:
@WebService()
@Stateless()
public class MyWebService implements Serializable {
@EJB
private MyEJBService ejbRef;
@WebMethod(operationName = "findStuff")
public Object findStuff(@WebParam(name = "someId")
String someId) {
return ejbRef.findStuff(new BigDecimal(someId));
}
@Stateless()
public class MyWebService implements Serializable {
@EJB
private MyEJBService ejbRef;
@WebMethod(operationName = "findStuff")
public Object findStuff(@WebParam(name = "someId")
String someId) {
return ejbRef.findStuff(new BigDecimal(someId));
}
}
Note the conversion from String to BigDecimal.
dude... para estos posts te recomiendo SyntaxHighlighter... haría que tu código se viera más pro... estoy hosteando los archivos necesarios en mi sitio de google sites, por si te interesa... saludos
ReplyDelete