Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link

Chris Hannegan

+ Follow
since Sep 21, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Chris Hannegan

I would try the Java 5 EE tutorial. I did it 4 days ago and I guess i'm having some success.

It helps having some experience with ANT and having the ability to install Sun's application server 9.0.

15 years ago
Can you tie a JNDI name to a Web Service?

I'm about 4 days in to Web Services using JAX-WS. I created a generic web service and have it deployed successfully on Sun App Server 9.
I created a generic client that calls my web service. I can run it and I get the expected results.

Two things I do not like (I dont like it because i dont understand it yet )
1. The wsdl attribute in the wsimport command. Here's my ANT snippet:
<wsimport sourcedestdir="${dir.wsimport}"

When I am building my client, I dont want to build it for DEV while pointing to one server, then build it again when i want to migrate my client to a TEST environment, then build it again when I want to migrate to my PRODUCTION environment.

2. My client java code looks like this:
public class FooClient {
//@WebServiceRef(wsdlLocation = "http://localhost:8080/foo/FooServic?wsdl")
static FooService service;

Again, I have my server name hard-coded. I dont want to recompile everytime I promote my code to a new environment.

According to documentation, you can tie a Web Service to a jndi name and i think i did that successfully. I just dont know how to call it.

@WebServiceRef API mentions that you can supply a JNDI name. However, I cant find any examples of this.

Can it be done?

While typing this...I was beginning to think it was impossible. Simply because you need to find the wsdl definition...and if you're using a jndi still need to list the server that you are using.
15 years ago