# The @SOAPBinding annotation

The @SOAPBinding annotation is defined by the javax.jws.soap.SOAPBinding interface. It provides details about the SOAP binding used by the service when it is deployed. If the @SOAPBinding annotation is not specified, a service is published using a wrapped doc/literal SOAP binding.

You can put the @SOAPBinding annotation on the SEI and any of the SEI's methods. When it is used on a method, setting of the method's @SOAPBinding annotation take precedent.

The following table shows the properties for the @SOAPBinding annotation.

| Property | Values | Description |
| --- | --- | --- |
| style | Style.DOCUMENT (default)<br>Style.RPC | Specifies the style of the SOAP message. If RPC style is<br>specified, each message part within the SOAP body is a parameter or return<br>value and will appear inside a wrapper element within the<br>soap:body element. The message parts within the wrapper<br>element correspond to operation parameters and must appear in the same order<br>as the parameters in the operation. If DOCUMENT style is<br>specified, the contents of the SOAP body must be a valid XML document, but<br>its form is not as tightly constrained. |
| use | Use.LITERAL (default)<br>Use.ENCODED | Specifies how the data of the SOAP message is streamed. |
| parameterStyle | ParameterStyle.BARE<br><br>ParameterStyle.WRAPPED (default) | Specifies how the method parameters, which correspond to message parts<br>in a WSDL contract, are placed into the SOAP message body. A parameter style<br>of BARE means that each parameter is placed into the message<br>body as a child element of the message root. A parameter style of<br>WRAPPED means that all of the input parameters are wrapped<br>into a single element on a request message and that all of the output<br>parameters are wrapped into a single element in the response message. If you<br>set the style to RPC you must use the WRAPPED parameter style. |

The below shows an SEI that uses rpc/literal SOAP messages.

Specifying an RPC/LITERAL SOAP Binding

```
package org.eric.demo;

import javax.jws.*;
import javax.jws.soap.*;
import javax.jws.soap.SOAPBinding.*;

@WebService(name="quoteReporter")
@SOAPBinding(style=Style.RPC, use=Use.LITERAL)
public interface QuoteReporter {
   ...
}
```