How can I get my simple Java webservice to work?

In the tutorial exercise, we create 3 Java classes and an XML file.

My questions:

  • Where should I save these .java files? I am using NetBeans 6.5, so the default is My Documents.
  • What should I name the XML file?

I am using XAMPP, so the file is WSDL.xml

placed in xampp/httdocs

, but when I open 127.0.0.1:9876[/]ts?wsdl

it it says the page was not found.

Note. I don't have to know how to create a Java class. I need to know where to put the file in which the class is defined.

0


a source to share


3 answers


Subjective Opinion:
If you don't know basic things like putting java files in the correct directories, you should probably try some simpler examples first than building a maintenance website.

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/



In particular, "The NetBeans Java Java Quick Launcher might be helpful to get you started.

Also, you are not running Java webapps with some sort of XAMP, but with Java webservers like Glassfish or Apache Tomcat .
Both of these servers are bundled with Netbeans when you are using the Netbeans Java Profile (see table Netbeans download page )

+3


a source


I think you should follow the adan_ivanovich_ivanoff adive and start with the basics.



When you've done that, you can come back here and read my answer to Stack Overflow: Simple Java Web Services . It assumes you know how to compile a Java class and how to package it in a JAR, but since these are fairly simple tasks that you need to learn, this can help you get your web service up and running.

0


a source


Take a look at the example code contained in the book.

0


a source







All Articles