0

Do the XML Namespaces require authentication?

Hello,

I am trying to generate .NET classes based on the downloaded XML from a fantasy football query.

Basically, I have succesfully completed a query for my league settings and returned it in XML. I then saved that xml locally and generated an xsd file from it. When I try to generate classes from it, I get an error stating "uri attribute is missing."

I believe this issue is because the generator is attempting to access the namespace references from the XML file: http://fantasysports.yahooapis.com/fantasy/v2/base.rng

When I try to browse to this url, I get an error because I have not authenticated through OAuth. Why would I have to authenticate just to browse an xml namespace like this? Could this be contributing to my problem?

by
3 Replies
  • QUOTE (Stu @ Jul 1 2010, 08:45 AM) <{POST_SNAPBACK}>
    Hello,

    I am trying to generate .NET classes based on the downloaded XML from a fantasy football query.

    Basically, I have succesfully completed a query for my league settings and returned it in XML. I then saved that xml locally and generated an xsd file from it. When I try to generate classes from it, I get an error stating "uri attribute is missing."

    I believe this issue is because the generator is attempting to access the namespace references from the XML file: http://fantasysports.yahooapis.com/fantasy/v2/base.rng

    When I try to browse to this url, I get an error because I have not authenticated through OAuth. Why would I have to authenticate just to browse an xml namespace like this? Could this be contributing to my problem?

    Oh, we'll need to do something about that.... In the meantime, are you able to access the .rng schema files after authenticating? If you then save them locally, are you able to generate your .NET classes? And what are you using to generate them?
    0
  • QUOTE (Shane K @ Jul 1 2010, 05:47 PM) <{POST_SNAPBACK}>
    Oh, we'll need to do something about that.... In the meantime, are you able to access the .rng schema files after authenticating? If you then save them locally, are you able to generate your .NET classes? And what are you using to generate them?


    I am able to access the .rng schema files after authenticating. I tried to save them locally and then change my namespace to point to the local files. I had some success but ultimately could not get it to work so I have given up this idea for now.

    I am using the XSD.exe tool that I believe comes installed with Visual Studio. It is a command-line tool.
    0
  • QUOTE (Stu @ Jul 1 2010, 05:57 PM) <{POST_SNAPBACK}>
    I am able to access the .rng schema files after authenticating. I tried to save them locally and then change my namespace to point to the local files. I had some success but ultimately could not get it to work so I have given up this idea for now.

    I am using the XSD.exe tool that I believe comes installed with Visual Studio. It is a command-line tool.

    What kind of errors were you getting? Maybe I (and others in this forum) can help you figure it out.
    0

Recent Posts

in Fantasy Sports API