To design, compose, and test Web service calls in <oXygen/> follow the
procedure:
Create a new document or open
an existing document of type WSDL.
Design the Web Service descriptor in the WSDL editor pane where the
content
completion is driven by a mix of the WSDL and SOAP schemas.
You do not need to specify the schema location for the WSDL standard
namespaces because <oXygen/> comes with these schemas and uses them by
default to assist the user in editing Web Service descriptors.
While editing the Web-Services descriptors check their
conformance to the WSDL and SOAP schemas. In the following
example you can see how the errors are reported.
Check if the defined messages are accepted by the Web Services
server. <oXygen/> is providing two ways of testing, one for the currently
edited WSDL file and other for the remote WSDL files that are published
on a web server.
For the currently edited WSDL file open the WSDL SOAP Analyser tool
by pressing the toolbar button
WSDL SOAP Analyser or use the menu
item → or from the Project view contextual menu select
It contains a SOAP analyser and sender for Web Services Description
Language file types.
The analyser fields are:
Services. The list of services defined by the WSDL
file. Ports. The ports for the selected service. Operations. The list of available operations for the selected
service. Action URL. Shows the script that serves the operation. SOAP Action. Identifies the action performed by the
script. Version: 1.1 or 1.2. The SOAP version is selected
automatically depending on the selected port. Request Editor. It allows you to compose the web service
request. When an action is selected, <oXygen/> tries to generate as
much content as possible for the SOAP request. The envelope of
the SOAP request has the correct namespace for the selected SOAP
version, that is
http://schemas.xmlsoap.org/soap/envelope/
for SOAP 1.1 or
http://www.w3.org/2003/05/soap-envelope
for SOAP 1.2. Usually you just have to change few values in
order for the request to be valid. The content completion is
available for this editor and is driven by the schema that
defines the type of the current message. While selecting
different operations <oXygen/> will remember the modified request
for each one. You can press the "Regenerate" button in order to
overwrite your modifications for the current request with the
initial generated content. The editor has visual line wrap so
that all content is visible without scrolling. Attachments List. You can define a list of file's URLs to be
attached to the request. Response Area. Initially it displays an auto generated server
sample response so you can have an idea about how the response
will look like. After pressing the Send
button it will present the message received from the server in
response to the Web Service request. It may show also error
messages. In case the response message contains attachments,
<oXygen/> will prompt you to save them, then will try to open them
with the associated system application. The response area has
visual line wrap so that all content is visible without
scrolling. Errors List. There may be situations in which the WSDL file is
respecting the WSDL XML Schema, but it fails to be valid for
example in the case of a message that is defined by means of an
element that is not found in the types section of the WSDL. In
such a case, the errors will be listed here. This list is
presented only when there are errors. Send Button. Executes the request. A status dialog is shown
when <oXygen/> is connecting to the server.
The testing of a WSDL file is straight-forward, you just have to
click on the WSDL analysis button, then select the service, the port and
the operation. The editor will generate the skeleton for the SOAP
request. You can edit the request, eventually attach files to it and
send it to the server. Watch the server response in the response area.
For testing remote WSDL files see the next section.
Once defined, a request derived from a Web Service descriptor can be saved
with the Save button to a Web Service SOAP Call(WSSC)
file for later reuse. In this way you will save time in configuring the URLs
and parameters. You can open the result of a Web Service call in an editing view. In this
way you can save it or process it further.
Testing remote WSDL filesTo open and test a remote WSDL file use the menu item
→ → +oXygen+WSDL SOAP Analyser ...
press the Choose WSDL button and
enter the URL of the remote WSDL file by typing or by browsing the
local file system, a remote file system or even a UDDI Registry. Pressing OK will open the WSDL SOAP Analyser
tool. In the Saved SOAP Request tab you can open directly a
previously saved Web Service SOAP Call(WSSC) file thus skipping the analysis
phase.
© 2008 syncRO soft ltd. |