views:

222

answers:

3

I'm reading Java Web Services: Up and Running, 1st Edition.
Publisher: O'Reilly Media, Inc.
Pub Date: February 15, 2009

In Chapter 1 --> First Example.
We make 3 Java classes:

  1. TimeServer.java (example 1.1)
  2. TimeServerImpl.java (example 1.2)
  3. TimeServerPublisher.java (example 1.3) <<--- this is a main

and than we make .xml (example 1.4)

My questions are:

  1. Where should I save these .java files? I'm using NetBeans 6.5 so the default is My Documents.
  2. What should I name the .xml file from example 1.4?
  3. I already try that, I am using XAMPP so the file WSDL.xml (example 1.4) I put in xampp/httdocs but when i try 127.0.0.1:9876[/]ts?wsdl it says page not found.

note: I DIDN'T ASK HOW TO MAKE JAVA CLASS IN NETBEAN. I WANT TO ASK WHERE SHOULD I MUST SAVE THIS FILE?????? BECAUSE WHEN I TRY 127.0.0.1:9876[/]ts?wsdl IT SAY PAGE NOT FOUND !!!!!

+4  A: 

Subjective opinion:
If you don't know such basic things such as placing java files into right directories, perhaps, you should first try a few much simpler examples, than creating a web service.

In Netbeans, you can create a Java project, than add Java classes by doing
File -> New... -> Java -> Java Class

To learn how to use Netbeans, visit:
http://netbeans.org/kb/

Especially "NetBeans IDE Java Quick Start Tutorial" might be helpful to start.

Furthermore, you don't run Java webapps with some kind of XAMP, but with Java web servers such as Glassfish or Apache Tomcat.
Both these servers are bundled with Netbeans when you use Netbeans Java profile (see table at Netbeans download page)

ivan_ivanovich_ivanoff
Yea, i know how to make that. But WHERE should i save that file?? because when i try 127.0.0.1:9876[/]ts?wsdl it says page not found.
Tralala001
A: 

I think you should follow ivan_ivanovich_ivanoff's adive and start with the basics.

When you have done that, you might want to come back here and read my answer to the question Stack Overflow: Simple Java web services. It assumes you know how to compile a Java class and how to package it into a JAR, but since these are pretty basic tasks you have to learn anyhow, it might help you getting your web service up and running.

Simon Lehmann
A: 

Look at the example code provided with the book.

Glenn