public Item(ServiceItem item) throws RemoteException {
  Object svc=item.service;
  if (enableImplToStubReplacement && svc instanceof Remote) {
    try {
      svc=RemoteObject.toStub((Remote)svc);
      if (logger.isLoggable(Level.FINER)) {
        logger.log(Level.FINER,"replacing {0} with {1}",new Object[]{item.service,svc});
      }
    }
 catch (    NoSuchObjectException e) {
    }
  }
  serviceID=item.serviceID;
  ServiceTypeBase stb=ClassMapper.toServiceTypeBase(svc.getClass());
  serviceType=stb.type;
  codebase=stb.codebase;
  try {
    service=new MarshalledWrapper(svc);
  }
 catch (  IOException e) {
    throw new MarshalException("error marshalling arguments",e);
  }
  attributeSets=EntryRep.toEntryRep(item.attributeSets,true);
}

public Item ( ServiceItem item ) throws RemoteException { Object svc = item . service ; if ( enableImplToStubReplacement && svc instanceof Remote ) { try { svc = RemoteObject . toStub ( ( Remote ) svc ) ; if ( logger . isLoggable ( Level . FINER ) ) { logger . log ( Level . FINER , "replacing {0} with {1}" , new Object [ ] { item . service , svc } ) ; } } catch ( NoSuchObjectException e ) { } } serviceID = item . serviceID ; ServiceTypeBase stb = ClassMapper . toServiceTypeBase ( svc . getClass ( ) ) ; serviceType = stb . type ; codebase = stb . codebase ; try { service = new MarshalledWrapper ( svc ) ; } catch ( IOException e ) { throw new MarshalException ( "error marshalling arguments" , e ) ; } attributeSets = EntryRep . toEntryRep ( item . attributeSets , true ) ; }
converts a serviceitem to an item . any exception that results is bundled up into a marshalexception .
