Skip to main content
1-Visitor
April 3, 2014
Solved

NoCredentialsException while calling web service method

  • April 3, 2014
  • 2 replies
  • 3400 views

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

    Best answer by JoeBartlett

    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.

    2 replies

    16-Pearl
    April 4, 2014

    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

    1-Visitor
    April 4, 2014

    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

    21-Topaz I
    April 4, 2014

    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

    1-Visitor
    April 5, 2014

    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

    21-Topaz I
    April 7, 2014

    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.