aspose file tools*
The moose likes Web Services and the fly likes how to Create web service from java source? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "how to Create web service from java source?" Watch "how to Create web service from java source?" New topic
Author

how to Create web service from java source?

ahmet oguz
Greenhorn

Joined: Mar 08, 2006
Posts: 18
hi,

I want to use jax-ws and which Axis should i use? Axis or Axis2?

i want to ask another Question:
without using Axis, I want to write a web service from java source and i use Annotation Processing Tool. What is the Annotation Processor? I search from the internet and i must write a Annotation processor? why?

I can not write a web service server without using any ide. I have a java source file(it is very simple java code take from sun web site) How to create a a web service server with this source one by one?. I search from internet but i am very sad that i found nothing and i don't know what i should do.
Can someone help me?

thanks,

My source file

import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;

@WebService(name="AddTwoNumbersPortType",
serviceName="AddNumbersService")
public class AddNumbers {

@WebMethod(operationName="Add")
public int addNumbers(@WebParam(name = "number1") int n1,
@WebParam(name = "number2") int n2) {
return n1 + n2;
}
}
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42292
    
  64
A number of comments in no particular order:
  • You don't need an IDE for writing WS.
  • If you want to use JAX-WS, then you don't need Axis (in fact, Axis doesn't even support JAX-WS). But you do need to install JAX-WS: How to run JAX-WS on Tomcat
  • APT (the annotation processing tool) is part of JAX-WS; its documentation will tell you how to use it


  • Ping & DNS - my free Android networking tools app
     
    jQuery in Action, 2nd edition
     
    subject: how to Create web service from java source?