public void genarate()throws WrapperFault {
String language = wscontext.getWrapInfo().getWrapperLanguage();
if(WrapperConstants.LANGUAGE_JAVA.equalsIgnoreCase(language)){
//if(WrapperConstants.SERVER.equals(wscontext.getWrapInfo().getTargetEngine()))
(new Genarator(WrapperConstants.GENERATOR_WRAPPER_JAVA, wscontext)).genarate();
//else
//(new Genarator(WrapperConstants.GENERATOR_CLIENT_WRAPPER_JAVA, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_SERVICE_JAVA, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_PARAM_JAVA, wscontext)).genarate();
}else if(WrapperConstants.LANGUAGE_CPP.equalsIgnoreCase(language)){
if(WrapperConstants.SERVER.equals(wscontext.getWrapInfo().getTargetEngine())){
(new Genarator(WrapperConstants.GENERATOR_WRAPPER_CPP, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_WRAPPER_HPP, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_SERVICE_CPP, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_SERVICE_HPP, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_PARAM_CPP_ALL, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_CLASSLOADER_CPP, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_DEPLOYMENT, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_SERVER_EXCEPTION, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_UNDEPLOYMENT, wscontext)).genarate();
/*
* make sure the BuildScript generator is called at last. If you call earlier not all files will be added
* to the build script (Ex: to Makefile.am).
*/
(new Genarator(WrapperConstants.GENERATOR_BUILDSCRIPT, wscontext)).genarate();
}else{
(new Genarator(WrapperConstants.GENERATOR_CLIENT_STUB_CPP, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_CLIENT_STUB_HPP, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_CLIENT_EXCEPTION, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_PARAM_CPP_ALL, wscontext)).genarate();
/*
* make sure the BuildScript generator is called at last. If you call earlier not all files will be added
* to the build script (Ex: to Makefile.am).
*/
(new Genarator(WrapperConstants.GENERATOR_BUILDSCRIPT, wscontext)).genarate();
}
}else if(WrapperConstants.LANGUAGE_C.equalsIgnoreCase(language)){
if(WrapperConstants.SERVER.equals(wscontext.getWrapInfo().getTargetEngine())){
(new Genarator(WrapperConstants.GENERATOR_WRAPPER_C, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_WRAPPER_H, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_SERVICE_C, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_PARAM_C_ALL, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_CLASSLOADER_C, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_DEPLOYMENT, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_UNDEPLOYMENT, wscontext)).genarate();
/*
* make sure the BuildScript generator is called at last. If you call earlier not all files will be added
* to the build script (Ex: to Makefile.am).
*/
(new Genarator(WrapperConstants.GENERATOR_BUILDSCRIPT, wscontext)).genarate();
}else{
(new Genarator(WrapperConstants.GENERATOR_CLIENT_STUB_C, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_CLIENT_STUB_H, wscontext)).genarate();
(new Genarator(WrapperConstants.GENERATOR_PARAM_C_ALL, wscontext)).genarate();
/*
* make sure the BuildScript generator is called at last. If you call earlier not all files will be added
* to the build script (Ex: to Makefile.am).
*/
(new Genarator(WrapperConstants.GENERATOR_BUILDSCRIPT, wscontext)).genarate();
}
}
else{
throw new WrapperFault("Unsupported Language"+language);
}