非プリミティブ データまたは単純な POJO を受け入れる操作との複雑なインターフェイスを持つコンポーネントがあります。
サービス コンシューマが WSDL を使用して問題なくクラスを生成できるように、このコンポーネント インターフェイスを Java および非 Java クライアントで使用できる標準の Web サービス インターフェイスに変換するためのベスト プラクティス (方法/方法論) は何ですか。
そのまま使える?そうでない場合、操作の動作に影響を与えずに最小限の変更を行う方法はありますか?
コンポーネント インターフェイスには、次のような操作があります。
/** This is asynchronous method that needs to callback the ResultHandler
interface which has to be implemented by the component user to handle
operationOne result **/
public void operationOne(int id, ResultHandler handler);
/** I think there is no problem with the following operation for Web Services,
when using data contracts. Correct me if I’m wrong! **/
public String operationTwo(int id, MyObject obj);
ResultHandler インターフェース:
/** Note that this handler interface contains InputStream
and Exception as parameters for the handling methods **/
interface ResultHandler {
void onComplete(InputStream is);
void onFailure(IOException ioEx);
}