I want to make changes on a TC Form from NX.
I open NX from TC, so now I have NX connected to TC through SOA.
I need my NX SOA application to connect to the same session of TC, using the same credentials (username, password) to use to obtain accreditation in TC.
But I can not find how to connect directly to the TC session without using a login.
The code I use to access the TC session from NX using Java SOA API implementation:
PdmSession TCsession = theSession.pdmSession (); NXsession = new AppXSession (TCsession.getTcserverSettings().connectstring); User user = NXsession.login ("user", "password", "", "", "", theSession.pdmSession().getTcserverSettings().disc
I want to avoid the last step login and NX connects to the same session TC already has established.
Is it possible to obtain this credentials from the NX App theSession class member?
Thanks and regards.
You may want to leverage attribute mappings instead of rolling your own solution. Check out export_attr_mappings and import_attr_mappings.
NX 11.0.1.mp01 | SW 2016 | TcUA 11.2.3
We have reason to not map those attributtes, for instance, we have about 20 attributtes mapped, and we have had to create an inteface to fill them because the NX interface is not very user friendly.
The form, we want to work with, has over 200 attributtes (properties) and we don't want to create it for all the items we work in NX so we think is not necessary map all these attributes.
So that is the reason because we are working with Java SOA API. With our SOA application we have gained access to the properties of theTeamcenter form and can display them and modify them from NX.
I have tried to obtain the credentials of the pdmSession but I have not been able to get them.
In my code the first thing I do is to get the pdmSession from theSession parameter. From this PdmSession I get the connect string (url of the PDM server) and the discriminator of the current PDM session, but I don't see the way to get the user's credentials to perform the login to TeamCenter.
My code is this:
PdmSession TCsession = theSession.pdmSession(); NXsession = new AppXSession(TCsession.getTcserverSettings().connec
tstring); SessionService service = SessionService.getService(NXsession.getConnection( )); LoginResponse out = service.login( "TC_user", "TC_user_password", "", "", "", theSession.pdmSession().getTcserverSettings().disc riminator);
Of course, "TC_user" and "TC_user_password" must be replaced by the credentials of the user that we want to login in TeamCenter.
Thank I so much.
Hello again, _bzuk_
Like you, I am not an advanced user of SOA. In fact, this is my first program based on SOA.
So I think my lack of knowledge of SOA is the cause of my failure to get NX connect with TeamCenter without login.
I hope someone gives us a clue.
Thanks for your help and greetings.
Hi there, guys!
I have researched in the OpenNX java API and all I have found concerning the credentials of Teamcenter is this within the Session object (theSession in the Sample programs):
Returns the connect string and discriminator used by NX session to connect to the Tcserver.
Returns the SSO credentials, if SSO is available The client applications can use these settings to connect to the same Tcserver that NX is using.
I have not an SSO Server, so I can not auto login to TeamCenter without this?
How Teamcenter launches NX without logging in a second time without an SSO server?
Thank I so much