Create a web service

Complete these instructions to create a new Web Service.

Procedure

  1. Right-click the MV Web Service Provider on which to create the new Web Service from the MV Web Service Explorer and select the Create Web Service option.
    The Create a Web Service dialog box opens.
  2. Provide the appropriate values for each of the following parameters:
    Parameter Description
    Name Name to assign to the server connection you are creating.
    Endpoint URL Endpoint relative to the URL of the Web Service Provider on which this Web Service is being created.

    If the Host Name for the Web Service Provider is localhost, the base URL is http://localhost. The Endpoint URL is the part of the URL relative to the http://localhost portion of the URL. Since it is relative to the base URL, the http://localhost portion of the URL is omitted.

    For example, if you want the URL for the Web Service to be http://localhost:port/mywebservice, enter mywebservice in this text box (since it is a relative URL, the http://localhost:port/ portion of the URL is omitted).
    Important: Web Service URLs are case sensitive.
    Service Type Specifies the type of transfer service to use for sending messages and data to the Web Service.

    SOAP messages are sent using HTTP and are XML formatted. SOAP supports only the GET and POST HTTP methods.

    REST messages are also sent using HTTP but can be either XML or JSON formatted. REST supports the GET, POST, PUT and DELETE HTTP methods.
    HTTP Methods Adds the appropriate logic to the Web Service WSDL to allow access to the Web Service via GET, POST, PUT and DELETE calls. Note that for SOAP Service Types, only GET and POST are supported.

    As installed, the MVS server limits the size of incoming HTTP requests to less than 200,000 bytes. This includes SOAP and REST requests which are sent as HTTP POST request content. This limit can be increased by performing the following procedure:

    1. Stop the MVS service
    2. Open the Tlx.xml file (in the <MVS.install.dir>/server/ directory) for editing.
    3. Add the following text to the end of the text in the <ServiceArguments> element:
      -a "\-Dorg.mortbay.http.
      HttpRequest.maxFormContentSize=XXXXXX"

      where XXXXXX is the new maximum number of bytes allowed for incoming HTTP requests.

    4. Save the tlx.xml file and then restart the MVS service.
    User ID/Password Combination

    Select the User ID/Password Combination check box to apply User ID/Password security for managing access to execute the Web Service. To manage such access, see Creating and managing users. Note that if User ID/Password security is applied, the User ID and Password must be included in the header of the SOAP or REST request when executing the Web Service Operation or Resource.

    X.509

    Select the X.509 check box to apply X.509 certificate security for managing access to execute the Web Service. Note that if X.509 security is applied, the X.509 certificate must be included in the header of the SOAP or REST request when executing the Web Service Operation or Resource.

    WSDL Options

    Select the Embed imported contents check box to cause the web service WSDL document to embed the global schema contents instead of using an import statement. This option is provided for web service clients that do not handle importing external contents into the WSDL document.

    • If this option is selected, the WSDL document will embed the contents of tigwsdltypes.xsd file into the WSDL document schema section instead of using wsdl:import and xs:import statements.

    • If this option is not selected (default), the WSDL document will use wsdl:import and xs:import statements to import the tigwsdltypes.xsd file.

  3. Click Finish.
    A message opens asking whether you want to create a Web Service Operation or Resource for the new Web Service.
  4. Do one of the following:
    • Click Yes to create a new Web Service Operation or Resource.

      The Create a Web Service Operation dialog box opens. See Creating and managing web service operations and resources for information on creating Web Service Operations and Resources.

    • Click No to complete the Web Service creation without creating a new Web Service Operation or Resource.

      The Web Service is saved and the service name displays in the MV Web Service Explorer.

  5. To view the new Web Service or export the associated WSDL, see View and export a web service WSDL.
    Tip: A Web Service (including its Operations, Resources and Dynamic Arrays) can be copied to another Web Service Provider from the MV Web Service Explorer.
  6. To copy a Web Service to another Web Service Provider, do the following:
    1. Drag the Web Service from the current Web Service Provider to the new Web Service Provider.
    2. Respond to the system accordingly.