Why does my web reference to a remote asmx service not allow me to access operations?

235 views Asked by At

Trying to consume a remote asmx web service from server side code - from within a SignalR hub class to be specific.

After I add the reference it appears in my solution explorer under my main project. If I right click and view the reference in object browser I see a long list of EventHandler's and EventArgs (but no ops) on the left. In the middle of the list is the remote service name. If I click on that, I do see the remote service operations listed in a pane to the right. I just can't seem to reference them in the SignalR class file.

When I start typing the reference name in the SignalR file, code complete shows me the rest. But from there I can't get at the operations.

Is there some setting when creating the reference that accounts for this lack of access?

UPDATE:

Appears to be an Intellisense problem? When I started typing the snippet below it code completed the first part - "ThirdPartyService", so it was aware of the reference. But it gave me nothing after that. If I typed out the rest it underlined in red the soap client part and told me it didn't know what that was.

    //Call third party service
    ThirdPartyService.thirdPartySoapClient client = new ThirdPartyService.thirdPartySoapClient();
    client.operation(param1, param2, param3);

I removed and added the service reference a few times with no effect. Finally I opened the source of the reference, added a few spaces and saved. That seems to have jump started something. Service method call is not working but at least it is now compiling and Intellisense is working.

Setting a break point I can see the service method call is being reached and the parameters contain correct data. Watching in fiddler, however, I don't see a request being made when the method call line is reached and executed. No errors are reported. Hmmmm... This is really kind of a separate issue maybe worthy of a separate post.

0

There are 0 answers