26 September 2007 - 1.7.6 | home user-guide eclipse jbossws intellij netbeans maven 1.X/2.X PDF files forums bugs sourceforge

Home
Getting Started
User Guide
IDE/Tool Plugins

- Maven Plugins
  - Maven 1.X Plugin
    - Goals
    - Properties
  - Maven 2.X Plugin
    - Goals
    - Properties
- NetBeans Plugin
  - Installation
  - Project Integration
- IntelliJ Plugin
- Eclipse Plugin
  - soapUI Nature
- JBossWS Plugin
  - New in 2.0.0 beta2
  - Getting Started
  - Publishing Web Services
    - Publish POJO Example
  - Consuming a Web Service
  - Implementing a Web Service
    - Implement WSDL Example
  - Web Service Annotations
    - EJB3/WS Annotate Example

Search soapUI site
Project Documentation

- About soapUI
- Project Info
- Project Reports

## 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