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.

Bug 107514

Summary: Codegeneration issues inMobile Client to Webapplication
Product: javame Reporter: pcmreddy <pcmreddy>
Component: Web ServicesAssignee: Michal Skvor <misk>
Status: RESOLVED DUPLICATE    
Severity: blocker    
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description pcmreddy 2007-06-20 20:50:57 UTC
Build used 06/17/07 on xp with JDK 1.6 U1

How to reproduce.
Create a webapplication
Add a webservice "HelloWS"
Add an operation "getMsg" takes "name" as parameter and returns a string.

Deploy this application to Appserver.
Now Create a Mobile application.
Add "Mobile Client to Web Application"
Select "getMsg" operation

Observe the generated code has an error.
Open Utility.java in webapplication.
...
   protected static Object readObject(DataInput in) throws IOException {
        short type = in.readShort();
        Object result;
        switch (type) {
        case STRING_TYPE:
            result = ;
            return result;
        case NULL_TYPE: /* null */
            return null;
        default:
            throw new IllegalArgumentException(
                    "Unsupported return type (" + type + ")");
        }
    }
}
...

Check the line "result =;"
There is no value on right side.

Open WebService.java in Client code observe the same.
...
   private static Object readObject(DataInput in) throws IOException {
        int type = in.readShort();
        int length;
        Object result;
        switch (type) {
        case 1:
            result = ;
            return result;
        case -1: /* NULL */
            return null;
        }
        throw new IllegalArgumentException("Unsupported return type (" + type + ")");
    } 
}
...

Check the line " result = ;"
There is no value on right side.
Comment 1 Lukas Hasik 2007-06-20 20:54:08 UTC

*** This issue has been marked as a duplicate of 107513 ***