cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in Sessionbean exposed as webservice

Former Member
0 Kudos

Hello Gurus,

I have developed a session bean and exposed it as a webservice when I try to execute webservice from webservice navigator it runs fine, so there is no problem with webservice.

Then I have created a Adaptive webservice model for that webservie and try to execute it but it gives below error

Exception on execution of web service with WSDL URL '<WSDL URL>' with operation 'addNewExam' in interface 'ManageExamVi_Document'

I think this is because I have not set the Username / password to execute the webservice but I don't know how to set it.

in depricated webservice model there were methods available for setting username password for webservice execution but nothing likewise is available new Adaptive websrvice model, but I am not sure the problem there or some where else.

Please tell me how can I solve this error.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

christiansche
Active Participant
0 Kudos

Hi,

you have set the parameter "name" for authentication. but i suppose, your webservice has an input parameter "name" that has to be filled.

best regards,

Christian

Former Member
0 Kudos

Hi Christian,

I am already setting input parameter "name" and all other input parameter still I am facing this issue. And I have not set the parameter "name" for authentication, I don't have any idea about it can you please explain me about it.

Please help me

Thanks

Former Member
0 Kudos

Hi,

Try to set the uname and passowrd for adaptive webservice model using this code before model object exceution:

wdContext.currentXXXXElement().modelObject()
  .setInvokerProperty(Stub.USERNAME_PROPERTY,  "username");
wdContext.currentXXXXElement().modelObject()
  .setInvokerProperty(Stub.PASSWORD_PROPERTY, "password");

If this doesnt resolve your problem print the exception messages by keeping the below statements in exception block

e.getCause()

e.getMessage()

Hope this helps you

Regards,

Saleem

Former Member
0 Kudos

Hi Saleem,

Thanks a lot for your message I have added the Username password as you suggested but still it gives same problem. below are the error message and cause.

e.getCause()

java.lang.reflect.InvocationTargetException: Cannot find the required parameter [name] in request message content.

e.getMessage()

Exception on execution of web service with WSDL URL '<WSDL URL>' with operation 'addNewExam' in interface 'ManageExamVi_Document'

I am getting more confused now because getCause is saying that name parameter is not set properly but I have set it properly till the model attribute but still it is giving problem.

I don't have any clue now to solve this issue, please help me.

Thanks