User Guide > Publishing Resources > Publishing Resources to a Web Service > Publishing a Contract-First WSDL and SOAP Data Service
 
Publishing a Contract-First WSDL and SOAP Data Service
You can make existing WSDL definitions available through TDV by publishing them as a Web service that uses SOAP 1.1 or 1.2. When publishing contract-first WSDL, you start with the WSDL contract, and use TDV to fill out the rest of the contract. In this situation, use TDV to import existing WSDL files by using a definition set. Start with the XML Schema and WSDL contract, and finish by creating the necessary procedure code. The procedure code is created for you by TDV and is saved in the location specified.
Note: REST services do not have an associated WSDL contract.
Behavior of Abstract Contract-First WSDL
When you choose to use the abstract option with your contract-first WSDL, TDV automatically generates your input and output messages for you.
Behavior of Concrete Contract-First WSDL
When you choose to use the concrete option with your contract-first WSDL, TDV reads and uses the input and output binding messages that you have defined. The bindings that you have defined to control the security and transportation of the messages is retained and surfaced through Studio.
You can specify the port name for the binding.
To publish a contract-first WSDL and SOAP data service
1. Create a WSDL definition set. See Creating a WSDL Definition Set. For example, create NewWSDLDefinitionSet under the shared node of the TDV resource tree.
2. Make sure you are logged into Studio as a user with enough rights to publish resources.
 
3. Select the Web Services node under the Data Services node in the resource tree.
4. Right-click and select New Composite Web Service.
The Add Composite Web Service dialog opens.
5. For Data Service Name, enter a name for your web service.
6. Click OK.
7. From the resource tree, open the web service that you just made.
The Web service opens on the SOAP panel.
8. In the Service section, click Enable Contract First and set its value to true.
Select true to point to your predefined WSDL and WSDL operations. After TDV retrieves your WSDL definitions, you must finish defining the WSDL operations using the Studio WSDL Definition Editor.
A new property, Contract, appears below Enable Contract First.
9. Expand Contract.
10. Double-click WSDL Contract under Contract and type the resource path, or browse to your WSDL definition set.
Visible if Enable Contract First is set to true. Type or use the browse button to specify the WSDL definition set that you have defined within TDV.
11. Save your Web service.
Studio reads the WSDL definition set and populates the SOAP panel with the characteristics specified in the definition set.
12. In the Service portion of the screen, type or select values for the following properties:
If the property has a default value, a value is required.
Properties
Description
Enabled
True (the default value) tells the system to use the information that you have defined on this tab.
Target Namespace
Displays the location of your SOAP installation. If your WSDL contract has a target namespace defined, it will be displayed in this field.
Binding Name
A unique binding name that can be referenced from elsewhere in the WSDL definition. This name signifies that the binding is bound to the SOAP protocol format: envelope, header and body.
Contract
Property heading that is visible if Enable Contract First is set to true.
Contract Style
Visible if Enable Contract First is set to true. Select ABSTRACT or CONCRETE. Use concrete if your WSDL definitions contain bindings that you have defined to control the security and transportation of WSDL messages.
If the WSDL that you have selected in the WSDL Contract field does not contain concrete bindings, you will not be able to select the CONCRETE Contract Style.
Service Name
Visible if Enable Contract First is set to true and if Contract Style is set to CONCRETE. Values are populated from the WSDL imported through your definition set.
Port Name
Visible if Enable Contract First is set to true and if Contract Style is set to CONCRETE. Select the port from the list of values. The port does not have to be unique within the WSDL, but it must be unique within the Web Service.
Port Type Name
Visible if Enable Contract First is set to true. Select the port from the list of values. The port does not have to be unique within the WSDL, but it must be unique within the Web Service.
Implementation Folder
Visible if Enable Contract First is set to true. Points to a TDV folder where the implementation procedures are generated. Double-click to edit the location.
Enable MTOM
Valid values are true or false. Set to true to enable the use of Message Transmission Optimization Mechanism (MTOM), a method of sending binary data to and from Web services.
Security Policy
Lists all available policies defined under localhost/policy/security.
SAML Validator Class
Type the name of the Java class that allows users to validate SAML assertions.
Subject Mapper Class
Define a Java class for your SAML content using TDV’s extended Java API Subject Mapper, which can be found in:
<TDV_install_dir>\apps\extension\docs\com\compositesw\extension\security\SubjectMapper.html
Use method samlSubjectToCompositeUser to map samlSubject to an existing TDV user, so that this SAML principal has the same privileges as that user.
After you create the Java class, save the JAR file to the <TDV_install_dir>\apps\server\lib folder.
Endpoint URL Path
The path of the endpoint URL for this Web service. Default is the name (with spaces removed) you used for the Web service.
WSDL URLs
Property heading.
HTTP/SOAP 1.1
Displays the HTTP SOAP 1.1 URL that can be used to access the operation.
HTTP/SOAP 1.2
Displays the HTTP SOAP 1.2 URL that can be used to access the operation.
HTTPS/SOAP 1.1
Displays the HTTPS SOAP 1.1 URL that can be used to access the operation.
HTTPS/SOAP 1.2
Displays the HTTPS SOAP 1.2 URL that can be used to access the operation.
13. From the upper part of the Operations portion of the screen, select a Web service view or procedure that is available for use.
This portion of the screen is automatically populated with the WSDL operations that were imported or defined in the WSDL definition set. If the definition set changes, you might need to save your Web service to see the latest list of WSDL operations. If you publish views or other procedures to the Contract First Web service, they should automatically appear in the Operations list.
14. To edit the Operations and Parameters portions of the screen, see the steps in Publishing a SOAP Data Service.
15. In the lower part of the Parameters portion of the screen, if you have chosen to define a concrete WSDL, you can view some additional properties and values of the chosen parameter.
Element Name and Message Name for concrete WSDLs can be viewed, but not edited, from this Studio editor.
16. Save your definition.