cancel
Showing results for 
Search instead for 
Did you mean: 

How to Solve NullPointerException in WebService handling

Former Member
0 Kudos

hi experts,

>> I am in initial stage in Web Dynpro

>> I created one webservice ( just Add to number)

>> My Nodes Structure is

AddNode

!

!____AddInput_Node

!---Num1

!---Num2

!

!____AddOutput_node

!---result

I set Cordinality 1-1 to all nodes

When I run my application , i got NullPointerException error

how to solve this error

Pl can one help me...

Advance Thanks

Balaji

Accepted Solutions (1)

Accepted Solutions (1)

dhawal_joshi
Employee
Employee
0 Kudos

Hi ,

The problem is not with the model , in the context you have to intantiate the node to which the context is binded .

Kindly look at the following learning material

https://www.sdn.sap.com/irj/sdn/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#63

regards

Dhawal

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Have you initialized the model and did the binding as follows

//create model instance

Model model = new Model();

//create model objects + relations

Request_NumberToWords requestMO = new Request_NumberToWords(model);

NumberToWords words = new NumberToWords(model);

words.setUbiNum(123);

requestMO.setNumberToWords(words);

//bind model object to WD context

wdContext.nodeRequest_NumberToWords().bind(requestMO);

Former Member
0 Kudos

Hi Balaji,

Just check whether ur service works fine with wsnavigator on ur server.U have to check the parameters also,in case ur service need it.

regards

Sumit