Guy Barden

Greenhorn
+ Follow
since Jan 09, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Guy Barden

Hi,
I am new to webservices, and am trying to publish a simple stateless Session EJB as a Webservice. Having written the EJB and deployed it to a server within the WSAD UTE, I then attempt to generate the WSDL using the context menu while the bean is highlighted.
The WebService wizard is brought up, and it asks me to select a web project for the webservice.
Question 1. What if I want to access the webservice from an application client using WSIF, how do I go about selecting my application project or the EJB project from which I want generate the service.
Question 2. I create an empty web-project to continue with the Webservice wizard, and in the 2nd screen of the wizard it won't let me select my EJB as it is not part of the web project. So how can I select my EJB?
Thanks in advance
Guy Barden
21 years ago
There is a redpiece in draft for review relating to EJB development in WSAD 5, and can be found at

EJB Development with WSAD 5
22 years ago
Hi,
How do I run an Application Client Module under the WSAD Test Environment. I have defined JNDI references to the EJB's used in the application client deployment descriptor and started the a Test Server running with the EJB's loaded. The only way I can see to run the Client class is to switch to the Java or Debug view and run from there. However when I do this, I get the following error...
Caught an exception.
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:255)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:292)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at guysports.ejb.client.PlayerClient.main(PlayerClient.java:24)
The code in the main() method for PlayerClient starts with...
try {
Context initial = new InitialContext();
Object objref = initial.lookup("ejb/PlayerHome");
PlayerHome playerHome = (PlayerHome)PortableRemoteObject.narrow(objref, PlayerHome.class);
.
.
.
This is run in a Websphere 5.0 Test Environment
Thanks in advance
Guy Barden
22 years ago
Hi,
I am using the UTE in WSAD to test an EJB that I am developing. I have set up the Data Source information in the Server Configuration, using the com.microsoft.jdbcx.sqlserver.SQLServerDataSource driver class and defined a JNDI name for the datasource.
When I attempt to connect to the DB in EJB code with
InitialContext ic = new InitialContext();
DataSource ds = (DataSource)ds.lookup(jndiName);
Connection con = ds.getConnection();
I get an exception, and the following JDBC error
com.ibm.ejs.container.CreateFailureException: javax.ejb.EJBException: Unable to connect to database. [Microsoft][SQLServer 2000 Driver for JDBC]JTA is not support when selectMethod=direct. Switch to selectMethod=cursor.;
My question is, how do I set the JDBC connection property 'selectMethod' within the WSAD Server DataSource configuration. Or is this something I need to set within java code prior to obtaining a connection?
Thanks in advance
Guy
22 years ago
Hi,
I looked at your query hoping to find the solution to mine. I believe your problem is a simple typo. You are specifying the DataSource class as com.microsoft.sqlserver.SQLServerDataSource when it should be com.microsoft.jdbcx.sqlserver.SQLServerDataSource.
Regards
Guy
[ January 09, 2003: Message edited by: Guy Barden ]
22 years ago