Leser: 2
3 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using System.Data;
using System.Web;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.ComponentModel;
namespace WebService
{
/// <summary>
/// Zusammenfassungsbeschreibung für Service1
/// </summary>
[WebService(Namespace = "http://testserver/soap/ServiceAdd")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
public class ServiceAdd : System.Web.Services.WebService
{
[WebMethod]
public int Add(int x1, int x2)
{
//return x1 + x2;
if (x1 == 0 & x2 == 0){
return 99; }
else
{
return x1 + x2;
}
}
}
}
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
#! perl #! perl use strict; use CGI::Carp qw(fatalsToBrowser); use CGI qw(:standard escapeHTML); use SOAP::Lite; print header(), start_html(); print p('SOAP Anfrage...'); my $return; my $soap = SOAP::Lite-> service("http://testserver/soap/WebServiceAdd/ServiceAdd.asmx?wsdl"); $return = $soap->Add(8,10); print h4($return); print p('SOAP ENDE'); print end_html();
3 Einträge, 1 Seite |