To provide
additional details about how to access the Web
service, you create a variable based on the Interface part:
myService WeatherForcast {@WebBinding
{wsdlLocation="wsdl/weatherForecast",
wsdlService="wsdlforecast",
wsdlPort="wsdlport"};
In that declaration, you can specify either of two
properties,
each of which gives you a way to specify details that indicate how
to access the Web service: @WebBinding and @BindService.
You can use @WebBinding to specify the WSDL-file
detail directly in your code, while you can use @BindService to
specify those details in a deployment descriptor and make changes
at configuration time.
The two properties are mutually exclusive:
- @WebBinding
- Use this
property to specify, in your code, the details that indicate
how to access the Web service. You do not need to create the @WebService
complex property from scratch. Rich UI writes the details in a comment,
which is stored in the file that holds the Interface part created
from a WSDL file. The property fields are as follows:
- wsdlLocation
- A string that identifies
the name and location of the WSDL file.
The location is relative to the EGLSource folder. For example, if
the file is named weatherForecast.wsdl and is in
the EGLSource folder, the string is "weatherForecast.wsdl". If the
file is in EGLSource/wsdl, the string is "wsdl/weatherForecast.wsdl".
- wsdlPort
- A string
that identifies the name of the wsdl:port element within
the wsdl:service element in the WSDL file.
- wsdlService
- A string that identifies the name of the wsdl:service element
in the WSDL file.
- uri
- If specified, uri is a string that overrides the URL specified
in the WSDL file. If the service is available at a location besides
the location that is specified in the WSDL file, such as a different
version of the service used for production or testing, you can enter
that location here and use that version of the service instead. By
default, this value is null.
- @BindService
- Use this
property to use an entry in the EGL deployment descriptor
to indicate how to access the Web service. Using this property has
two implications:
- You create a service-client binding in the
EGL deployment descriptor
by using a WSDL file
- The deployment-descriptor editor retains,
from that file, details
on the file location, the wsdl:port element, and the wsdl:service
element
The @BindService property
has one
field:
- bindingKey
- Identifies the deployment-descriptor entry that includes the two
details.
You can specify
@BindService without
specifying the
bindingKey field, in which
case the property identifies the deployment-descriptor entry that
has the same name as the Interface part. Here is an example of that
usage, which refers to the deployment-descriptor entry named WeatherForecast:
MyService WeatherForecast {@BindService{}}