web services - SAP Webservice - Could not establish connection to network in C# -


i trying connect pda sap using sap web service.

my visual studio version visual studio 2008 professional edition. followed great tutorial create/consume sap web service using soap manager

i have added web service in c# project , please find below code.

        sap_wsdl.z_web_service_name service = new pda_app.sap_wsdl.z_web_service_name();         sap_wsdl.zmmbatchputawayfromphp data = new pda_app.sap_wsdl.zmmbatchputawayfromphp();         data.pbktxt = "test";         networkcredential cred = new networkcredential();         cred.username = "xxxxx";         cred.password = "******";         service.credentials = cred;         service.proxy = new webproxy("ip" , 1);         sap_wsdl.zmmbatchputawayfromphpresponse response = new pda_app.sap_wsdl.zmmbatchputawayfromphpresponse();         response = service.zmmbatchputawayfromphp(data); 

after deploying getting exception(webexception unhandled) not establish connection network.

system.net.webexception - {"could not establish connection network."}

stack trace:

"   @ system.net.httpwebrequest.finishgetresponse()\r\n   @ system.net.httpwebrequest.getresponse()\r\n   @ system.web.services.protocols.webclientprotocol.getwebresponse(webrequest request)\r\n   @ system.web.services.protocols.httpwebclientprotocol.getwebresponse(webrequest request)\r\n   @ system.web.services.protocols.soaphttpclientprotocol.doinvoke(string methodname, object[] parameters, webclientasyncresult asyncresult)\r\n   @ system.web.services.protocols.soaphttpclientprotocol.invoke(string methodname, object[] parameters)\r\n   @ pda_app.sap_wsdl.z_web_service_name.zmmbatchputawayfromphp(zmmbatchputawayfromphp zmmbatchputawayfromphp1)\r\n   @ pda_app.login.button2_click(object sender, eventargs e)\r\n   @ system.windows.forms.control.onclick(eventargs e)\r\n   @ system.windows.forms.button.onclick(eventargs e)\r\n   @ system.windows.forms.buttonbase.wnproc(wm wm, int32 wparam, int32 lparam)\r\n   @ system.windows.forms.control._internalwnproc(wm wm, int32 wparam, int32 lparam)\r\n   @ microsoft.agl.forms.evl.entermainloop(intptr hwnmain)\r\n   @ system.windows.forms.application.run(form fm)\r\n   @ pda_app.program.main()\r\n" 

status : system.net.webexceptionstatus.connectfailure

please me out solve problem.

looks networking issues client sap soap server. here tips , tricks check connectivity between client , server.

  1. use ping , tracert: utilities can used check if client can see server. first try ping basic check if server available on client network. keep in mind network restrict use of ping. secondly try tracert(trace route). utility show list of ip client has travel to server.

  2. if both steps above work , can confirm server reachable on network can try telnet sessions client server on port service lives. if can connect don't have network issue if cannot connect have firewall issue between client , server.

in summary:

try ping it. if successful telnet it. if cannot ping try tracert server if successful telnet it.


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -