locked
Method and Class both have the same name

    Question

  •  

    Hi All...   I'm creating a client for a web service using someone else's WSDL.  There's a method, named getMarkup that takes one argument, a class also named getMarkup.

    Setting up for the call, I can declare the argument without incident - such as...

        myservice.getMarkup myMarkup = new myservice.getMarkup();

    But when I try and make the call; one, the intellesence insists it's a class; and two, if I blow that off and type it anyway, the compiler flags it as an error and won't let it run.  That code being such as...

        myservice.getMarkup(myMarkup);

    I've also created a server with this WSDL and don't have a problem declaring the method and the class both with the same name.

    How do I make the client accept it?

    I tried to post the actual WSDL here, but it was too large to send.  I can post pieces of it if anyone would like to see it.

    Thanks.   – Curt

     

     

    Thursday, September 18, 2008 1:46 PM

Answers

  • Curtis, if the proxy class compiles, then it must be possible to refer to everything in it. You may simply need to always use the fully qualified name of everything.
    John Saunders | Use File->New Project to create Web Service Projects
    • Marked as answer by CurtisDeHaven Thursday, September 18, 2008 3:27 PM
    • Marked as answer by CurtisDeHaven Thursday, September 18, 2008 3:27 PM
    • Marked as answer by CurtisDeHaven Thursday, September 18, 2008 3:27 PM
    Thursday, September 18, 2008 1:55 PM
    Moderator

All replies

  • Curtis, if the proxy class compiles, then it must be possible to refer to everything in it. You may simply need to always use the fully qualified name of everything.
    John Saunders | Use File->New Project to create Web Service Projects
    • Marked as answer by CurtisDeHaven Thursday, September 18, 2008 3:27 PM
    • Marked as answer by CurtisDeHaven Thursday, September 18, 2008 3:27 PM
    • Marked as answer by CurtisDeHaven Thursday, September 18, 2008 3:27 PM
    Thursday, September 18, 2008 1:55 PM
    Moderator
  • Yep, you got it.  There was a "Service" class along side the getMarkup class - once I instantiated that, the getMarkup method was part of the Service class.  Thanks for the help, John.
    Thursday, September 18, 2008 3:27 PM