cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

NoCredentialsException while calling web service method

hdeutschmann
1-Visitor

NoCredentialsException while calling web service method

I'm trying to fetch data from Integrity via web services. To get a better picture of the data (), I use SoapUI to call the web services.

However, every method I call fails with NoCredentialsException as answer. I have the needed rights on the project, my request envelope for a call of "getSubprojectList" looks like this one:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sour="http://webservice.mks.com/2009/7/Source" xmlns:sch="http://webservice.mks.com/2009/7/Source/schema">

<soapenv:Header/>

<soapenv:Body>

<sour:getSubprojectList>

<!--Optional:-->

<arg0 transactionId="">

<sch:Username>user1</sch:Username>

<sch:Password>xxx</sch:Password>

<!--Optional:-->

<sch:ImpersonatedUser>user1</sch:ImpersonatedUser>

<sch:Project>/repository/test.pj</sch:Project>

</arg0>

</sour:getSubprojectList>

</soapenv:Body>

</soapenv:Envelope>

Here is the complete response soap envelope:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">

<env:Header/>

<env:Body>

<env:Fault>

<faultcode>env:Server</faultcode>

<faultstring>Unable to get subprojects of "/repository/test.pj".</faultstring>

<detail>

<ns1:MKSException class="com.mks.api.response.NoCredentialsException" implication="Unable to get subprojects of &quot;/repository/test.pj&quot;." xmlns:ns1="http://webservice.mks.com/2009/7/Source/fault">Authentication failed for user1 on mks1:9001</ns1:MKSException>

</detail>

</env:Fault>

</env:Body>

</env:Envelope>

Anyone has a hint, what am I missing ?

Thanks in advance, Hendrik

ACCEPTED SOLUTION

Accepted Solutions

Ah then it is very likely login permissions on the Integrity Server itself. Check with your Integrity administrator to make sure you have the appropriate access and if that all seems good, open a case with PTC Integrity Support to take a closer look at the configuration.

View solution in original post

6 REPLIES 6

Hi Hendrik,

IMHO the problem might be the impersonation:

...

<sch:ImpersonatedUser>user1</sch:ImpersonatedUser>

...

Please check whether "user1" has the admin permission to impersonate other users.

As far as I know, he cannot impersonate himself.

Maybe you just remove this (optional) Element from your request.

HTH Matthias

Leaving this element blank or even leaving it out of the request does not affect the response unfortunately

I'm pretty sure, that this behaviour has something to do with the rights management. I found out that my colleagues can use the web service without any problems.

Are there any settings which could lead to that behaviour ??

Thanks in advance

PS. Thanks for your reply, any help is appreciated

Hello Hendrik, what is the endpoint WSDL URL you are using with SoapUI? The "mks1" hostname and port 9001 are just examples given for web services and you must use your own Integrity Server. In SoapUI you can check this info in the Request Properties section as in the below screenshot:

SoaupUI+Connection.png

Server name and port are different, I altered it to post it here. There is no problem with them, since my colleagues get valid answers. I checked the http answers even with Wireshark. The server responds, but just says I'm not authorized

Thanks for your answer

Ah then it is very likely login permissions on the Integrity Server itself. Check with your Integrity administrator to make sure you have the appropriate access and if that all seems good, open a case with PTC Integrity Support to take a closer look at the configuration.

Hello Hendrik,

Were you able to confirm Joe's evaluation that the problem here is due to login permissions? If so, please select Joe's response as Correct Answer: if future users search the forum for something similar, seeing it marked as answered might help speed up resolving their problem.

Regards,

Kael


Kind Regards,
Kael Lizak

Senior Technical Support Engineer
PTC Integrity Lifecycle Manager
Announcements


Top Tags