API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

E-conomic Java Jar | connectwithtoken | cannot connect without appSecretToken



I am attempting to run the java soap api example at: https://github.com/e-conomic/eco-api-ex/tree/master/examples/java

The following code works, and the connection is successful as indicated by log "connection successful".

try {    
} catch (Exception e) {
    System.out.println("Connection error! \n" + e);
System.out.println("Connection successful!");

But when i try to run any other operation after this, for example orderGetAll(), or verifyXEconomicAppIdentifier(), I get the following error:

javax.xml.ws.soap.SOAPFaultException: Economic.Api.Exceptions.AuthenticationException(E02250): Cannot connect without appSecretToken. (id=c3121498-ae76-47e0-9aa3-ddc52aea507f)

I have already passed the app secret token to the connect with token method.

Can someone let me know what I am doing wrong?


created Aug 30, 2016 by sagar
0% Accept Rate
Q 1 A 0 C 0

1 Answer

Do you get this when calling ANY method or just the Verify method?
Could you please check if this could be a bug in Verify as token connect nullifies the need for the verify method.

Please also try commenting out your X-EconomicAppIdentifier header as this isn't necessary either when using tokens. We sometimes see Java SOAP frameworks not being able to properly handle both including a cookie AND setting a custom header out of the box.
answered Aug 30, 2016 by olej
Visma e-conomic A/S