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

Failed to access the metadata document! #61

Open
karim-devdotnet opened this issue Jun 8, 2021 · 6 comments
Open

Failed to access the metadata document! #61

karim-devdotnet opened this issue Jun 8, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@karim-devdotnet
Copy link

i got this error when i was tried to connect SAP OData Service Metadata link:

Failed to access the metadata document. The OData service requires authentication for accessing it. Please download the metadata, store it into a local file, and set the value of “MetadataDocumentUri” in the .odata.config file to the file path. After that, run custom tool again to generate the OData Client code.

Screenshots

image

image

@karim-devdotnet karim-devdotnet added the bug Something isn't working label Jun 8, 2021
@unchase
Copy link
Owner

unchase commented Jun 8, 2021

Hi, @karimabd84

Can you save the metadata from the Url to xml-file and try to generate code with it?

@karim-devdotnet
Copy link
Author

Hi @unchase ,
I did it!
but that's the same problem.

@unchase
Copy link
Owner

unchase commented Jun 8, 2021

Did you try to generate code from xml-file without credentials?

@karim-devdotnet
Copy link
Author

Same error!
Step1:
image

Step 2:
image

@karim-devdotnet
Copy link
Author

Did you try to generate code from xml-file without credentials?

I generated the metadata in xml file and i tried to generate the proxy from the xml file but it's not possible without credentials.
Can you help me?

@karim-devdotnet
Copy link
Author

Hi @unchase,
i found the problem!
There is an error in the plugin:

  1. open the file Unchase.OData.ConnectedService.Templates
  2. go to method GetEdmxStreamFromUri
  3. the HttpWebRequest, that you created, ist without credentials.
  4. That's the problem bescause my OData Service needs every time credentials (from a xml file or drect from the url).
  5. When can you create a new release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants