How to Rename an Adapter Service's Input and Output

I am renaming an adapter service from A to B. But the input/output tab still shows B.

I have tried “setAdapterServiceNodeConnection” as suggested by some users in this forum, which is supposed to not only change connection alias but also the input/output name. But it does NOT work.

Any suggestions?

That’s the expected behavior of the service and it will not change the service input namespace. You might have to change it manually behind the scene (file system) but that is not recommended. You have to recreate the adapter service.

1 Like

Thanks for the reply. Yes, I don’t want to mess with the file system.

Re-create another adapter service is one option. It’s just my current adapter service has over 60 output fields that are manually typed in since I am using dynamic sql. (maybe there is an easier way here?)

If I re-create the adapter service with the correct name, I will have to do it all over again, which will be a great pain.

The renaming is just a little annoying for someone with OCD like me…

I am posting this just want to know if there is any way to rename it on the fly.

Thank you!

I understand, can you quickly check if refractor feature supports this in your webmethods version. More details on service development help guide.

I also was in such situation and I created a service that changes the input and output names. To do this, you have to decode the base64 encoded properties of the adapter, set the values as you wish and then encode the properties again and put them back into node.ndf. It’s not VERY simple, but is not very complicated either. Just carefully carry out all the actions and you’ll get a very useful tool.

1 Like

I am using webMethods developer 9.7 version. I don’t think it supports refractor on the fly.

You mean go to the “SVN Repository Exploring” perspective to modify the node?

Can you please elaborate a little more on this?

1.png

The adapter is stored in an .ndf file (on a central server or locally on your computer – that depends on your development model). The file is in a IData coder format, with some interesting parts stored as base64 encoded XMLCoder output (I don’t remebmer exact names). You should modify that file (write a service for this), and then reload the package with the adapter. This is a bit research work. Sorry, I can’t give you more details as I don’t have access to the code right now and I also don’t have permission from my firm to reveal any details (I’d have to ask).

Hi,

just a small outline:

get node.ndf file from FS as a String.
pub.xml:xmlStringToXmlNode
pub.xml:xmlNodeToDocument
pub.xml:queryXML (to retrieve the base64-coded element)
pub.string:base64Decode (decode the base64-coded String)
pub.xml:xmlStringToXmlNode (for the decoded String)
pub.xml:xmlNodeToDocument (for the decoded String)
… (Check for the field(s) to modified and modify them)
pub.xml:documentToXmlString
pub.string:base64Encode (encode the String)
MAP (map the encoded String back into the appropriate field)
pub.xml:documentToXmlString
pub.file:writeToFile (update node.ndf in FS)
Reload the Package.

See IS Built-In-Services Reference for further informations about the mentioned services.

I have used this approach to create a setAdapterServiceNodeConnection service before it made it into the WmART package.

Regards,
Holger

This should go as a feature request to SAG Brainstorm to support renaming of adapter services.

1 Like

Hi,

I agree with Mahesh.

Primarily this might work with adapter services, but not for notifications as this would mean to regenerate publishable documents, refreshing subscribing triggers etc.

Regards,
Holger