This recipe explains how to annotate the SEI with the @SOAPBinding
annotation in order to support various transport styles. We will also show how to configure the @SOAPBinding
annotation with JDeveloper.
In this recipe, we will configure the web service from the Annotating the service endpoint interface with @WebService recipe in this chapter.
The steps involved in annotating a web service with @SOAPBinding
from JDeveloper are as follows:
org.packt.cc.business.CCGateSvc
) and select the Properties… option in JDeveloper to open the Java Web Service Editor.The default SOAP message binding and style combination is document/wrapped, and as such it does not need the @SOAPBinding
annotation for the web service.
When setting other binding and style combinations for the web service, we get the web service with the @SOAPBinding
annotation. For RPC/literal
binding style, we get the following annotation generated in CCGatePortType.java
:
@SOAPBinding(style = SOAPBinding.Style.RPC)
We have described the @SOAPBinding
annotation in detail in the Creating LITERAL and ENCODED web services recipe in Chapter 8, Exposing Java Code as a SOAP Service.