I used @Xmljavatypeadapter on my class like below
@XmlJavaTypeAdapter(XMLStringAdapter.class)
public class XMLCollection {
public Integer content ;
public XMLCollection() {
super();
}
public class XMLStringAdapter extends XmlAdapter<String, XMLCollection> {
@Override
public String marshal(XMLCollection arg0) throws Exception {
return "8888";
}
@Override
public XMLCollection unmarshal(String arg0) throws Exception {
return new XMLCollection();
}
I found it not take effect. but when I put @XmlJavaTypeAdapter on class field it work, Annotation on class has not been implement?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126045#4126045
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126045
I'm writing webservices with jbossws, I use contract-last approach and let jboss auto-generate the wsdl:s on deployment.
However, I would like to use some kind of auto validation and correct schema generation for values not nillable for example.
So, the optimal way would be to use like hibernate annotations to annotate @NotNull, regexp, etc. on my pojos, and have it validated and also have the wsdl generated in the proper way.
I don't want to manaully hack the wsdl:s afterwards, I want the clients to always be able to access the server and get the latest wsdl without having a process of editing it, publish it manually etc.
Is there a way to do this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126040#4126040
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126040