with Visual studio 2005.
Code below.
add the client I added a webreference as you see. If I test the webservice in my browser it works, but not from the pda.
ERROR:
at runtime: Web exception was unhandled. Error cannot be displayed because an optional source-assembly was not found.
System.Net.WebException was unhandled
Message="Web exception was unhandled. Error cannot be displayed because an optional source-assembly was not found"
StackTrace:
bij System.Net.HttpWebRequest.finishGetResponse()
bij System.Net.HttpWebRequest.GetResponse()
bij System.Web.Services.Protocols.WebClientProtocol.GetWebResponse()
bij System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse()
bij System.Web.Services.Protocols.SoapHttpClientProtocol.doInvoke()
bij System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke()
bij DeKangoeroe.kaka.Service.ReceiveChangesFromRemoteSystem()
bij DeKangoeroe.Hmenu.btnProfiel_Click()
bij System.Windows.Forms.Control.OnClick()
bij System.Windows.Forms.Button.OnClick()
bij System.Windows.Forms.ButtonBase.WnProc()
bij System.Windows.Forms.Control._InternalWnProc()
bij Microsoft.AGL.Forms.EVL.EnterMainLoop()
bij System.Windows.Forms.Application.Run()
bij DeKangoeroe.Program.Main()
Below you can see the code: I
test it with hard coded values on the server. Strange is that if I
press ctr+F5 and consume the webreference from http. It works. The
query is inserted in the database. Afterward i delete the value in the
database to retest
When I call it from pda I get the
upper exception. I even don't pass parameters. I do but I don't use
because it's hardcoded at the server.
I'm searching now already for a while :s
pda client:
local.Service test = new DeKangoeroe.local.Service();
Database databank = new Database();
string transactie = databank.maakQuery("select * from code");
MessageBox.Show(transactie);
//this shows a well formed query(:start transaction; insert statement1;insert statement2;commit)
//calling the service now
test.ReceiveChangesFromRemoteSystem("uid", "pwd", transactie);
//are the objects not serialised
web service: service.cs
If I press control
[WebMethod]
public string ReceiveChangesFromRemoteSystem(string remoteUserId, string remotePassword, string sqlTransaction)
{
MySQLserver databank = new MySQLserver();
databank.ExecuteCommand("insert into test values (\'koekoek\')","user", "pasword")
//As you see: hard coded, with the browser (local, pda) it works
}

exception unhandled
M Popiela
If this is the reason it didn't work for 2 days
two days wasted:/
I tried with apache 2.0.55 and asp_mod. With the http protocol no problems. Let's hope it works tonight.
mdev
localhost.Service test= new DeKangoeroe.localhost.Service();
MessageBox.Show(test.HelloWorld());
Now I'll try with firewalls off, but normal this could not be the problem because soap is developped to pass firewalls (what RPC services couldn't)
msnashok
I'll let you know the result. but first I'm studying for school
scromer
sunslight
But not by calling it from the application with the code above, while nothing has to be passed to let the webservice work, because for testing I coded everything hard. There must be something with the soap,xml, connection,...
I'm new to this.
mjhadden
now it works.
I told you before, it was working on the pda from the browser, because there I was aware that I had to type the ip address of my pc.
On the computer I added a webreference from localhost
Normal people should take a gun and say, why can I be so stupid
Edamepsel
Hi yvading1482,
The exception you get is a very general one. You can not really undestand what is wrong from reading the exception. So lets try to undestand it together.
Let's try to create a simple "Hello world" web method. Try to consume it.
Let me know if it works.
If it does not work, i would try openning a new project and try again.
Let me know how you are doing.
Another way to debug is:
[WebMethod]
public string ReceiveChangesFromRemoteSystem(string remoteUserId, string remotePassword, string sqlTransaction)
{
try
{
MySQLserver databank = new MySQLserver();
databank.ExecuteCommand("insert into test values (\'koekoek\')","user", "pasword")
}
catch(Exception ex)
{
string msg = ex.Message;
throw new SoapException(msg);
}
}
kkiran
It has to be something with the pda.
As you remember, consuming webservices by browser was possible.
Not from application