Error adding new profile using tnprofileaddProfile

I want to add a TN Profile List using flow tn.profile.addProfile

I have tried to create a document based on profile instance, but doesn´t work and receive the following error message:
com.wm.app.tn.err.EXMLException: <exmlexception>
<errorcode>TRNSERV.000012.000003</errorcode>
<info>Could not add partner profile for <null>.</info>
<originalexception>
<javaclass>java.lang.ClassCastException</javaclass>

Do anybody have idea how to fix this?

Evandro

To use that service, one must first create an object of class com.wm.app.tn.profile.Profile. You can do that by calling wm.tn.profile.create:newProfile or by using the Java API. Would suggest a thorough reading of all the profile services before venturing too far down this path. I assume also that there is a strong reason to create custom services (you risk messing up your TN DB) to do this rather than simply using TN Console.

Hi Evandro,
It works at my machine(Developer 6.1 + IS6.1)

  1. Create a new External ID using ‘wm.tn.profile.create:newExternalID’, set the IDType to ‘1’(which is DUNS) and ExternalID to the username that you want to be created.
  2. Create a new profile(wm.tn.profile.create:newProfile)
  3. Append the externalID to the new profile.
  4. In the new profile, set the profile/Corporate/Status=‘Active’;profile/Corporate/CorporationName=‘Your Corp Name’; profile/Corporate/Type=‘TNPartner’
  5. Use wm.tn.profile:addProfile to add the new profile into TN.

Tip: use wm.tn.profile:getUserProfile to see the values of the profile you created manually in TN.

– Yul

Yul,

Thank you for your help. I have follow your suggestions and it did work.

Rob Eamon,

I need to use this service to import a Company List profile from other Application and I don´t want to add one by one thru TN Console.

Evandro

That’s a good strong reason! Automation is a Good Thing!