cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1642
Views
0
Helpful
1
Replies

Web Services Authentication Error - AUTH_0005

Authentication via the AuthenticationService is successful, returning a  valid Session ID.  Authentication via passing an AuthenticationToken in  the SOAP Header fails with an error of AUTH_0005 The user name header is  invalid ....

We are calling newScale web  services from an external application.  Making a call to the  AuthenticationService using this SOAP request is successful:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aut="http://authentication.api.newscale.com">
    <soapenv:Header/>
    <soapenv:Body>
       <aut:authenticate>
          <aut:userName>username</aut:userName>
          <aut:password>password</aut:password>
       </aut:authenticate>
    </soapenv:Body>
</soapenv:Envelope>

The return data is:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soap:Header>
       <AuthenticationToken>
          <Username>username</Username>
          <SessionId>1FD9023262278342CACF63D0D6C5A8F2</SessionId>
       </AuthenticationToken>
    </soap:Header>
    <soap:Body>
       <ns1:authenticateResponse xmlns:ns1="http://authentication.api.newscale.com">
          <ns1:personInfo>
             <active xmlns="http://authentication.api.newscale.com">false</active>
             <email xmlns="http://authentication.api.newscale.com">fakeuser@hotmail.com</email>
             <employeeCode xsi:nil="true" xmlns="http://authentication.api.newscale.com"/>
             <firstName xmlns="http://authentication.api.newscale.com">user</firstName>
             <homeOrganizationalUnitName xsi:nil="true" xmlns="http://authentication.api.newscale.com"/>
             <lastName xmlns="http://authentication.api.newscale.com">name</lastName>
             <localeName xsi:nil="true" xmlns="http://authentication.api.newscale.com"/>
             <login xmlns="http://authentication.api.newscale.com">username</login>
             <managerEmail xsi:nil="true" xmlns="http://authentication.api.newscale.com"/>
             <managerName xsi:nil="true" xmlns="http://authentication.api.newscale.com"/>
             <managerPhone xsi:nil="true" xmlns="http://authentication.api.newscale.com"/>
             <placeName xsi:nil="true" xmlns="http://authentication.api.newscale.com"/>
             <status xmlns="http://authentication.api.newscale.com">0</status>
             <timeZoneName xsi:nil="true" xmlns="http://authentication.api.newscale.com"/>
             <title xsi:nil="true" xmlns="http://authentication.api.newscale.com"/>
          </ns1:personInfo>
       </ns1:authenticateResponse>
    </soap:Body>
</soap:Envelope>

However,  when we pass credentials in an AuthenticationToken when accessing any  of the other services, we get an error.  For example:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:req="http://requisition.api.newscale.com">
    <soapenv:Header>
       <req:AuthenticationToken>
          <req:Username>username</req:Username>
          <req:Password>password</req:Password>
       </req:AuthenticationToken>
    </soapenv:Header>
    <soapenv:Body>
       <req:getServiceDefinition>
          <req:initiatorLoginName>username</req:initiatorLoginName>
          <req:customerLoginName>username</req:customerLoginName>
          <req:serviceName>VMSpinup</req:serviceName>
       </req:getServiceDefinition>
    </soapenv:Body>
</soapenv:Envelope>

Yields this error:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soap:Body>
       <soap:Fault>
          <faultcode>soap:Server</faultcode>
          <faultstring>The user name header is invalid. It is  either not present or empty!. Please send a valid  header.</faultstring>
          <detail>
             <RequisitionFault xmlns="http://requisition.api.newscale.com">
                <errorCode>AUTH_0005</errorCode>
                <errorMessage>The user name header is invalid. It  is either not present or empty!. Please send a valid  header.</errorMessage>
             </RequisitionFault>
          </detail>
       </soap:Fault>
    </soap:Body>
</soap:Envelope>

Unfortunately,  I cannot find any details on the meaning of this error or what its  cause is.  There appears to be a valud SOAP header.  Is it talking about  the HTTP header instead?

Thanks.

1 Reply 1

Emir AmEx (9.1)
Level 1
Level 1

I posted this same question here on the form, bottom line this does not work. You need to pass in the username and password each time

https://supportforums.cisco.com/message/3492955#3492955

Review Cisco Networking for a $25 gift card