Results 1 to 4 of 4

Thread: web services and custom types

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2001
    Posts
    25

    web services and custom types

    I am trying to return a custom type from a web service. This is a fairly huge solution, with lots of projects within it, and I am writing a web service to expose one tiny part of it.

    Anyway, in the solution there are several namespaces, and within those, some of the class names are the same. ie.

    NameSpace.Widget
    SomeOtherNameSpace.Widget

    When I try to return a 'NameSpace.Widget' from the web service, I get an error saying "Types NameSpace.Widget and SomeOtherNameSpace.Widget both use the XML type name, Widget, from namespace http://TheNameSpaceMyWebServiceIsIn.com. Use XML attributes to specify a unique XML name and/or namespace for the type."

    Where do I add these XML attributes so that it can tell them apart?

  2. #2
    Member
    Join Date
    Jun 2002
    Posts
    37
    I think this means you are trying to overload a method of your web service

    This cannot be done like in normal classes

    You have to give each method a differnet name in the attribute tag on the web service

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2001
    Posts
    25
    No, I'm not overloading it. For right now at least, there is only one method in the web service.

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Mar 2001
    Posts
    25
    I have figured out the problem. The two different namespaces are not in my WSDL file, just the one namespace that my web service is in. So when it goes to describe my classes, it is trying to put both classes in the same namespace. Is there a way add other namespaces to the wsdl, so that when it encounters these classes it can tell them apart?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width