G
Guest
Hello,
I'm developing a CF application which consumes an existing delphi webservice.
Via the Visual Studio I have made a web reference to the wsdl file and
generated the web service code for the client via the studio.
Now when I try to call one of the webservice functions I get an error 400
Bad Request.
Anyone have ideas where it could have gone wrong?
Following is a piece of the generated code
Code:
[System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:SoapServerIntf-ISoapServer#GetItemStoc",
RequestNamespace="urn:SoapServerIntf-ISoapServer",
ResponseNamespace="urn:SoapServerIntf-ISoapServer")]
[return: System.Xml.Serialization.SoapElementAttribute("return")]
public int GetItemStoc(string Item) {
object[] results = this.Invoke("GetItemStoc", new object[] {
Item});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetItemStoc(string Item,
System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetItemStoc", new object[] {
Item}, callback, asyncState);
}
/// <remarks/>
public int EndGetItemStoc(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
Here is where I get the error
Code:
private void btnStoc_Click(object sender, System.EventArgs e)
{
try
{
ISoapServerservice srvcSoap = new ISoapServerservice();
int nAntwoord;
nAntwoord = srvcSoap.GetItemStoc("120013300H00");
MessageBox.Show(nAntwoord.ToString());
}
catch(Exception a)
{
// Error handling mechanism
//
System.Windows.Forms.Cursor.Current =
System.Windows.Forms.Cursors.Default;
MessageBox.Show(a.Message, "MES");
}
}
Thanx in advance for any help in the right direction
I'm developing a CF application which consumes an existing delphi webservice.
Via the Visual Studio I have made a web reference to the wsdl file and
generated the web service code for the client via the studio.
Now when I try to call one of the webservice functions I get an error 400
Bad Request.
Anyone have ideas where it could have gone wrong?
Following is a piece of the generated code
Code:
[System.Web.Services.Protocols.SoapRpcMethodAttribute("urn:SoapServerIntf-ISoapServer#GetItemStoc",
RequestNamespace="urn:SoapServerIntf-ISoapServer",
ResponseNamespace="urn:SoapServerIntf-ISoapServer")]
[return: System.Xml.Serialization.SoapElementAttribute("return")]
public int GetItemStoc(string Item) {
object[] results = this.Invoke("GetItemStoc", new object[] {
Item});
return ((int)(results[0]));
}
/// <remarks/>
public System.IAsyncResult BeginGetItemStoc(string Item,
System.AsyncCallback callback, object asyncState) {
return this.BeginInvoke("GetItemStoc", new object[] {
Item}, callback, asyncState);
}
/// <remarks/>
public int EndGetItemStoc(System.IAsyncResult asyncResult) {
object[] results = this.EndInvoke(asyncResult);
return ((int)(results[0]));
Here is where I get the error
Code:
private void btnStoc_Click(object sender, System.EventArgs e)
{
try
{
ISoapServerservice srvcSoap = new ISoapServerservice();
int nAntwoord;
nAntwoord = srvcSoap.GetItemStoc("120013300H00");
MessageBox.Show(nAntwoord.ToString());
}
catch(Exception a)
{
// Error handling mechanism
//
System.Windows.Forms.Cursor.Current =
System.Windows.Forms.Cursors.Default;
MessageBox.Show(a.Message, "MES");
}
}
Thanx in advance for any help in the right direction