I'm calling webservice function from a static class .... The code looks like below:
Public Fixed Category ERPBOServiceHandler {Private Static ERPBOService _service = new ERPBOService (); Private static bool _connected = false; /// & lt; Summary & gt; /// To access all WebSaver methods, connect to ERPBO web server: /// & lt; / Summary & gt; /// & lt; Param name = "url" & gt; The URL of the webservice to connect. & Lt; / Param & gt; /// & lt; Returns & gt; If the web service connection is successful, and is wrong, then returns the truth. & Lt; / Returns> Public Stable Bull Connect (string url) {try {_service.Url = url; _service.Discover (); _connected = true; Back true; } Catch (exception exc) {ERPLog.LogException ("ERPBOServiceHandler.Connect", exc); // Search failed, I failed to contact the web service. So the web service is not connected to System.Windows.Forms.MessageBox.Show ("trying to connect to error \ n while connecting to webservice:" + url + "\ n \ n" + exc.ToString () ); _connected = false; ERPEngine.SetStatus (wrong); return false; }}} I am trying to connect to the webservice using this static class .... It works fine when I am opening an application with a proper GUI. ... but if I try to use the command line parameter to call the application and then by using this webservice class it returns illegal charcters in the path error.
I tried to pass the URL in a message box and it seems that the path is fine. Note: I am getting the way to webservice from a setting file written in xml to xml service And the path is defined as:
& lt; ERPBOWebServicePath & gt; Http: // localhost: 4744 / ERPBOService.asmx & lt; / ERPBOWebServicePath & gt; Something is less when I call it using the command line parameter.
The solution to this issue. The problem was with me using nested stable constructors.
Comments
Post a Comment