1

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.

Robert
  • 828
  • 2
  • 13
  • 28
  • It seems there is something wrong in your serverside code, van you post soms code snippers? – Peter Dec 04 '13 at 09:13
  • There may, in fact, be. I am studying this now and will post something soon. Want to make sure I have a good handle on it so I can post effectively. – Robert Dec 05 '13 at 16:37
  • @Robert ask this question on Jabbr. It's where the SignalR community is. I'm sure they know it. – user3071591 Dec 10 '13 at 04:14

0 Answers0