axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From silver17 <>
Subject Which Annotations work in Axis 2.1.3?
Date Tue, 15 Apr 2008 03:06:13 GMT

Hi guys,

I've been experimenting with annotations and axis2 web services, and have
some degree of success, but would like some help.  Some things i've noticed:

1.  @WebResult has seems to have no affect when you load the services
auto-generated ?WSDL
2.  the targetNamespace functionality in both the @WebResult and @WebParam
don't seem to work when trying to access the services wsdl via ?WSDL.

Is there something i'm missing?

My development setting is Eclipse Europa with the Axis2-1.3 service archiver
and code-gen plugins.  I build a java project and develop a service like

import javax.jws.WebService;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.soap.SOAPBinding;

 * Implementation of a calculator web service.
 * @author Bill
public class CalculatorService {

	 * Adds two numbers.
	 * @param a
	 * @param b
	 * @return the addition of two numbers.
	@WebMethod (
	public @WebResult(name="Add") int add(
			@WebParam (mode=WebParam.Mode.IN, 
					   name="param1") int a, 
			@WebParam (mode=WebParam.Mode.IN, 
					   name="param2") int b) {
		return a + b;

Everything seems to be hit and miss with the annotations.  For the
@WebMethod the targetNamespace and operationName seems to have no effect. 
The @WebResult has no effect.  So if I want to have a document literal web
service with a response parameter as addResult instead of addResponse I
can't seem to do that.

Is there something i'm missing?

View this message in context:
Sent from the Axis - User mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message