15 January 2008 - 2.0.1 home user-guide eclipse intellij netbeans maven PDF files forums bugs sourceforge eviware.com






Web Service Annotations

The JBossWS plugin contains functionality for easily adding JSR-181 Web Service annotations to existing Java code.

Start by enabling the JBossWS nature and by selecting the "JBossWS - Add Web Service Annotations" option from the desired Java classes right-button menu:

This will open the following dialog:

The contained options map directly to the service/binding level annotations available in the JSR-181 specification. Once the desired options have been set, select the Generate option which will add the corresponding annotations to the underlying Java file, for example:

package ole.test;

import java.util.Arrays;

@javax.jws.soap.SOAPBinding(parameterStyle = javax.jws.soap.SOAPBinding.ParameterStyle.BARE)
@javax.jws.WebService(name="TestImpl", targetNamespace="urn:ole.test", serviceName="TestImplService")
class TestImpl implements Test 
{
	@javax.jws.WebMethod()
	public String toUpperCase(String str) 
	{
		return str.toUpperCase();
	}

	@javax.jws.WebMethod()
	public String toLowerCase(String str) 
	{
		return str.toLowerCase();
	}
}

Currently, the JBossWS plugin does not support configuring annotations on a method level, standard @WebMethod annotations are added to all methods.

Deployment

Deploy the annotated class in a standard jar archive using the JBossIDE packaging, standard Eclipse/WTP packaging features, or any other desired procedure (ANT, Maven, etc..).


Next: Working with JBoss WS