This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
MobPack 551 build 070423 -have a webservice method that returns array of Strings public String[] getStrings() ->the generated stubs fails in runtime of the WTK 2.5.1 on ClassCastException -the 2.2 code java.lang.String[] result; // Convert the result into the right Java type. // Unwrapped return value Object _returnObj = ((Object[])resultObj)[0]; result = (java.lang.String[]) _returnObj; return result; -the 2.5 code java.lang.String[] result; // Convert the result into the right Java type. // Unwrapped return value Object _returnObj = ((Object[])resultObj)[0]; // Even if return type of remote method is String[], // Object[] is expected according to the spec. Object[] _returnObjArray = (Object[]) _returnObj; result = new java.lang.String[_returnObjArray.length]; java.lang.System.arraycopy(_returnObjArray, 0, result, 0, _returnObjArray.length); return result; ->we have to upgrade the generator in the 5.5.1 to generate 2.5.1 complaint code when we want to bundle the WTK 2.5.1 -the wtk 2.5.1 code runs on wtk2.2 without problems
Fixed.
the generated code is OK with the replaced library. the issue has to be verified in tomorrow's daily build
Here is the generated code with platform set to WTK 2.5.1 However I still see class cast exception. "VisualMidlet, greeter, VisualMidlet Exception: java.lang.ClassCastException" Generated code. java.lang.String[] result; // Convert the result into the right Java type. // Unwrapped return value Object resultObj2 = ((Object[])resultObj)[0]; result = (java.lang.String[]) resultObj2; return result;
PCM, the issue has been fixed on Apr/25 and Lukas was going to verify it in tomorrow's daily build (Apr/26). Have you built your own IDE from the latest sources? Because the latest daily is from Apr/25.
works in build 070426_1
v