System.out.println("AdvRef: " + toAdvertiseRef.toString());
    public synchronized void sfDeploy() throws SmartFrogException, RemoteException {        super.sfDeploy();        // get configureation for SLP        Properties p = getSlpConfiguration();                // get properties for the service to advertise.        System.out.println("AdvRef: " + toAdvertiseRef.toString());        toAdvertise = sfContext().get("toAdvertise"); //sfResolve(toAdvertiseRef);        serviceType = (String)sfResolve(serviceTypeRef);        serviceAttributes = (Vector)sfResolve(serviceAttributeRef);        serviceLifetime = ((Integer)sfResolve(serviceLifetimeRef)).intValue();        advertiseReference = ((Boolean)sfResolve(advertiseReferenceRef)).booleanValue();                // convert attributes to ServiceLocationAttribute objects.        Iterator iter = serviceAttributes.iterator();        serviceAttributes = new Vector();        while(iter.hasNext()) {            Vector v = (Vector)iter.next();            String id = (String)v.remove(0); // remove id.            ServiceLocationAttribute a = new ServiceLocationAttribute(id, v);            serviceAttributes.add(a);        }                // check if we want to advertise reference.        if(toAdvertise instanceof Reference) {            if(advertiseReference) {                // build reference to advertise                Reference ref = sfCompleteName();                 ref.addElements( (Reference)toAdvertise );                 toAdvertise = ref;            }            else {                // get the object to advertise                toAdvertise = sfResolve(toAdvertiseRef);            }        }                // build URL.        createServiceURL();                // create advertiser...        try {            ServiceLocationManager.setProperties(p);            advertiser = ServiceLocationManager.getAdvertiser(new Locale(p.getProperty("net.slp.locale")));        }catch(ServiceLocationException ex) {            throw (SmartFrogException)SmartFrogException.forward(ex);        }    }