チェンジセット 295
- コミット日時:
- 2008/05/19 17:18:45 (14 年前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
trunk/im-jssp/src/main/java/org/intra_mart/jssp/script/api/SOAPClientObject.java
r294 r295 395 395 String portName, 396 396 String serviceName) { 397 try { 398 // エンジン生成 397 try{ 399 398 CodeGenerationEngine engine = getCachedCodeGenEngine(wsdlLocationURI, outputLocation, portName, serviceName); 400 399 CodeGenConfiguration codeGenConfiguration = engine.getConfiguration(); 401 402 400 return codeGenConfiguration; 403 401 } 404 catch (Exception e) { 405 throw Context.throwAsScriptRuntimeEx(e); 406 } 407 } 408 402 catch (CodeGenerationException cge) { 403 throw Context.throwAsScriptRuntimeEx(cge); 404 } 405 } 406 407 409 408 /** 410 409 * CodeGenerationEngineの取得。(キャッシュあり) … … 418 417 */ 419 418 private CodeGenerationEngine getCachedCodeGenEngine(String wsdlLocationURI, 420 421 422 419 File outputLocation, 420 String portName, 421 String serviceName ) throws CodeGenerationException { 423 422 424 423 CodeGenerationEngine engine = cache4codeGenEngine.get(wsdlLocationURI); … … 478 477 return args; 479 478 } 480 479 481 480 private String getStubClassName(CodeGenConfiguration codeGenConfiguration) { 482 481 … … 640 639 args[1] = "-c"; 641 640 args[2] = unix.toString(); 642 _logger.debug("Compile Command(UNIX) -> {} {} {}", (Object[]) args);641 _logger.debug("Compile Command(UNIX) -> {} {} {}", (Object[]) args); 643 642 } 644 643 else{ … … 998 997 999 998 if(returnType.equals(void.class)){ 999 // 引数が存在する場合 1000 1000 if(operationParamTypes.length != 0){ 1001 1001 source.append(" this.stub." + operatinoName + "(operationParam);") .append(LINE_SEP); 1002 1002 } 1003 // 引数がない場合 1003 1004 else{ 1004 1005 source.append(" this.stub." + operatinoName + "();") .append(LINE_SEP); … … 1007 1008 } 1008 1009 else{ 1009 String getterName = "get_return"; 1010 List<String> getterNameList = new ArrayList<String>(); 1011 1010 1012 Map<String, PropertyDescriptor> returnTypeProp = JavaScriptUtility.getBeanPropertyMap(returnType); 1011 1013 Iterator<PropertyDescriptor> propDescIt = returnTypeProp.values().iterator(); … … 1015 1017 // setterが無いプロパティは除外 (例:「class」プロパティ) 1016 1018 if(propDesc.getReadMethod() != null && propDesc.getWriteMethod() != null){ 1017 getterName = propDesc.getReadMethod().getName(); 1018 break; 1019 getterNameList.add(propDesc.getReadMethod().getName()); 1019 1020 } 1020 1021 } 1021 1022 1023 // 引数が存在する場合 1022 1024 if(operationParamTypes.length != 0){ 1023 1025 source.append(" var javaResult = this.stub." + operatinoName + "(operationParam);") .append(LINE_SEP); 1024 1026 } 1027 // 引数がない場合 1025 1028 else{ 1026 1029 source.append(" var javaResult = this.stub." + operatinoName + "();") .append(LINE_SEP); 1027 1030 } 1031 1032 // 戻り値が単一の場合 1033 if(getterNameList.size() == 1){ 1034 String getterName = getterNameList.get(0); 1028 1035 source.append(" var jsResult = " + name4JavaScriptUtility + ".javaBeanToJS"); 1029 1036 source.append( "(javaResult." + getterName + "());") .append(LINE_SEP); 1037 } 1038 // 戻り値が複数の場合 1039 else{ 1040 source.append(" var jsResult = " + name4JavaScriptUtility + ".javaBeanToJS(javaResult);") .append(LINE_SEP); 1041 } 1030 1042 1031 1043 source.append(" jsResult = normalize(jsResult);") .append(LINE_SEP); … … 1082 1094 * @throws ClassNotFoundException 1083 1095 */ 1084 protected void executeStubJS(String stubClassName, File srcDir, String targetEndpoint) throws JavaScriptException, FileNotFoundException, InstantiationException, IllegalAccessException, IOException, ClassNotFoundException { 1096 protected void executeStubJS(String stubClassName, File srcDir, String targetEndpoint) 1097 throws JavaScriptException, FileNotFoundException, 1098 InstantiationException, IllegalAccessException, 1099 IOException, ClassNotFoundException { 1085 1100 ScriptScope scope = getScriptScope(stubClassName, srcDir); 1086 1101 this.setPrototype(scope); … … 1294 1309 Never 1295 1310 } 1296 1297 1311 }