Automate MWS partner certificate update

In webMethods version : 10.7, I would like to update client certs for a TN partner profile in mws, I have some 100’s of partner profiles. Is there any way we can automate it. Like calling some wm built in service to add or delete or update TN partner certificate or any MWS API’s that can be invoked to perform add or delete or update TN partner certificate ?

Hi Sandeep,

please have a look at the TradingNetworks- Built-In-Services Reference.

You will find a folder wm.tn.security documented there which might be related to your use case.
The services are located under the WmTN package.

Regards,
Holger

1 Like

I have tried to build a service, that gets a (cer/p7b format) cert file from wM installation path and update the existing partner certficate.
Below is the flow and error I am receiving any thoughts what might be reason for the error?

image

0006.1169 Error encountered in wm.tn.security:updateCertificateData. java.lang.ClassCastException [Ljava.lang.Object; cannot be cast to [[B <![CDATA[java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [[B at wm.tn.security.updateCertificateData(security.java:2405) at sun.reflect.GeneratedMethodAccessor351.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:404) at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:759) at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:39) at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:53) at com.wm.app.b2b.server.inv...

Looking solely at the stacktrace, it looks like a data type compatibility issue. I would suggest you check the LOOP step i.e, the getFile and the utils:appendObjectList service .
Check the outputs are and check if it matches the type that the updateCertificateData is expecting.
-NP

Hi Sandeep,

which service is behind utils:appendObjectList?
I would prefer using services from the pub.list-folder in the WmPublic-package for this task.

Regards,
Holger

1 Like

Agree with @Holger_von_Thomsen , and from the error it does look like an Object Array is being sent to the tn updateCertificateData service when an array of byte arrays is being expected.

-NP

It worked using “Service wm.EDIINT.util.mime:bytesToBytesList”: