1. Juli 2011 10:04
ws.UseDefaultCredentials = true;
ws.Url = "http://URL";
1. Juli 2011 10:24
1. Juli 2011 10:42
1. Juli 2011 10:49
1. Juli 2011 18:09
3. Juli 2011 11:02
5. Juli 2011 09:25
using System;
using System.Windows.Forms;
using WebServicePDA_Test.Insert;
using WebServicePDA_Test.SystemService;
using System.Net;
namespace WebServicePDA_Test
{
public partial class frmWebServiceTest : Form
{
public frmWebServiceTest()
{
InitializeComponent();
}
private void btnInsert_Click(object sender, EventArgs e)
{
try
{
string InsertURL = "http://PCNAME:7047/DynamicsNAV/WS/Codeunit/Instert";
string ssURL = "http://PCNAME:7047/DynamicsNAV/WS/SystemService";
NetworkCredential credentials = new NetworkCredential(@"DOMÄNE\USERNAME", "PASSWORT?", "PCAUFDEMNAVUNDWEBSERVICE");
SystemService.SystemService ss = new WebServicePDA_Test.SystemService.SystemService();
ss.Credentials = credentials;
ss.Url = ssURL;
Insert.Instert ins = new Insert.Instert();
ins.Credentials = credentials;
ins.Url = InsertURL;
string name = "Tony";
ins.Insert(name);
}
catch (System.Exception Exc1)
{
txbError.Text = Exc1.ToString();
}
}
}
}
5. Juli 2011 10:59
5. Juli 2011 11:14
5. Juli 2011 11:22
5. Juli 2011 12:20
catch (System.Exception Exc1)
{
txbError.Text = Exc1.Message;
//txbError.Text = SoapException.toString();
}
5. Juli 2011 12:23
catch (System.Exception Exc1)
{
txbError.Text = Exc1.Message;
//txbError.Text = SoapException.toString();
}
catch (SoapException sopEx)
{
txbError.Text = sopEx.Message;
}
5. Juli 2011 12:28
5. Juli 2011 13:23
5. Juli 2011 13:34
catch(SoapException spEx)
{
..
}
catch(WebException WebEx)
{
..
}
5. Juli 2011 13:56
catch(WebException WebEx)
{
txbError.Text = WebEx.ToString();
}
5. Juli 2011 14:28
catch (SoapException soapEx)
{
MessageBox.Show(soapEx.Message); //NAV Error
}
catch (WebException webEx)
{
MessageBox.Show(webEx.Message); //Verbindungsfehler
}
5. Juli 2011 15:08
5. Juli 2011 15:22
5. Juli 2011 22:40
6. Juli 2011 09:38
8. Juli 2011 13:32