Showing results for 
Search instead for 
Do you mean 

NX-Teamcenter SOA connect without login

Hi guys.

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().discriminator);

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.


Re: NX-Teamcenter SOA connect without login

You may want to leverage attribute mappings instead of rolling your own solution. Check out export_attr_mappings and import_attr_mappings.

Randy Ellsworth, Teamcenter Architect, Applied CAx, LLC
NX 11.0.1.mp01 | SW 2016 | TcUA 11.2.3
Evaluating:AW 3.2

Re: NX-Teamcenter SOA connect without login

Thanks Randy,

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.

We only need to establish the connection between NX and Teamcenter correctly. Currently we need to introduce the user and password in the SOA application to perform the logging against TeamCenter. The objective is to set the logging without specifying the user and the user's password because NX is already connected to TeamCenter by SOA.

The rest of the application is running really good.

Thank you very much and greetings.



Re: NX-Teamcenter SOA connect without login

Maybe this will help:
pdmSession() method in NXOpen.Session

"PdmSession pdmSession()
throws RemoteException

Returns the PdmSession belonging to this session
Created in NX7.5.0 "

Re: NX-Teamcenter SOA connect without login

Hi, _bzuk_

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().connectstring);
SessionService service = SessionService.getService(NXsession.getConnection());
LoginResponse out = service.login( "TC_user", "TC_user_password", "", "", "",  theSession.pdmSession().getTcserverSettings().discriminator);


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.

Re: NX-Teamcenter SOA connect without login

Hi ralbero,
I'm not advanced user of SOA, but in future I will need to connect to TC from NX too, so I'm trying to understand this too.
What I see from examples is that if you have "theSession" object you can do anything you want and all will be saved under the same credentials that were used when this "theSession" started.
I hope somebody will clarify this.

Re: NX-Teamcenter SOA connect without login

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.

Re: NX-Teamcenter SOA connect without login

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.

And this:

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