Skip to Content
avatar image
Former Member

WebService Error

Hi All,

I am trying to invoke a webservice through webdynpro. I created a model and gave the url of wsdl. I am not using any logical destinations. When i ping the WSDL, it is working fine. I give a numeric value as input and gives displays the same value as response.

Component controller init

try

{

Value model = new Value();

Request_Data req = new Request_Data(model);

Data dat = new Data(model);

dat.setValue(2);

req.setData(dat);

wdContext.nodeRequest_Data().bind(req);

}

catch(Exception e1)

{

wdComponentAPI.getMessageManager().reportSuccess("Error comp"+e1.toString());

}

-


public void executeXacute( )

{

//@@begin executeXacute()

try

{

wdContext.currentRequest_DataElement().modelObject().execute();

wdContext.nodeResponse().invalidate();

}

catch(Exception e)

{

IWDMessageManager manager=null;

manager.reportException(e.getMessage(),true);

}

View

try

{

wdThis.wdGetMytest_compController().executeXacute();

}

catch(Exception e)

{

wdComponentAPI.getMessageManager().reportSuccess("Error view"+e.toString());

}

But it is throwing Error

"Error viewjava.lang.NullPointerException".

What could be the Problem? Why null pointer Exception happens? Can anyone help me out in this?

Thanx and Regards,

Divya

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 10, 2008 at 09:51 AM

    Hi,

    The error is in the catch block of executeXacute() method.

    IWDMessageManager manager=null;

    manager.reportException(e.getMessage(),true);

    Here manager is null and you are trying to call reportException() method. That is why it is raising null pointer exception.

    Regards,

    VJR.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 10, 2008 at 07:48 AM

    Hi,

    Can you tell me the node hirerchy which you are having in the context.

    So that it can help you?

    Thanks & Regards,

    Lokesh

    Add comment
    10|10000 characters needed characters exceeded