Topic
7 replies Latest Post - ‏2013-01-28T12:43:01Z by DavidSeager
SystemAdmin
SystemAdmin
141 Posts
ACCEPTED ANSWER

Pinned topic Rest service registration

‏2013-01-15T05:09:49Z |
I found this tutorial for REST service registration and governance -
http://pic.dhe.ibm.com/infocenter/sr/v8r0/index.jsp?topic=%2Fcom.ibm.sr.doc%2Ftutorial_gep_rest.html

However, it is a sample and does not describes details about why which value is put in different fields like while creating end point -
In the Name field, enter http://CSStagingHost:9081/services/catalog/.
Why we need to provide url in name field? is it the endpoint url?

Thanks
  • KS
Updated on 2013-01-28T12:43:01Z at 2013-01-28T12:43:01Z by DavidSeager
  • MarkSTaylor
    MarkSTaylor
    15 Posts
    ACCEPTED ANSWER

    Re: Rest service registration

    ‏2013-01-15T14:59:19Z  in response to SystemAdmin
    Hi!

    You do not need to provide a URL in the name field. This field is to allow you to give a name of your choice to the object in WSRR. In the example you mention, the author has decided to make the name of the endpoint object the same as the endpoint base URL, but you could enter any name you like.

    Regards,
    Mark
    • SystemAdmin
      SystemAdmin
      141 Posts
      ACCEPTED ANSWER

      Re: Rest service registration

      ‏2013-01-15T16:01:44Z  in response to MarkSTaylor
      Thanks Mark for the reply,

      Can you please suggest me use of Base URL in case of REST, for example if I have 1 service with different methods available within it, say http://ip:port/services/rest/print/ and different urls are available -

      1.) http://ip:port/services/rest/print/card
      2.) http://ip:port/services/rest/print/notification/{id}/
      ...

      What I am following is to provide http://ip:port/services/rest/print/ as Base url and only this service is registered in WSRR, other relative urls information is provided in document using RESTServiceInterface. Is this correct way to do this or should we register different (specific endpoints #1, #2 mentioned above). We will be integrating this with IBM data power (which is yet to be configured), which approach could cause issue while integrating with Data power?

      Thanks,
      -KS
      • MarkSTaylor
        MarkSTaylor
        15 Posts
        ACCEPTED ANSWER

        Re: Rest service registration

        ‏2013-01-17T17:04:28Z  in response to SystemAdmin
        The value you suggest for the Base URL does make sense. However, can you please clarify how you will be consuming this information, because as far as I am aware, DataPower cannot currently make use of the metadata on a REST Service Endpoint entity in WSRR.

        Kind regards,
        Mark
        • SystemAdmin
          SystemAdmin
          141 Posts
          ACCEPTED ANSWER

          Re: Rest service registration

          ‏2013-01-19T18:21:12Z  in response to MarkSTaylor
          I am not sure how I will be doing that, we will be having some data power experts in next few days .. I will tell you when I know.

          Thanks
          -KS
          • sameera06
            sameera06
            2 Posts
            ACCEPTED ANSWER

            Re: Rest service registration

            ‏2013-01-24T21:23:27Z  in response to SystemAdmin
            From the available documentation on REST service governance, it looks like the value and functionality in comparison to wsdl service governance is very limited to static information about the REST service, consumers. This may be due to the absence of metadata in a REST service.
      • DavidSeager
        DavidSeager
        50 Posts
        ACCEPTED ANSWER

        Re: Rest service registration

        ‏2013-01-28T12:43:01Z  in response to SystemAdmin
        The base URL suggested makes sense. The idea of the Base URL is that, REST services are generally provided by a servlet or some other sort of URL addressed service. As such, there is always a URL where all the REST methods will hang off.

        In the case of the WSRR REST interface itself, this URL is:

        http://<WSRR Server>:<port>/WSRR/

        As you say, the interface documentation would then describe that you can append various things to this base URL to specify the method. For example in WSRR you first add /8.0/ to set the version, then a verb like /XML/Metadata/bsrUri to get the metadata on the object with bsrURI of "bsrUri", in XML format. For WSRR the interface documentation is generally what is in the Infocenter to describe how to use the REST API.

        The extent of the REST modeling is simpler than that for WSDL, we do not have any document to shred into logical objects and correlated objects like WSDL (WSRR does not do WADL shredding), therefore things must be registered manually.

        Still there is the RESTService which allows you to push a Service Version through its life cycle, and model REST service consumer and providers and the contracts between them.
  • SystemAdmin
    SystemAdmin
    141 Posts
    ACCEPTED ANSWER

    Re: Rest service registration

    ‏2013-01-26T03:39:15Z  in response to SystemAdmin
    You can always upload a wadl document in place of the wsdl document.