package ossj.common.cbe.service;

import javax.xml.bind.annotation.adapters.XmlAdapter;

import javax.oss.cbe.service.ServiceKey;

/**
 *
 * @author pm200800
 */
public class ServiceKeyAdapter extends XmlAdapter<ServiceKeyImpl,ServiceKey>{
    
    public ServiceKey unmarshal(ServiceKeyImpl p) throws Exception {
        try {
            ServiceKey r = p;
            return r;
        }
        catch (Exception e)
        {
            e.printStackTrace();
            String msg = "Unable to unmarshall ServiceKey : "+p;
            throw new Exception(msg+" due to "+e);   
        }                
    }

    public ServiceKeyImpl marshal(ServiceKey p) throws Exception {
        try {
            ServiceKeyImpl r = (ServiceKeyImpl)p;
            return r;
        }
        catch (Exception e)
        {
            e.printStackTrace();
            String msg = "Unable to marshall ServiceKeyImpl : "+p;
            throw new Exception(msg+" due to "+e);   
        } 
    }
    
}
