Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

Client receiving: "Web Service method name is not valid"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Daniel - 06 Mar 2006 14:35 GMT
I have a WinForm exe (client) connecting to an asmx WebService (server)

When I try to connect to WebMethod A, everything works fine.

But when I rename the WebMethod A to B, the client (actually,
SoapHttpClientProtocol.BeforeSerialize) throws:

ArgumentException "<B> Web Service method name is not valid"

What I do not understand is why the client process is not even sending
an http request to the server (I'm sniffing the connection) asking for
method B.

On the client, I modify the name in SoapDocumentMethodAttribute, and
the invoke method.

Any ideas?
Daniel - 06 Mar 2006 16:54 GMT
I found the problem :

The reason is that the method name at the proxy class MUST match the
webmethod name, so:

 [SoapDocumentMethodAttribute("ns/B")...]
 public int B()
 {
      object[] results = this.Invoke("B"...)
 }

will work, but

 [SoapDocumentMethodAttribute("ns/B")...]
 public int BBB ()
 {
      object[] results = this.Invoke("B"...)
 }

wont (note the mismatch between web method B, and proxy class method
BBB), throwing "Web Service method name is not valid".

This triggers the following two questions:

1) is there any way to circumvent this default behaviour?
2) do you know where can I find good documentation explaining all the
plumbing involved inside the WS black box?

Thxs

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.