KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > webservice > jbws775 > DocumentTranslatorImpl


1 package org.jboss.test.webservice.jbws775;
2
3 import java.rmi.Remote JavaDoc;
4 import java.rmi.RemoteException JavaDoc;
5
6 import org.jboss.logging.Logger;
7
8 public class DocumentTranslatorImpl implements DocumentTranslator, Remote JavaDoc
9 {
10    private Logger log = Logger.getLogger(DocumentTranslatorImpl.class);
11
12    public TDocument translate(TTranslationRequest tRequest) throws TTextNotTranslatable, TDictionaryNotAvailable, RemoteException JavaDoc
13    {
14       TDocument tDocument = tRequest.getDocument();
15       
16       TDocumentHead tHead = tDocument.getHead();
17       String JavaDoc lang = tHead.getLanguage();
18       String JavaDoc 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 JavaDoc("Invalid TDocumentHead");
23
24       return tDocument;
25    }
26
27    public void quoteTranslation(TQuotationRequest quotationRequest) throws RemoteException JavaDoc
28    {
29    }
30
31    public TStatusResponse getQuotationStatus(TStatusRequest statusRequest) throws RemoteException JavaDoc
32    {
33       TStatusResponse _retVal = null;
34       return _retVal;
35    }
36 }
37
Popular Tags