Defining a custom SOAP service

  • 6 January 2021
  • 0 replies
  • 31 views

Badge +1

By default, SOAP services are based on the "USoft SOAP Default Provider" functional type that USoft ships with the Service Definer product. Alternatively, you may want to use a different USoft default provider, or you may prefer to create your own functional type.

If you use the "USoft SOAP Default Provider" functional type, you can use the "Generate from SQL" utility to have a first working version of the target code generated by USoft.

Defining a SOAP service of a non-predefined type

To define a SOAP service of a non-predefined type:

1. Choose Define, SOAP Services from the menu.

2. Insert a new "SOAP Services" record and set its Service Name value to mycustomservice.

3. If you want to use the ready-made USoft-shipped default for non-predefined services, click the lookup button at the Functional Type field and select 'USoft SOAP Default Provider'.    

Alternatively, if you want to use an existing Java class of your own, read the note at the end of this section.

4. Save work. Defaults are generated for Package and for Relative URI Path. Change these if appropriate.

5. Press the Check button on the right-hand side.

This causes the 'mycustomservice' SOAP Service to get the Correct = Yes setting.

To use an existing Java super class, base class or interface, declare that Java package by creating a record in table T_SVC_SUPER_CLASS. To do this, choose View, Objects from the menu, click on "SVC Super Classes" and fill out the form, taking USoft-shipped entries as an example. Enter a Functional Name as a unique handle for the code. Enter a Description and set Used for Class Type = SOAP Service. Save. You can now use the Functional Name when you select a functional type in Step 3.

Associating the custom SOAP service with a server

To associate your SOAP service with a server:

1. Choose Define, SOAP Services from the USoft Service Definer menu.

The "SOAP Services" window or tab appears.

2. Query the SOAP service that you want to expose.

3. When you have that SOAP service in view, click the Servers tab and specify the server where you want to publish the SOAP service, for example, the default server called 'Default'.

Get a list of available servers by pressing, in the Servers tab, the F12 key.

4. Save.

Associating the custom SOAP service with a connection

To associate the custom SOAP service with a connection:

  • 1.  In the "SOAP Services" window, for the SOAP service, click the Connections tab and specify the connection that you want the service to use.
  • 2.  Save.
  • Get a list of available connections by pressing, in the Connections tab, the F12 key.

(Re)publishing the custom SOAP service at the server

To (re)publish the custom SOAP service at the server:

  • 1.  Choose Define, Servers from the menu of the USoft Service Definer. The Servers window or tab appears.
  • 2.  Query the server where you want to (re)publish the SOAP service.
  • 3.  Stop the Server if it was running. Do this by choosing Actions, Stop from the menu, or by clicking the Stop icon on the icon ribbon.
  • 4.  (Re)publish the service(s) associated with the server. Do this by choosing Publish, Publish Services from the menu, or by clicking the Publish Services icon on the icon ribbon.
  • 5.  Start the Server. Do this by choosing Actions, Start from the menu or by clicking the Start icon in the icon ribbon.

You are now ready to create one or more methods for your custom SOAP service.

You can wrap Steps 3, 4 and 5 into one by choosing Publish, Publish and Restart from the menu or by clicking the "Publish and Restart" icon on the icon ribbon.


This topic has been closed for comments