1 package org.jboss.test.webservice.jbws775; 2 3 import java.rmi.Remote ; 4 import java.rmi.RemoteException ; 5 6 import org.jboss.logging.Logger; 7 8 public class DocumentTranslatorImpl implements DocumentTranslator, Remote 9 { 10 private Logger log = Logger.getLogger(DocumentTranslatorImpl.class); 11 12 public TDocument translate(TTranslationRequest tRequest) throws TTextNotTranslatable, TDictionaryNotAvailable, RemoteException 13 { 14 TDocument tDocument = tRequest.getDocument(); 15 16 TDocumentHead tHead = tDocument.getHead(); 17 String lang = tHead.getLanguage(); 18 String title = tHead.getTitle(); 19 20 log.info("[lang=" + lang + ",title=" + title + "]"); 21 if ("en".equals(lang) == false || "title".equals(title) == false) 22 throw new IllegalStateException ("Invalid TDocumentHead"); 23 24 return tDocument; 25 } 26 27 public void quoteTranslation(TQuotationRequest quotationRequest) throws RemoteException 28 { 29 } 30 31 public TStatusResponse getQuotationStatus(TStatusRequest statusRequest) throws RemoteException 32 { 33 TStatusResponse _retVal = null; 34 return _retVal; 35 } 36 } 37 | Popular Tags |