cancel
Showing results for 
Search instead for 
Did you mean: 

How to declare a DataSource for a Webservice

Former Member
0 Kudos

Hi,

I'm trying to program a webservice that connects to a database. The easiest possibility, I thought, was to implement a simple Java Class as Endpoint, that does a JNDI Lookup.

Then I looked how to declare a datasource for a webservice and found no documentation for a webservices, only for EJBs and other J2EEApps.

Does anyone know how to do that?

Ciao

Jens

Accepted Solutions (1)

Accepted Solutions (1)

suresh_krishnamoorthy
Active Contributor
0 Kudos

Hi Jens,

How to create Web Service:

1. Create EJB Project(Stateless session bean is recommended).

2. Create interface according to your requirements

3. Signature(Parameters, data type) should be same in Remote,Bean and Local interface

4. Create EAR Project and corresponding add the EJB Project

5. Expose EJB as Web service. Right click on EJB Project->other->web services->web service(new VI and VSD).

6. Deploy to Application Server.

7. Goto http://localhost:50100/index.html. click on Web service navigator you can find web service

8. Test the web service.

Let me know if want more details

Regards, Suresh KB

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

thanks for your answer. I hoped to get around the overhead of a EJB (its just a prototype I'm developing).

Ciao

Jens