cancel
Showing results for 
Search instead for 
Did you mean: 

Error after converting from DEPRECATED Webservice to Adaptive Webservice Mo

Former Member
0 Kudos

Hi,

Earlier I used Deprecated Webservicel Model and that was working fine.

Now I need to change Deprecated Webservice model to Adaptive Webservice Model.

And I have created new model for that and changed code accordingly.

When I try to execute child nodes asNull which is throwing NullPointerException.

Error:

java.lang.NullPointerException

at com.uprr.reqaccess.ReqAccessInfoSubmitView.onActionSubmitRequestCostCenter(ReqAccessInfoSubmitView.java:1221)

at com.uprr.reqaccess.wdp.InternalReqAccessInfoSubmitView.wdInvokeEventHandler(InternalReqAccessInfoSubmitView.java:920)

Code:

wdContext.currentRequestDetailsDataElement().setRequestReason(wdContext.currentContextElement().getReqReason());

wdContext.currentRequestDetailsDataElement().setPriority(wdContext.currentContextElement().getPriority());

Iam getting wdContext.currentRequestDetailsDataElement(). as null

Please help me in this

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

when you are exposing the webservices in the deprecated version there is no need to create destination in the visual admin

rather to using adaptive webservice model .

so when you move your code by creating a adaptive webservice model , then you must create destinations in

visual admin tool and use logical destinations when using adaptive webservice model ,

former_member201361
Active Contributor
0 Kudos

Hi,

Is the RequestDetailsData node is a model node or Value node ?

Exception is due to RequestDetailsDataElement being Null, please check the cardinality of the node, if it is 1 to 1, then there is no problem else change the cardinality of ur node.

please give more inputs for ur query.

Thanks and Regards

Former Member
0 Kudos

RequestDetailsData is the node to which I need to set values and execute it.

Example :

wdContext.currentRequestDetailsDataElement().setRequestReason(wdContext.currentContextElement().getReqReason());

I have debugged and found that wdContext.currentRequestDetailsDataElement() is null

Before setting values to this node do i need to write any code like create new node or new element

Can any provide sample examples on Adaptive Webservice Models

Thanks

former_member201361
Active Contributor
0 Kudos

Hi,

should not initialize the model nodes in this way, let say my model looks

EmployeeModel

+ Request_CreateEmployee

+ createEmployee

- Name

- Ecode

EmployeeModel model = new EmployeeModel();

Request_CreateEmployee req = new Request_CreateEmployee(model);

createEmployee employee = new createEmployee(model);

employee.setName("Raj");

employee.setEcode(123564);

req.setCreateEmployee(employee);

wdContext.nodeRequest_CreateEmployee(req);

then execute the model.

search in SDN for articles regardiung adaptive web service model.

hope it helps.

Former Member
0 Kudos

Thanks,

for providing such important information. Thats part is working fine now.

When try to execute the execute xxxxx() metnod in controller iam getting following error

Exception on execution of web service on destination 'WD_WS_EXECUTION_DEST_WEBSERVICE' for operation 'getSubmitRequest' in interface 'AESubmitRequestService_5_2Vi_Document'

Please help me in this

former_member201361
Active Contributor
0 Kudos

Hi,

please check whether u have created the 'WD_WS_EXECUTION_DEST_WEBSERVICE' Destination in NWA--> SOA Management --> Destinations Template. other wise while importing the web service select no logical destinations and execute the model.

if possible please post the full error message.

please check in NWA --> Problem Managemnt --> Logs and Traces --> for errors related to ur Component.

Hope it helps.

Thanks and Regards