wsdl errors for multiple webservices with reference to same dataset

Discussion in 'ASP .Net Web Services' started by wc_chan, Nov 15, 2006.

  1. wc_chan

    wc_chan Guest

    I wrote a web service projects having 2 asmx and 1 dataset, says dsTest1.
    The amsx will have a parameter of the dataset as follows:

    in 1st asmx:
    <Wethod()> HelloWorld1 (byval a1 as dsTest1) as string

    in 2nd asmx:
    <Wethod()> HelloWorld2 (byval a2 as dsTest1) as string

    When I ran wsdl for the dynamic discovery file, vsdisco, I got the following
    error:

    Microsoft (R) Web Services Description Language Utility
    [Microsoft (R) .NET Framework, Version 2.0.50727.42]
    Copyright (C) Microsoft Corporation. All rights reserved.
    Schema validation error: Schema with
    targetNamespace='http://tempuri.org/dsTest1.xsd' has invalid syntax. The
    global element 'http://tempuri.org/dsTest1.xsd:dsTest1' has already been
    declared. Line 3, position 4.
    Schema validation error: Schema with
    targetNamespace='http://tempuri.org/dsTest1.xsd' has invalid syntax. The
    identity constraint 'http://tempuri.org/dsTest1.xsd:TestTableKey1' has
    already been declared. Line 16, position 6.
    Warning: Schema could not be validated. Class generation may fail or may
    produce incorrect results.
    Writing file 'D:\Program Files\Microsoft Visual Studio
    8\SDK\v2.0\Service.vb'.

    There's no problem when I did wsdl for only particular asmx. It seems that
    wsdl processes twice for the dataset. Note: There's no problem for dotnet
    framework 1.1. The problem becomes hurdle of our migration project.

    Please kindly help.
    Thanks in advance.
     
    wc_chan, Nov 15, 2006
    #1
    1. Advertising

  2. RE: wsdl errors for multiple webservices with reference to same datase

    A common practice when using the same data structures in WS is to create
    custom WSDL files that import a common schema file (XSD) where you define
    your types. You can then import the types in your client application w/o
    issues.

    Regards,
    Catalin Tomescu



    "wc_chan" wrote:

    > I wrote a web service projects having 2 asmx and 1 dataset, says dsTest1.
    > The amsx will have a parameter of the dataset as follows:
    >
    > in 1st asmx:
    > <Wethod()> HelloWorld1 (byval a1 as dsTest1) as string
    >
    > in 2nd asmx:
    > <Wethod()> HelloWorld2 (byval a2 as dsTest1) as string
    >
    > When I ran wsdl for the dynamic discovery file, vsdisco, I got the following
    > error:
    >
    > Microsoft (R) Web Services Description Language Utility
    > [Microsoft (R) .NET Framework, Version 2.0.50727.42]
    > Copyright (C) Microsoft Corporation. All rights reserved.
    > Schema validation error: Schema with
    > targetNamespace='http://tempuri.org/dsTest1.xsd' has invalid syntax. The
    > global element 'http://tempuri.org/dsTest1.xsd:dsTest1' has already been
    > declared. Line 3, position 4.
    > Schema validation error: Schema with
    > targetNamespace='http://tempuri.org/dsTest1.xsd' has invalid syntax. The
    > identity constraint 'http://tempuri.org/dsTest1.xsd:TestTableKey1' has
    > already been declared. Line 16, position 6.
    > Warning: Schema could not be validated. Class generation may fail or may
    > produce incorrect results.
    > Writing file 'D:\Program Files\Microsoft Visual Studio
    > 8\SDK\v2.0\Service.vb'.
    >
    > There's no problem when I did wsdl for only particular asmx. It seems that
    > wsdl processes twice for the dataset. Note: There's no problem for dotnet
    > framework 1.1. The problem becomes hurdle of our migration project.
    >
    > Please kindly help.
    > Thanks in advance.
    >
    >
    >
    >
     
    Catalin Tomescu, Dec 7, 2006
    #2
    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. Mark Goldin

    Errors, errors, errors

    Mark Goldin, Jan 17, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    1,028
    Mark Goldin
    Jan 17, 2004
  2. Dark
    Replies:
    1
    Views:
    4,678
    milfar
    Nov 14, 2008
  3. Replies:
    0
    Views:
    652
  4. wc_chan
    Replies:
    1
    Views:
    700
    =?Utf-8?B?Q2F0YWxpbiBUb21lc2N1?=
    Dec 7, 2006
  5. Pif
    Replies:
    3
    Views:
    389
    lalit
    Jun 30, 2009
Loading...

Share This Page