webMethods 10.1 Use the Best REST Resource version

I want to know the best possible way to create Producer / Consumer (both) REST EndPoints on ESB webMethods Designer point of view.

In the applications I am using I do have both the versions of resources. (As per the attached document)

The challenges we are facing is:

  1. With Old REST Resource way, wanted to know if it is deprecated? The advantage with this is we get facility to change the “/rest/” to something else.

  2. If the REST Resources are created with v1, how it can be added into REST Descriptor? I am not clear how this can be done?

  3. If we use the REST Resource v2, we face a challenge to read the JSON and convert that directly into Document. In our code, we have developed that for all v2 resources, it reads JSON into bytes and then we convert that to stream and then to String and finally to document.
    how can we avoid these challenges if we use REST Resource v2?

Please some lights on these cases will really help our team to strategise the going forward development of WM IS
Resource Creation for future developments.
NewResourceCreation.png

Hi Mandar,

why not converting directly from bytes to String?

You will either find a matching service in WmPublic package or you should check the download section of the community for WmTransformation and/or PSUtilities package.

At least one of them has a service for direct conversion from bytes to string.

String to document conversion can be done with built in services from pub.xml-folder in WmPublic.

Regards,
Holger

I am still confused between REST Resource and REST v2 Resource. Which one is Ideal to use, or is it something that V2 has deprecated the previous one?

I tried to find more details about this through google, or on the forum as well.
But I was not able to find any information on this.