Error while consuming web service in AX 2012

Hi All,

We have implemented the web service to get exchange rages from web. In-order to achieve this we added dll reference in AX and called the dll reference in x++ by using batch frame work.
We are able to get the exchange with out batch but facing issue when executed in batch process and getting socket error.

Can any one suggest us steps to trouble shoot the issue, Exactly where we have to provide access particulate URL and what permissions.

ERROR as below :-

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.Net.WebException: Unable to connect to the remote server —> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 191..*.:80

at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)

at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)

— End of inner exception stack trace —

at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)

at System.Net.WebClient.DownloadString(Uri address)

at TestGetExchangeRate.TestGetExchangeRate.fnGetExchangeRate(String sPath)

at Dynamics.Ax.Application.TestRetrieveExchRatesWeb.Run() in 99

— End of inner exception stack trace —



If you can get the exchange rate without batch, it means the code is fine, something specific to batch is causing the problem. How is your batch done? Is your URL written in X++ as hard coded?

Thanks for prompt response.

Yes Kwen. The URL is hard-coded only. Same logic is working in our local domain both manual and batch process.
The problem with customer domain environment only. I suspect that there is some configuration setup/permissions has to be done at firewall level .I am not sure exactly what and where.