/*
 * Created on 24 nov. 2004
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package de.jacomac.sayings;

import javax.xml.rpc.ServiceFactory;
import javax.xml.rpc.Stub;

/**
 * @author Xavier
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class TestDynamic {

	public static void main(String[] args) {
		try {
		ServiceLocator loc = (ServiceLocator) ServiceFactory.newInstance().loadService(Service.class);
		ServiceSoapStub stub = (ServiceSoapStub) loc.getPort(ServiceSoap.class);
		ArrayOfLanguageType arr = stub.getAvailableLanguages();
		LanguageType[] lts = arr.getLanguageType();
		for (int i=0 ; i <lts.length ; i++){
			System.out.println("id"+lts[i].getId()+" name"+lts[i].getLanguageName());
		}
		}
		catch (Exception ex){
			ex.printStackTrace();
		}
	}
}
