Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to vault file to Innovator v12 #11

Open
alaxala opened this issue Jul 24, 2019 · 3 comments
Open

Unable to vault file to Innovator v12 #11

alaxala opened this issue Jul 24, 2019 · 3 comments

Comments

@alaxala
Copy link

alaxala commented Jul 24, 2019

This code works with Innovator v11sp12, but not with v12

UploadCommand uCommand = connection.CreateUploadCommand(); uCommand.AddFile(arasFileItem.Id(), arasFileItem.LocalFile); connection.Apply(uCommand).AssertNoError();

With Innovator v12 I've got the exception with response 404 from Innovator inside it.

@alaxala
Copy link
Author

alaxala commented Jul 26, 2019

I think the problem is that TransactionalUploadCommand.Commit calls the inherited from UploadComand UploadAndApply. But this procedure uses the protocol and soap actions for previous versions of innovator.
If I comment out lines from 41 through 45 in TransactionalUploadComand.cs, i.e.

//if (_transactionId == null && !Files.Any(f => f.UploadPromise != null)) //{ // _lastPromise = UploadAndApply(async) //} //else
I can vault the file to Innovator v12.
Of course, this is not the solution, but I do not have enough knowledge about Innovator , and especially about Innovator.Client source to offer more.

@erdomke
Copy link
Owner

erdomke commented Jul 27, 2019

I'll have to do some more testing with that. In the meantime, if you use uCommand.UploadFile (instead of uCommand.AddFile), it definitely should work as I have been using that with a v12 instance.

@jrmleziva
Copy link

ArasLogin.zip
Hello, I met a similar issue with innovator.client version 2020.2.23.1756, against Aras 12 SP9. I followed the cookbook paragraph "Upload a file to the vault" and got the exception "Innovator.Client.HttpException: NotFound". The workaround is to use the method UploadFile but I was not able to do it in one step. I had to do it in 2 steps: 1. vault a file, 2. create a relationship Document File to the File. The code is uploaded. Please is there a better way how to do it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants