Skip to Content
author's profile photo Former Member
Former Member

problem in retrieving the model content

Hi,

i am using the webservice as a model in my application. In the database table i have nearly 100 fields, for this i have written a CRUD's in EJB and make it available through the webservices. Now i am using this webservices in the webdynpro. while retrieving the date from table through webservice a problem occured. If any one of the field is null then an exception is raised i,e null pointer exception. i solved this by keeping try catch block for each of the field seperately. so it increses the line of code. Is any alternative for reducing the Line of code in this situation or any better solution?

Thanks in advance

Siva Sankar N

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 17, 2006 at 04:18 AM

    Hi

    Assign the values after checking the null to the webservice.

    if(wdContext.currentContextElement().get<Param>()!=null && wdContext.currentContextElement().get<Param>().length()>0){

    //assign thevalue to webservice

    }

    Kind Regards

    Mukesh

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.