The Web Service Receiver Server Connector is part of the TDI Web Services suite.
Due to limitations of the Axis library used by this component only WSDL (http://www.w3.org/TR/wsdl) version 1.1 documents are supported. Furthermore, the supported message exchange protocol is SOAP 1.1.
This Connector is basically an HTTP Server specialized for servicing SOAP requests over HTTP. It operates in Server mode only.
AssemblyLines support an Operation Entry (op-entry). The op-entry has an attribute $operation that contains the name of the current operation executed by the AssemblyLine. In order to process different web service operations easier, the Web Service Receiver Server Connector will set the $operation attribute of the op-entry.
The Web Service Receiver Server Connector supports generation of a WSDL file according to the input and output schema of the AssemblyLine. As in TDI 7.1 AssemblyLines support multiple operations, the WSDL generation can result in a web service definition with multiple operations. There are some rules about naming the operations:
The Web Service Receiver Server Connector provides the "wsdlRequested" Connector Attribute to the AssemblyLine.
If an HTTP request arrives and the requested HTTP resource ends
with "?WSDL" then the Connector sets the value of the "wsdlRequested"
Attribute to true; otherwise the value of this Attribute
is set to false.
This Attribute's value tells the AssemblyLine whether the request
received is a SOAP request or a request for a WSDL file, and allows
the AssemblyLine to distinguish between pure SOAP requests and HTTP
requests for the WSDL file. The AssemblyLine can use a branch component
to execute only the required piece of logic - (1) when a request
for the WSDL file has been received, then the AssemblyLine can read
a WSDL file and send it back to the web service client; (2) when a
SOAP request has been received the AssemblyLine will handle the SOAP
request. Alternatively, you could program the system.skipEntry(); call
at an appropriate place (in a script component, in a hook in the first
Connector in the AssemblyLine, etc.) to skip further processing.
It is the responsibility of the AssemblyLine to provide the necessary
response to either a SOAP request or a request for a WSDL file.
The Connector implements a public method:
This method can be used
from TDI JavaScript™ in
a script component to read the contents of a WSDL file on the local
file system. The AssemblyLine can then return the contents of the
WSDL in the "soapResponse" Attribute, and thus to the web
service client in case a request for the WSDL was received.
The Generate WSDL button runs the WSDL generation utility.
The WSDL Generation utility takes as input the name of the WSDL
file to generate and the URL of the provider of the web service (the
web service location). This utility extracts the input and output
parameters of the AssemblyLine in which the Connector is embedded
and uses that information to generate the WSDL parts of the input
and output WSDL messages. It is mandatory that for each Entry Attribute
in the "Initial Work Entry" and "Result Entry" Schema the "Native
Syntax" column be filled in with the Java type of the Attribute (for
example, "java.lang.String"). The WSDL file generated by
this utility can then be manually edited.
The operation style of the SOAP Operation defined in the generated
WSDL is rpc.
The WSDL generation utility cannot generate a <types...>...</types>
section for complex types in the WSDL.
The Web Service Receiver Server Connector stores the following
information from the HTTP/SOAP request into Attributes of the Connector's conn entry, ready to be mapped into the work entry (also see Schema):
When reaching the Response stage of the AssemblyLine, this Connector
requires the SOAP response message in text XML form or as DOMElement from
the "soapResponse" Attribute of the work Entry
to be mapped out:
The Connector then wraps the SOAP response message into an HTTP
response and returns it to the web service client.
Axis Easy Web Service Server Connector.
public String readFile (String aFileName) throws IOException;
Schema
Input Schema
Table 32. Web Service Receiver Server Connector Input Schema
Attribute
Value
host
Type is String. Contains the name of the host
to which the request is sent. This parameter is set only if "wsdlRequested"
is false.
requestedResource
The requested HTTP resource.
soapAction
The SOAP action HTTP header. This parameter
is set only if "wsdlRequested" is false.
soapRequest
The SOAP request in txt/XML or DOMElement format.
This parameter is set only if "wsdlRequested" is false.
wsdlRequested
This parameter is true if a WSDL file is requested
and false otherwise.
http.username
This attribute is used only when HTTP basic
authentication is enabled. The value is the username of the client
connected.
http.password
This attribute is used only when HTTP basic
authentication is enabled. The value is the password of the client
connected.
Output Schema
Table 33. Web Service Receiver Server Connector Output Schema
Attribute
Value
responseContentType
The response type. The default response type
is "text/xml". It is used with SOAP messages.
soapResponse
The SOAP response message. If wsdlRequested
is true, then soapResponse is set to the contents of the WSDL file.
http.credentialsValid
This attribute is used only when HTTP basic
authentication is enabled. When the client provides username and password
for HTTP Basic Authentication then this attribute must be set to true
or false (this is not done by the Connector, it's done by the
AssemblyLine using the Connector). If the value is true this means
that the client is authenticated correctly and access is granted.
If the value is false then the user is not authenticated and an HTTP
"Not Authorized" Connector response is returned.
Configuration
Parameters
Connector Operation
See also