web method name 'blued out'

B

Bob

I've got a web service, WS, that has two web methods, A, and B.

Yesterday, in VS2K3, I created a web application that needed to use A.

I opened the 'Add Web Reference' dialog, clicked on the 'find web services
available on the local machine' link, selected WS, and web methods A and B
were displayed. What was unusual was that A was displayed in a lighter blue
font than B. I clicked the 'Add Reference' button and in my code wrote

"Dim X As New localhost."

When I typed the ".", the B web method name came up in Intelisense, but A
did not.

I opened up IE and entered, "http://localhost/WS/WS" and both web methods
came up. I selected A, entered data in the Post form that came up, and the
web method worked just like it should.

I had an earlier version on another server, so I went back into VS23K,
deleted the localhost web reference, opened the "Add Web Reference" dialog
again, typed in the address of WS on the other server and once again, both
web methods came backup, but A was 'blued out'.

I hunted down and deleted all WS.wsdl and WS.disco files on my machine.

Opened up the WS source, changed the name of A to XA, rebuilt WS, went back
to the other instance of VS2K3, went through the "Add Web Reference" dialog
and this time XA showed up in the normal blue.

I re-opened the source to WS, changed the name of XA back to A, rebuilt WS,
went back to the other instance of VS2K3, went through the "Add Web
Reference" dialog and A showed up again in the 'blued out' blue.

Can anyone tell me what I need to do to fix this problem and what I might
have done to get myself into this mess?

Thanks,

Bob
 
M

[MSFT]

Hi Bob,

Regarding the issue, we may try to check the WSDL for the web service
first. For example, in IE, type:

http://localhost/WS/service1.asmx?WSDL

And than rename "A" to "XA" as you did before, and check the WSDL in IE
again:

http://localhost/WS/service1.asmx?WSDL

What is the difference you get besides "A" and "XA"?

Addtionally, is the problem only occur on the particular development
computer? Have you tried to add the web reference from another computer and
another project?

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
B

Bob

----- Bob wrote: ----
changes to A while I was making changes to B. This should not have happened
since A works from the test page and the only thing A and B have in common
is that they both reside in the WS web service
with A
I'll report back the results of the above

1) I did make a change to A. I had a Try Catch block that was doing a 'Throw' in the
Catch block. Last week, I made two changes
1) I moved some code that was above the Try block, into the Try block
2) I changed the Throw in the Catch block to a call to the MS EAB

Neither of those should have had any impact on the visibility of the web method name
and did not affect the functioning of the code as I was able to successfully invoke the
web method through the Test Page in IE

2) I commented out the <WebMethod()> attribute in the declaration of B, and rebuilt
the web service, thus removing it from the wsdl

I then recreated the web reference in my test program and it was fine. I built and
ran the test program and it ran fine

I then un-commented the <WebMethod()> attribute in the declaration of B, and
rebuilt the web service

I deleted and re-created the web reference in my test program and it was fine. I
built and and ran the test program and it ran properly

I don't know what caused the problem, but apparently removing the <WebMethod()>
attribute from B forced VS2K3 to recreate something that fixed the problem that
simply changing the name of A didn't

Bo
 
M

[MSFT]

Hi Bob,

When you comment <WebMethod()> of B and recompile, the meta data was
updated for the assembly in the BIN foolder. It seems this correct the
problem.

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top