AnsweredAssumed Answered

Authentication problems using webservices with VBA

Question asked by voliveira on May 23, 2014
Latest reply on Oct 16, 2014 by AlistairMiller

Hello Folks, hope everyone is fine.

We are developing a solution to migrate transactions, products and some other data into Clarity using a Excel Spreadsheet with VBA code.

I am trying to do some tests in order to make sure I create all the methods (connecting, desconnecting and requesting). While I was able to login in the environments using my credentials and get the SessionID through SOAP, I had problems when requesting instances of the Vendor object.

Using this input:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">

          <soapenv:Header>
                <xog:Auth><xog:SessionID>762621__CF669159-B1C6-4C59-A0D0-F1BEBA2D19D</xog:SessionID></xog:Auth>
          </soapenv:Header>
          <soapenv:Body>
                <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_notification.xsd">
                          <Header version="13.0" action="read" objectType="vendor" externalSource="NIKU"/><Query><Filter name="code" criteria="EQUALS">vendor1</Filter></Query>
                 </NikuDataBus>
            </soapenv:Body>
</soapenv:Envelope>
I receive this output:
<soapenv:Body>
    <XOGOutput xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/status.xsd">
      <Status elapsedTime="0.0 seconds" state="FAILURE"/>
      <Statistics failureRecords="0" insertedRecords="0" totalNumberOfRecords="0" updatedRecords="0"/>
      <ErrorInformation>
        <Severity>FATAL</Severity>
        <Description>Not authenticated</Description>
        <Exception/>
      </ErrorInformation>
    </XOGOutput>
  </soapenv:Body>
Strange is that I receive the session ID without any problem, but when I try to use this sessionID it seems that the environment dont authenticate me.
Another fact is that when I try to logout using the sessionID that I previously got I receive this message:
  <soapenv:Header/>
  <soapenv:Body/>
</soapenv:Envelope>
Would someone have any idea why this is happening?
Thanks,
Vitor.

Outcomes