Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 122096 - [60cat] Code generated for mobile WS client can't correctly handle Wrappers in CustomObject
[60cat] Code generated for mobile WS client can't correctly handle Wrappers i...
Status: VERIFIED FIXED
Product: javame
Classification: Unclassified
Component: Web Services
6.x
PC Windows XP
: P1 (vote)
: 6.x
Assigned To: Michal Skvor
issues@mobility
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-16 10:06 UTC by ieising
Modified: 2007-12-09 22:42 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
web project with all the types for testing (16.01 KB, application/x-compressed)
2007-11-16 11:19 UTC, Lukas Hasik
Details
Stacktrace during hang (16.50 KB, text/plain)
2007-11-18 11:59 UTC, chowmeined
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ieising 2007-11-16 10:06:51 UTC
[ BUILD # : RC1 ]
[ JDK VERSION : 1.6.0_02 ]

Hi,

When I generate a mobile WS client using NB, all goes well but for
arguments of type Long, or for objects with a field of type Long.

The code generated in the XX_stub.java source is something like:

    private static Object player_toObject( player obj ) {
        if(obj == null) return null;
        Object result[] = new Object[ 7 ];
        result[0] = obj.getLanguage();
        result[1] = obj.getTag();
        result[2] = obj.getName();
        result[3] = new Long(obj.getId());
        result[4] = obj.getMobileNumber();
        result[5] = obj.getEmail();
        result[6] = new Integer(obj.getErrorCode());
        return result;
    }

The compiler error is at the line

    result[3] = new Long(obj.getId());

which should be

    result[3] = new Long(obj.getId().longValue());

Iwan
Comment 1 Lukas Hasik 2007-11-16 11:16:44 UTC
thanks for the report, Iwan.
Misk, all the wrappers seems to be wrong...

    private static Object myObjectWithAllTypes_toObject( myObjectWithAllTypes obj ) {
        if(obj == null) return null;
        Object result[] = new Object[ 14 ];
        result[0] = new Boolean(obj.getMyBoolean());
        result[1] = new Byte(obj.getMyByte());
        result[2] = new Double(obj.getMyDouble());
        result[3] = new Float(obj.getMyFloat());
        result[4] = new Integer(obj.getMyInt());
        result[5] = new Long(obj.getMyLong());
        result[6] = new Short(obj.getMyShort());
  !      result[7] = new Boolean(obj.getMyBooleanWrapper());
  !      result[8] = new Byte(obj.getMyByteWrapper());
  !      result[9] = new Double(obj.getMyDoubleWrapper());
  !      result[10] = new Float(obj.getMyFloatWrapper());
  !      result[11] = new Integer(obj.getMyIntegerWrapper());
  !      result[12] = new Long(obj.getMyLongWrapper());
  !      result[13] = new Short(obj.getMyShortWrapper());
        return result;
    }
Comment 2 Lukas Hasik 2007-11-16 11:19:46 UTC
Created attachment 53105 [details]
web project with all the types for testing
Comment 3 Lukas Hasik 2007-11-16 21:28:16 UTC
this is candidate to be fixed into RC2. The fix has to be able till Saturday night because it has to be in the branch
before Sundays midnight. According to the http://wiki.netbeans.org/wiki/view/NB6HighResistance, there *must be* 24 hours
delay for review. I'm available to verify it on Saturday or early Sunday.
I'm adding Suchys on CC for review.

Michale, provide the fix, ask someone(Suchys?) for code review, commit it to trunk, add the diff here(or link to the
commit on deadock), ask for review at reviewers@netbeans, wait for QE verification, then if you have all ready you can
commit to release60 branch (24 hours after the email to reviewers@netbeans).
Comment 4 Petr Suchomel 2007-11-18 09:55:30 UTC
I reviewed and put into trunk. From scenarios I tested the fix looks OK.
 
Checking in src/org/netbeans/modules/e2e/wsdl/wsdl2java/WSDL2JavaImpl.java;
/cvs/mobility/end2end/jsr172/src/org/netbeans/modules/e2e/wsdl/wsdl2java/WSDL2JavaImpl.java,v  <--  WSDL2JavaImpl.java
new revision: 1.24; previous revision: 1.23
done
Comment 5 chowmeined 2007-11-18 11:59:48 UTC
Created attachment 53167 [details]
Stacktrace during hang
Comment 6 Lukas Hasik 2007-11-18 19:49:48 UTC
I tested with All build (Product Version: NetBeans IDE Dev (Build 20071118095622)). The fix works fine.
Comment 7 ieising 2007-11-18 19:57:20 UTC
Where can I get that latest build, so I can start using it?

Iwan
Comment 8 Lukas Hasik 2007-11-18 20:01:30 UTC
Iwan, the daily build of trunk are at http://deadlock.netbeans.org/hudson/job/trunk/
Use any build from #4486. 
Comment 9 Michal Skvor 2007-11-19 15:44:44 UTC
Committed to branch release60:
Checking in WSDL2JavaImpl.java;
/cvs/mobility/end2end/jsr172/src/org/netbeans/modules/e2e/wsdl/wsdl2java/WSDL2JavaImpl.java,v  <--  WSDL2JavaImpl.java
new revision: 1.23.2.1; previous revision: 1.23
Comment 10 Lukas Hasik 2007-11-21 10:54:04 UTC
verified in release60 build
Product Version: NetBeans IDE 6.0 RC2 (Build 200711201000)
Comment 11 Lukas Hasik 2007-12-09 22:42:25 UTC
verified in 60-patch1


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo