Explaination:
When we add Web Reference to a Web Service from local client Application, the port number of the proxy server (for ex 6098 ) is attached to the actaul VIP URL in the client proxy class instead of Listener port number of the actual proxy server (VIP URL in our case). This is the reason why port number 6098 is appended to the VIP and not allowing to call the remote WebService.
when we use direct URL instead of VIP, there are no issues.
Workaround for this:
1) Use wsdl.exe tool of Visual Studio to generate the proxy class instead of using Add Web Reference wizard, modify the URL in the proxy class constructor to remove the port number at the end, compile it and add reference to this assembly in the Client application as reference to a normal assembly instead of Web Reference (Internally Add Web Reference wizard also uses wsdl.exe to create proxy class).
(or)
2) While adding Web Reference for the service, instead of specifying direct URL, specify URL?wsdl and then add the Web Reference.
Ex: Type -->http://VIPURL/ --> -->MyWebService --> -->/ --> -->MyWebService --> -->.asmx -->?wsdl in the URL field instead of -->http://VIPURL/ --> -->MyWebService --> -->/ --> -->MyWebService --> -->.asmx --> -->x -->
After adding the Web Reference, modify the web.config to change the URL to remove the port number at the end.
Modify the appSettings entry of the Web.Config
<add key=" -->VIPURL -->. -->MyWebService -->" value="http:// -->VIPURL -->:6098/ -->MyWebService -->/ -->MyWebService -->.asmx"/>
to
<add key=" -->VIPURL -->. -->MyWebService -->"
value=" -->http:// --> -->VIPURL --> -->/ --> -->MyWebService --> -->/ --> -->MyWebService --> -->.asmx -->"/>
|