Hello:

How do you deal with or annotate interfaces in JAX-WS? I have the class below that has a variable of type "Credential". Credential in this case is an interface and is set using Spring's dependency injection. I have pasted below the code for the interface and the implementation classes. I am not sure what I should be annotating and how.:

public class AuthenticationContextImpl implements Serializable, AuthenticationContext {

private String authenticationType;
private String resourceId;
private Credential credential;
private String domainId;
private String principal;
private String password;
@XmlJavaTypeAdapter(ObjectMapAdapter.class)
private Map<String,Object> authParam = new HashMap();


Above Credential is an interface. I have an implement to the interface, but I am not sure how to deal with this.

public interface Credential {

}

public abstract class BaseCredential implements Credential {

   public BaseCredential() {
}
}


XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PasswordCredential", propOrder = {
   "domainId",
   "principal",
   "password"
})
public class PasswordCredential extends BaseCredential {

   String domainId;
   String principal;
   String password;
public PasswordCredential() { }


Thanks
Suneet



Reply via email to