To provide additional details about how to access
the SOAP service, you can create a variable based on the Interface
part.
For example:
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 the @webBinding property to
specify the WSDL-file detail directly in your code. You can use the @BindService property
to specify those details in a deployment descriptor. This property
allows for 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. Rich UI writes the details in a comment, which is stored
in the file that contains 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 root directory of the project. For
example, if the file is named weatherForecast.wsdl and
is in the wsdl folder, 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 that is 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 binding in the EGL deployment descriptor
by using a WSDL file.
- From that file, the deployment-descriptor editor retains the details
about 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 the
@BindService property
without specifying the
bindingKey field.
In that 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{}}
For
details about setting up the EGL deployment descriptor, see “Adding
a SOAP service binding to the deployment descriptor.”
Each SOAP service invocation uses a new HTTP session, and no session
information is retained from invocation to invocation. Your code
cannot usefully call a service that is using session variables, which
retain information from invocation to invocation.