cancel
Showing results for 
Search instead for 
Did you mean: 

to create a Web Service for EJB

Former Member
0 Kudos

Hello,

I created one WS for my EJB which has one method it returns array type of java bean. The bean has 8 properties, but the WS has been showing only one property when i test the WS.

But it is displaying all properties when i use servlet.

I would appreciate ur suggestion.

Regards,

Krishna.

Accepted Solutions (1)

Accepted Solutions (1)

former_member182372
Active Contributor
0 Kudos

Hi Krishna,

create getter and setter for every bean property you need to expose through WS.

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

Hi Maksim Rashchynski,

I have created all accessor and mutator properties. I has been displaying all properties in servlet, but i could not get all properties in Web Services.

thank you for suggestion.

Former Member
0 Kudos

Hi,

Check out whether u have followed all this steps:

1)Create an Ejb module project and then inside this project include a Enterprise bean project.

2) Create a getter and setter methods in the bean.java and call those methods in the local.java and the main java file.

3) Then rebuild the application create an archive for it.open a new ear project in the j2ee pers.

4) Next step is to create a virtual interface and a webservice in ejbjar.xml.After completing all rebuild and deploy the newly created EAR file.Now this webservice will be added to the server.

5) GO to the WD appln, in the model create a model and then give the necessary proxy settings.If the file is in the local server then no need for giving UDDi or URL u can directly take it from the server or url itself.

6) After giving the connections open the data modeller to map all the model nodes from the new model that we created latest.Then in the implementation u can direcly call the webservice request that u want.This req instance should be created in the comp ctller and then binded to the node.

Hope it helps,

Regards,

Nagarajan.

Answers (0)