Generating classes from an .xsd file

Discussion in 'ASP .Net Web Services' started by Burak, Jun 29, 2004.

  1. Burak

    Burak Guest

    Hello,

    I am working on a VB.NET web service that will be used to send and
    receive job openings.

    I found a site called "hr-xml consortium"

    "The HR-XML Consortium is an independent, non-profit organization
    dedicated to the development and promotion of a standard suite of XML
    specifications to enable e-business and the automation of human
    resources-related data exchanges."

    I would like to use their xsd file

    http://ns.hr-xml.org/2_2/HR-XML-2_2/SEP/PositionOpening.xsd

    which specifies the formatting for job openings. This xsd file makes
    use of other xsd files on the site.

    How can I generate classes from this xsd file in vb.net? Once they
    are generated, I would then fill them with data and then send them to
    the client.

    Thank you,

    Burak
    Burak, Jun 29, 2004
    #1
    1. Advertising

  2. Burak

    Guest

    On 29 Jun 2004 08:20:34 -0700, (Burak)
    wrote:

    >Hello,
    >
    > I am working on a VB.NET web service that will be used to send and
    >receive job openings.
    >
    > I found a site called "hr-xml consortium"
    >
    >"The HR-XML Consortium is an independent, non-profit organization
    >dedicated to the development and promotion of a standard suite of XML
    >specifications to enable e-business and the automation of human
    >resources-related data exchanges."
    >
    > I would like to use their xsd file
    >
    >http://ns.hr-xml.org/2_2/HR-XML-2_2/SEP/PositionOpening.xsd
    >
    >which specifies the formatting for job openings. This xsd file makes
    >use of other xsd files on the site.
    >
    > How can I generate classes from this xsd file in vb.net? Once they
    >are generated, I would then fill them with data and then send them to
    >the client.
    >
    >Thank you,
    >
    >Burak


    hello

    in vs 2003

    try adding the xsd object to your project.
    right click in the xsd designer and select "generate dataset"

    once you have generated the dataset you will have these classes
    available to your program.

    research the XmlDataDocument.

    -Adam
    , Jun 29, 2004
    #2
    1. Advertising

  3. Burak

    JH Guest

    http://msdn.microsoft.com/library/d...s/html/cpconxmlschemadefinitiontoolxsdexe.asp

    "Burak" <> wrote in message
    news:...
    > Hello,
    >
    > I am working on a VB.NET web service that will be used to send and
    > receive job openings.
    >
    > I found a site called "hr-xml consortium"
    >
    > "The HR-XML Consortium is an independent, non-profit organization
    > dedicated to the development and promotion of a standard suite of XML
    > specifications to enable e-business and the automation of human
    > resources-related data exchanges."
    >
    > I would like to use their xsd file
    >
    > http://ns.hr-xml.org/2_2/HR-XML-2_2/SEP/PositionOpening.xsd
    >
    > which specifies the formatting for job openings. This xsd file makes
    > use of other xsd files on the site.
    >
    > How can I generate classes from this xsd file in vb.net? Once they
    > are generated, I would then fill them with data and then send them to
    > the client.
    >
    > Thank you,
    >
    > Burak
    JH, Jun 29, 2004
    #3
  4. Burak

    Burak Gunay Guest

    Hello Adam,

    I did what you wrote and it came back with ther following error

    "DataSet doesn't support 'union' or 'list' as simpleType."

    Do you know how to fix this?

    Thanks,

    Burak

    *** Sent via Devdex http://www.devdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Burak Gunay, Jun 29, 2004
    #4
  5. Burak

    Guest

    On Tue, 29 Jun 2004 11:37:01 -0700, Burak Gunay
    <> wrote:

    >
    >
    > Hello Adam,
    >
    > I did what you wrote and it came back with ther following error
    >
    >"DataSet doesn't support 'union' or 'list' as simpleType."
    >


    modify the xsd file so that it is supported by the dataset. Other
    than that, i'm not sure. We need to call in an expert for that one.

    -Adam
    , Jun 29, 2004
    #5
  6. Burak

    JH Guest

    I have (about 8 months ago) talked with Paul Kiel (HR-XML) regarding
    converting HR-XML XSDs to CSharp classes (using the xsd utility provided in
    my other response to this thread). At the time I was the first to do this
    with the Resume2 xsd of theirs. He may have followed the instructions I
    provided back then to do the same for some of the other XSDs they have (I
    only needed the resume class so I didn't bother with any of the other ones).
    You may wish to inquire to find out. If he has, I am certain he'd gladly
    pass the information along.

    HTH,
    JH

    <> wrote in message
    news:...
    > On Tue, 29 Jun 2004 11:37:01 -0700, Burak Gunay
    > <> wrote:
    >
    > >
    > >
    > > Hello Adam,
    > >
    > > I did what you wrote and it came back with ther following error
    > >
    > >"DataSet doesn't support 'union' or 'list' as simpleType."
    > >

    >
    > modify the xsd file so that it is supported by the dataset. Other
    > than that, i'm not sure. We need to call in an expert for that one.
    >
    > -Adam
    JH, Jun 29, 2004
    #6
  7. Burak

    Burak Gunay Guest

    Hello,

    I cleaned up the xsd file and ran xsd.exe on it and it produced the
    class file.

    Paul Kiel suggested that I use "XSDObjectGen" by microsoft instead of
    xsd.exe.

    Thanks,

    Burak


    *** Sent via Devdex http://www.devdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Burak Gunay, Jun 29, 2004
    #7
  8. Burak

    Burak Gunay Guest

    Hello JH,

    I ran XSDObjectGen on the PositionOpening.xsd and
    it performed better than xsd.exe but still there are some classes
    missing and conflicts between classes and enums.

    The code won't compile. :(

    Is there a complete vb.net class library version of PositionOpening that
    compiles without any problems?

    Thank you,

    Burak


    *** Sent via Devdex http://www.devdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Burak Gunay, Jul 1, 2004
    #8
  9. Burak

    Burak Guest

    Hi Jason,

    "JH" <> wrote in message news:<bhjEc.52820$HS3.6245@edtnps84>...
    > I have (about 8 months ago) talked with Paul Kiel (HR-XML) regarding
    > converting HR-XML XSDs to CSharp classes (using the xsd utility provided in
    > my other response to this thread). At the time I was the first to do this
    > with the Resume2 xsd of theirs. He may have followed the instructions I
    > provided back then to do the same for some of the other XSDs they have (I
    > only needed the resume class so I didn't bother with any of the other ones).


    Were you able to convert the resume xsd to vb.net classes? It was
    giving me problems so I jettisoned some classes ( a trick that worked
    for job posting xsd ).

    It compiled fine but when I tried to call it from the server it always
    came up with weird dll errors.

    Do you have a clean vb.net class version of the hr-xml resume xsd, one
    without any glitches?

    Thank you,

    Burak
    Burak, Jul 14, 2004
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus
    Replies:
    1
    Views:
    1,080
    Markus
    Nov 22, 2005
  2. Replies:
    1
    Views:
    846
    Martin Honnen
    Jan 14, 2004
  3. Kees de Winter

    Generating proper classes with XSD.exe

    Kees de Winter, Feb 2, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    537
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Feb 2, 2007
  4. Andy
    Replies:
    0
    Views:
    266
  5. Hans Sjunnesson

    Generating javascript classes from XSD schema

    Hans Sjunnesson, May 8, 2007, in forum: Javascript
    Replies:
    0
    Views:
    87
    Hans Sjunnesson
    May 8, 2007
Loading...

Share This Page