Unchase.Odata.Connectedservice icon indicating copy to clipboard operation
Unchase.Odata.Connectedservice copied to clipboard

Failed to access the metadata document!

Open karim-devdotnet opened this issue 4 years ago • 6 comments

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 avatar Jun 08 '21 10:06 karim-devdotnet

Hi, @karimabd84

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

unchase avatar Jun 08 '21 10:06 unchase

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

karim-devdotnet avatar Jun 08 '21 11:06 karim-devdotnet

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

unchase avatar Jun 08 '21 12:06 unchase

Same error! Step1: image

Step 2: image

karim-devdotnet avatar Jun 08 '21 12:06 karim-devdotnet

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 avatar Jun 09 '21 08:06 karim-devdotnet

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?

karim-devdotnet avatar Jun 09 '21 10:06 karim-devdotnet