Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to Create web service from java source?

 
ahmet oguz
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

  •  
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic