HI! 
Can anyone help me in this CODE???
What's is wrong?? I'm tring to generate an Authetication Token to public a
businessEntity.
I load juddi.properties that i have copied to my workspace from the juddi
folder into tomcat.

Please check the code ty

Configurator.java

import java.io.InputStream;
import java.io.IOException;
import java.util.Properties;

import org.apache.juddi.util.Config;
import org.apache.juddi.util.Loader;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

public class Configurator {
        
        private  final String PROPFILE_NAME = "juddi.properties";       
        private  Log log = LogFactory.getLog(Configurator.class);               
        
        public Configurator(){
                try {
                        InputStream stream = 
Loader.getResourceAsStream(PROPFILE_NAME);
                        if (stream != null){
                                Properties props = new Properties();
                                props.load(stream);
                                Config.addProperties(props);
                                System.out.println(Config.getProperties());
                        }                       
                }catch (IOException ioex) {
                        log.error("An error occured while loading properties 
from:
"+PROPFILE_NAME,ioex);
                }
        }
}

Test.java

import org.apache.juddi.datatype.request.AuthInfo;
import org.apache.juddi.datatype.response.AuthToken;
public class Test {
        
        public static void main(String[] args){
                
                try{
                        
                        Configurator registry = new Configurator();             
        
                        AuthToken authToken = 
registry.getAuthToken("usr","pwd");
                        AuthInfo authInfo = authToken.getAuthInfo();            
        
                        System.out.println("AuthToken: "+ authInfo.getValue());
                        
           }catch(Exception ex){
                   ex.printStackTrace();
           }
        }
}

Error: Exception in thread "main" java.lang.Error: Unresolved compilation
problem: 
        The method getAuthToken(String, String) is undefined for the type
Configurator
        at Test.main(Test.java:11)

Thank you for help me!
cheers!

-- 
View this message in context: 
http://old.nabble.com/Help-with-Authentication-Token-tp27498999p27498999.html
Sent from the jUDDI - User mailing list archive at Nabble.com.

Reply via email to