Beispiel #1
0
        protected void Page_Load( object sender, EventArgs e )
        {
            WebServiceReference.Person p1 = new WebServiceReference.Person();
              p1.Navn = "Ole";
              p1.Male = true;
              p1.Alder = 23;

              WebServiceReference.Person p2 = new WebServiceReference.Person();
              p2.Navn = "Niels";
              p2.Male = true;
              p2.Alder = 46;

              WebServiceReference.ArtemisSoapClient proxy = new WebServiceReference.ArtemisSoapClient();

              Label1.Text = proxy.Oldest(p1, p2).Navn + " er ældst af " + p2.Navn + " og " + p1.Navn;
        }
Beispiel #2
0
        protected void ReadButton_Click( object sender, EventArgs e )
        {
            WebServiceReference.ArtemisSoapClient proxy = new WebServiceReference.ArtemisSoapClient();

              string reply = proxy.GetTextFile( PathInputBox.Text );

              if(!reply.Contains( "ERROR" )) {
            Label1.ForeColor = System.Drawing.Color.Black;
            Label1.Text = "Contents of " + PathInputBox.Text + ":<br/><br/>";
            Label1.Text += reply.Replace( "\n", "<br/>" );
              } else {
            Label1.ForeColor = System.Drawing.Color.Red;
            Label1.Text = reply + "<br/>" + PathInputBox.Text;
              }

              PathInputBox.Text = "";
        }