- Complete JAX-WS Hello World implementation - Docker and Docker Compose support for easy deployment - Python test scripts for service validation - Comprehensive README with setup instructions for Windows and Linux - Maven configuration with JAX-WS dependencies 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Test Scripts for JAX-WS Hello World Service
This folder contains test scripts to interact with the JAX-WS Hello World Service.
Python Test Script
Prerequisites
- Python 3.6 or higher
- pip (Python package installer)
Installation
-
Install Python dependencies:
Windows:
cd scripts pip install -r requirements.txtLinux/Mac:
cd scripts pip3 install -r requirements.txt
Running the Test Script
Make sure the JAX-WS service is running (using Docker or traditional setup).
Windows:
python test_hello_world.py
Linux/Mac:
python3 test_hello_world.py
# OR
chmod +x test_hello_world.py
./test_hello_world.py
What the Script Does
The test_hello_world.py script:
- Checks WSDL availability - Verifies the service is running
- Tests with multiple names - Calls the service with predefined test cases
- Interactive mode - Allows you to enter custom names and see responses in real-time
Example Output
============================================================
JAX-WS Hello World Service Test Client
============================================================
1. Checking WSDL availability...
WSDL is accessible
2. Testing Hello World Service...
Calling service with name: 'World'
Response: Hello World, World!
Calling service with name: 'Python Client'
Response: Hello World, Python Client!
Calling service with name: 'JAX-WS User'
Response: Hello World, JAX-WS User!
Calling service with name: 'Docker'
Response: Hello World, Docker!
3. Interactive Mode
--------------------------------------------------------
Enter a name (or 'quit' to exit): John
Response: Hello World, John!
Enter a name (or 'quit' to exit): quit
============================================================
Test completed!
============================================================
Using the HelloWorldClient Class
You can also use the HelloWorldClient class in your own Python scripts:
from test_hello_world import HelloWorldClient
# Create client
client = HelloWorldClient()
# Check if service is available
is_available, message = client.check_wsdl()
print(message)
# Call the service
response = client.call_hello_world("Your Name")
print(response) # Output: Hello World, Your Name!
Troubleshooting
Service Not Available
If you get a connection error:
-
Make sure the Docker container is running:
docker ps | grep jaxws -
Check if the service is accessible:
curl http://localhost:8080/jaxws-hello-world/hello?wsdl -
Restart the service:
docker-compose restart
Python Not Found
If you get "python: command not found":
- Windows: Use
pythonorpycommand - Linux/Mac: Use
python3command
Dependencies Not Installing
If pip install fails:
-
Make sure pip is up to date:
python -m pip install --upgrade pip -
Try installing with sudo (Linux/Mac only):
sudo pip3 install -r requirements.txt -
Use a virtual environment:
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt