×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2013
    Posts
    2

    null values in the xml.rpc.Type variables

    Hello, I am using a WSDL generated code from the J2ME Wireless ToolKit, and in testing out the stub file, I encounter a null pointer exception.

    upon tracing I noticed the error occurs in this line of code

    _type_wait = new Element(_qname_wait, Type.STRING, 0, 1, false);

    more specifically in the Type.STRING value as it returns a null value

    I tried printing out the other variables, and all of them returned null.

    and yet checking on the documentation here:
    http://developer.nokia.com/Resources.../rpc/Type.html

    they are supposed to return a value.

    is there something I am missing or a jar file I need to add?

    the IDE I'm using is the Nokia IDE for Java ME that came with the Nokia Asha SDK 1.0 installer.

    Thanks and regards

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,750

    Re: null values in the xml.rpc.Type variables

    Yes, these static fields are supposed to be constants, and available all the time. How sure are you about that Type.STRING happens to be null and not _qname_wait, or perhaps something inside the constructor? Is it indicated in the exception, or are you tracking the code with the debugger?
    As a sanity check you may consider checking the related import line, just to be certain about that Type is really javax.microedition.xml.rpc.Type and not something else for any strange reason.

  3. #3
    Registered User
    Join Date
    Oct 2013
    Posts
    2

    Re: null values in the xml.rpc.Type variables

    yes, I am tracking it via the debugger

    I also checked the _qname_wait variable too just incase

    using this line

    System.out.println(_qname_wait.getNamespaceURI());
    System.out.println(_qname_wait.getLocalPart());
    System.out.println(Type.STRING);
    System.out.println(Type.BOOLEAN);
    System.out.println(Type.BYTE);
    System.out.println(Type.DOUBLE);
    System.out.println(Type.FLOAT);
    System.out.println(Type.INT);
    System.out.println(Type.LONG);
    and got this as a result on the console


    http://service.gcash.globe.com/
    wait
    null
    null
    null
    null
    null
    null
    null
    my import line is

    import javax.microedition.xml.rpc.Type;

    and clicking on the type takes me to the Type class

    the JAR of this class file belongs to container 'JavaME library [Nokia Asa SDK1.0/Nokia_Asha_SDK_1_0]

Similar Threads

  1. How to check for null values in Xml parsing?
    By Manpreet_Singh in forum Mobile Java General
    Replies: 7
    Last Post: 2013-05-30, 07:03
  2. After the values of Content-type feilds
    By per2000 in forum General Messaging
    Replies: 1
    Last Post: 2010-04-21, 03:17
  3. VideoControl.getSnapshot(null) returns null-value
    By cipherovski in forum Mobile Java Media (Graphics & Sounds)
    Replies: 4
    Last Post: 2010-01-11, 07:31
  4. Replies: 4
    Last Post: 2007-08-07, 13:45
  5. Getting values for logical (True/False) variables
    By slitchfield in forum Symbian
    Replies: 2
    Last Post: 2006-02-21, 22:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×