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 |
|
Specifies the style of the SOAP message. If |
use |
|
Specifies how the data of the SOAP message is streamed. |
parameterStyle |
|
Specifies how the method parameters, which correspond to message parts
in a WSDL contract, are placed into the SOAP message body. A parameter style
of |
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 {
...
}