Web Services in.net (6) cont d
|
|
- Charla Russell
- 6 years ago
- Views:
Transcription
1 Web Services in.net (6) cont d These slides are meant to be for teaching purposes only and only for the students that are registered in CSE3403 and should not be published as a book or in any form of commercial product, unless written permission is obtained. 1
2 WSDL and SOAP for Employee Web Service Once the web service is compiled, a description of this service is also created: the WSDL (Web Service Definition Language). 2
3 Can always access the WSDL by supplying the URL suffixed with?wsdl. 3
4 The complete WSDL for the Employee WS <?xml version="1.0" encoding="utf-8"?> - <definitions xmlns:http=" =" xmlns:soap=" =" xmlns:s=" =" xmlns:s0=" =" xmlns:soapenc=" =" xmlns:tm=" =" xmlns:mime=" =" targetnamespace=" =" xmlns=" =" - <types types> - <s:schema elementformdefault=" ="qualified qualified" targetnamespace=" =" - <s:element name=" ="MakeEmployee MakeEmployee"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="name name" type=" ="s:string s:string" /> <s:element minoccurs=" ="1" maxoccurs=" ="1" name=" ="salary salary" type=" ="s:double s:double" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> - <s:element name=" ="MakeEmployeeResponse MakeEmployeeResponse"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="MakeEmployeeResult MakeEmployeeResult" type=" ="s0:employee s0:employee" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> Employee type is the return type of method MakeEmployee. Needs to be further defined. Web method MakeEmployee. 4
5 - <s:complextype name=" ="Employee Employee"> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="Name Name" type=" ="s:string s:string" /> <s:element minoccurs=" ="1" maxoccurs=" ="1" name=" ="Salary Salary" type=" ="s:double s:double" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:schema s:schema> </types types> - <message name=" ="MakeEmployeeSoapIn MakeEmployeeSoapIn"> <part name=" ="parameters parameters" element=" ="s0:makeemployee s0:makeemployee" /> </message message> - <message name=" ="MakeEmployeeSoapOut MakeEmployeeSoapOut"> <part name=" ="parameters parameters" element=" ="s0:makeemployeeresponse s0:makeemployeeresponse" /> </message message> - <porttype name=" ="EmployeeServiceSoap EmployeeServiceSoap"> - <operation name=" ="MakeEmployee MakeEmployee"> <documentation documentation>creates creates and returns an Employee with the specified name and salary</ </documentation documentation> <input message=" ="s0:makeemployeesoapin s0:makeemployeesoapin" /> <output message=" ="s0:makeemployeesoapout s0:makeemployeesoapout" /> </operation operation> </porttype porttype> - <binding name=" ="EmployeeServiceSoap EmployeeServiceSoap" type=" ="s0:employeeservicesoap s0:employeeservicesoap"> <soap:binding transport=" =" style=" ="document document" /> - <operation name=" ="MakeEmployee MakeEmployee"> <soap:operation soapaction=" =" style=" ="document document" /> - <input input> <soap:body use=" ="literal literal" /> </input input> - <output output> <soap:body use=" ="literal literal" /> </output output> </operation operation> </binding binding> Definition of type Employee. 5...
6 / - <service name=" ="EmployeeService EmployeeService"> - <port name=" ="EmployeeServiceSoap EmployeeServiceSoap" binding=" ="s0:employeeservicesoap s0:employeeservicesoap"> <soap:address location=" =" /> </port port> </service service> </definitions definitions> 6
7 SOAP for Employee WS :: Consumer to WebService POST /WebService1WithUserDefinedClass/EmployeeService.asmx HTTP/1.1 Host: localhost Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: " <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <MakeEmployee xmlns=" <name> string</name> <salary> double</salary> </MakeEmployee MakeEmployee> </soap:body> </soap:envelope> 7
8 SOAP for Employee WS :: WebService to Consumer HTTP/ OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <MakeEmployeeResponse xmlns=" <MakeEmployeeResult> <Name> string </Name> <Salary> double </Salary> </MakeEmployeeResult> </MakeEmployeeResponse> </soap:body> </soap:envelope> 8
9 A web service that uses multiple classes Our previous web service (Employee) uses only one class Employee. It is realistic that a web service may involve more than one class. Employee Date Manager Web Service 9
10 Web service with many classes Code structure 10
11 Code structure :: Date 11
12 Code :: Date.cs using System; namespace WebService3ClassSubclass /// <summary> /// Summary description for Class1. /// </summary> public class Date private int year; private int month; private int day; public Date() : this( 1970, 1, 1 ) public Date( int year, int month, int day) this.year = year; this.month = month; this.day = day; 12
13 / public Date (Date adate) this.year = adate.year; this.month = adate.month; this.day = adate.day; public override string ToString() return "year = " + this.year + ", month = " + this.month + ", day = " + this.day ; public int Year get return year; set year = value; public int Month get return month; set month = value; public int Day get return day; set day = value; // end Date class 13
14 Code structure :: Employee 14
15 Code :: Employee.cs using System; namespace WebService3ClassSubclass /// <summary> /// /// </summary> public class Employee private string name ; private double salary; private Date dob; // date of birth // not handled by SOAP? public Employee() : this ("no name", 0, new Date (1970, 1, 1)) public Employee ( string name, double salary, Date dob) this.name = name; this.salary = salary; this.dob = new Date( dob); 15
16 public string Name get return name; set name = value; Code :: Employee.cs public double Salary get return salary; set salary = value; public Date DOB get set return dob; dob = value; public virtual void raise ( double percent ) salary = salary * (1 + percent/100); public override string ToString() return "name = " + this.name + ", salary = " + this.salary + ", DOB = " + this.dob.tostring(); // end class Employee 16
17 Code structure :: Manager 17
18 Code :: Manager.cs using System; namespace WebService3ClassSubclass /// <summary> /// /// </summary> public class Manager : Employee private double bonus; public Manager() : base() public Manager ( string name, double salary, Date dob, double bonus) : base ( name, salary, dob) this.bonus = bonus; public double Bonus get return this.bonus; set this.bonus = value; 18
19 Code :: Manager.cs public override void raise( double percent) base.raise(percent + bonus*.1); public override string ToString() return base.tostring() + ", bonus = " + this.bonus; //end Manager class 19
20 Code Structure :: Service1 Exposed web methods. 20
21 Code :: Service1.cs using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.Web; using System.Web.Services; namespace WebService3ClassSubclass /// <summary> /// Summary description for Service1. /// </summary> public class Service1 : System.Web.Services.WebService public Service1() //CODEGEN: This call is required by the ASP.NET Web Services Designer InitializeComponent(); 21
22 [ WebMethod (Description = "make Employee with specified name and salary") ] public Employee MakeEmployee ( string name, double salary, Date dob ) return new Employee ( name, salary, dob); [ WebMethod (Description="make Manager with specified name, salary, bonus") ] public Manager MakeManager ( string name, double salary, Date dob, double bonus ) return new Manager( name, salary, dob, bonus ); [ WebMethod (Description="return a string representation of the specified Employee") ] public string ToStringEmployee( Employee e) return e.tostring(); [ WebMethod (Description="return a string representation of the specified Manager") ] public string ToStringManager( Manager m) return m.tostring(); 22
23 [ WebMethod (Description = "Return a string rep of the specified Date") ] public string ToStringDate ( Date dd ) return dd.tostring(); [ WebMethod (Description = "Returns a Date with the specified year, month, day") d ] public Date MakeDate ( int year, int month, int day ) return new Date(year, month, day); [ WebMethod ( Description = "Raise salary of the specified Employee by the specified percentage.") ] public Employee RaiseEmployeeSalary( Employee ee, double percent) //ee.salary = ee.salary * ( 1 + percent/100); ee.raise( percent ); return ee; [ WebMethod ( Description = "Raise salary of the specified Manager by the specified percentage.") ] public Manager RaiseManagerSalary( Manager mm, double percent) mm.raise( percent ); return mm; 23
24 / #region Component Designer generated code //Required by the Web Services Designer private IContainer components = null; /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() /// <summary> /// Clean up any resources being used. /// </summary> protected override void Dispose( bool disposing ) if(disposing && components!= null) components.dispose(); base.dispose(disposing); #endregion 24
25 A windows app that uses the web service EmployeeManagerDate Pressing the buttons performs the indicated action (by calling a web method of the web service) and displays the outcome on the labels. 25
26 26
27 Web Services in.net (7) These slides are meant to be for teaching purposes only and only for the students that are registered in CSE3403 and should not be published as a book or in any form of commercial product, unless written permission is obtained. 27
28 Win app code structure The web service incorporated into our application. The win app Form. 28
29 The web service class Service1 and the supporting classes Date, Employee, Manager. 29
30 The properties exposed from the supporting classes. 30
31 The exposed WebMethods. 31
32 The code (Form1.cs) using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; namespace WindowsApplication1 /// <summary> /// Summary description for Form1. /// </summary> public class Form1 : System.Windows.Forms.Form private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button2; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Button button3; private System.Windows.Forms.Label label3; private System.Windows.Forms.Button button4; private System.Windows.Forms.Label label4; /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.Container components = null; 32
33 public Form1() InitializeComponent(); protected override void Dispose( bool disposing ) if( disposing ) if (components!= null) components.dispose(); base.dispose( disposing ); // #region Windows Form Designer generated code private void InitializeComponent() #endregion /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() Application.Run(new Form1()); 33
34 private EmployeeManagerDateService.Service1 myws ; private void button1_click(object sender, System.EventArgs e) myws = new EmployeeManagerDateService.Service1(); // EmployeeManagerDateService.Date dob = myws.makedate(1985,12, 23);// new EmployeeManagerDateService.Date(); /* alternatively call Date() and then do: dob.year = 1985; dob.month = 12; dob.day = 23; */ EmployeeManagerDateService.Employee ee = myws.makeemployee( "Joe Doe", 11111, myws.makedate(1985,12, 23)); label1.text = myws.tostringemployee( ee); /* alternatively... * label1.text = "Name = " + ee.name; label1.text += " Salary = " + ee.salary; label1.text += " DOB = " + myws.tostringdate( ee.dob); label1.text += " DOB year = " + ee.dob.year; label1.text += " month = " + ee.dob.month; label1.text += " day = " + ee.dob.day; */ 34
35 private void button2_click(object sender, System.EventArgs e) myws = new EmployeeManagerDateService.Service1(); EmployeeManagerDateService.Date dob = new EmployeeManagerDateService.Date(); dob.year = 1979; dob.month = 1; dob.day = 23; EmployeeManagerDateService.Manager mm = myws.makemanager( "Joe Doe II", 22222, dob, 500); label2.text = myws.tostringmanager( mm); /*alternatively... label2.text = "Name = " + mm.name + ", Salary = " + mm.salary + ", DOB.Year = " + mm.dob.year + ", DOB.Month = " + mm.dob.month + ", DOB.Day = " + mm.dob.day + ", Bonus = " + mm.bonus; */ 35
36 private void button3_click(object sender, System.EventArgs e) / myws = new EmployeeManagerDateService.Service1(); EmployeeManagerDateService.Employee ee = myws.makeemployee( "Joe Doe", 10000, myws.makedate(1985,12, 23)); label3.text = myws.tostringemployee( ee); // alternative... but not very good //ee.salary = ee.salary * ( /100); ee = myws.raiseemployeesalary( ee, 20); label3.text += "---- new :: " + myws.tostringemployee( ee); private void button4_click(object sender, System.EventArgs e) myws = new EmployeeManagerDateService.Service1(); EmployeeManagerDateService.Manager mm = myws.makemanager( "Joe Doe II", 20000, myws.makedate(1985,12, 23), 500); label4.text = myws.tostringmanager( mm); mm = myws.raisemanagersalary( mm, 20); label4.text += "---- new :: " + myws.tostringmanager( mm); 36
37 Reference.cs (the glue code) // // <autogenerated> // This code was generated by a tool. // Runtime Version: // // Changes to this file may cause incorrect behavior and will l be lost if // the code is regenerated. // </autogenerated> // // // This source code was auto-generated by Microsoft.VSDesigner, Version // namespace WindowsApplication1.EmployeeManagerDateService using System.Diagnostics; using System.Xml.Serialization; using System; using System.Web.Services.Protocols; using System.ComponentModel; using System.Web.Services; 37
38 /// <remarks/> [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Web.Services.WebServiceBindingAttribute(Name="Service1Soap", e1soap", Namespace=" public class Service1 : System.Web.Services.Protocols.SoapHttpClientProtocol ientprotocol /// <remarks/> public Service1() this.url = " s/service1.asmx"; /// <remarks/> [System.Web.Services.Protocols.SoapDocumentMethodAttribute(" loyee", RequestNamespace=" ResponseNamespace=" Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] Wrapped)] public Employee MakeEmployee(string name, System.Double salary, Date dob) object[] results = this.invoke("makeemployee", new object[] o name, salary, dob); return ((Employee)(results[0])); /// <remarks/> 38
39 public System.IAsyncResult BeginMakeEmployee(string name, System.Double salary, Date dob, System.AsyncCallback callback, object asyncstate) return this.begininvoke("makeemployee", new object[] name, salary, dob, callback, asyncstate); /// <remarks/> public Employee EndMakeEmployee(System.IAsyncResult asyncresult) object[] results = this.endinvoke(asyncresult); return ((Employee)(results[0])); /// <remarks/> [System.Web.Services.Protocols.SoapDocumentMethodAttribute(" ager", RequestNamespace=" ResponseNamespace=" Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] Wrapped)] public Manager MakeManager(string name, System.Double salary, Date dob, System.Double bonus) object[] results = this.invoke("makemanager", new object[] name, salary, dob, bonus); return ((Manager)(results[0])); 39
40 /// <remarks/> public System.IAsyncResult BeginMakeManager(string name, System.Double salary, Date dob, System.Double bonus, System.AsyncCallback callback, object asyncstate) return this.begininvoke("makemanager", new object[] name, salary, dob, bonus, callback, asyncstate); /// <remarks/> public Manager EndMakeManager(System.IAsyncResult asyncresult) object[] results = this.endinvoke(asyncresult); return ((Manager)(results[0])); /// <remarks/> [System.Web.Services.Protocols.SoapDocumentMethodAttribute(" gemployee", RequestNamespace=" ResponseNamespace=" Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] Wrapped)] public string ToStringEmployee(Employee e) object[] results = this.invoke("tostringemployee", new object[] e); return ((string)(results[0])); /// <remarks/> public System.IAsyncResult BeginToStringEmployee(Employee e, System.AsyncCallback callback, object asyncstate) return this.begininvoke("tostringemployee", new object[] e, callback, asyncstate); 40
41 /// <remarks/> public string EndToStringEmployee(System.IAsyncResult asyncresult) object[] results = this.endinvoke(asyncresult); return ((string)(results[0])); /// <remarks/> [System.Web.Services.Protocols.SoapDocumentMethodAttribute(" Manager", RequestNamespace=" ResponseNamespace=" Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] Wrapped)] public string ToStringManager(Manager m) object[] results = this.invoke("tostringmanager", new object[] m); return ((string)(results[0])); /// <remarks/> public System.IAsyncResult BeginToStringManager(Manager m, System.AsyncCallback callback, object asyncstate) return this.begininvoke("tostringmanager", new object[] m, callback, asyncstate); /// <remarks/> public string EndToStringManager(System.IAsyncResult asyncresult) object[] results = this.endinvoke(asyncresult); return ((string)(results[0])); /// <remarks/> 41
42 [System.Web.Services.Protocols.SoapDocumentMethodAttribute(" ", RequestNamespace=" ResponseNamespace=" tp://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] Wrapped)] public string ToStringDate(Date dd) object[] results = this.invoke("tostringdate", new object[] dd); return ((string)(results[0])); /// <remarks/> public System.IAsyncResult BeginToStringDate(Date dd, System.AsyncCallback callback, object asyncstate) return this.begininvoke("tostringdate", new object[] dd, callback, asyncstate); /// <remarks/> public string EndToStringDate(System.IAsyncResult asyncresult) object[] results = this.endinvoke(asyncresult); return ((string)(results[0])); /// <remarks/> [System.Web.Services.Protocols.SoapDocumentMethodAttribute(" ", RequestNamespace=" ResponseNamespace=" tp://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] Wrapped)] public Date MakeDate(int year, int month, int day) object[] results = this.invoke("makedate", new object[] year, month, day); return ((Date)(results[0])); 42
43 /// <remarks/> public System.IAsyncResult BeginMakeDate(int year, int month, int day, System.AsyncCallback callback, object asyncstate) return this.begininvoke("makedate", new object[] year, month, day, callback, asyncstate); /// <remarks/> public Date EndMakeDate(System.IAsyncResult asyncresult) object[] results = this.endinvoke(asyncresult); return ((Date)(results[0])); /// <remarks/> [System.Web.Services.Protocols.SoapDocumentMethodAttribute(" loyeesalary", RequestNamespace=" ResponseNamespace=" Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] Wrapped)] public Employee RaiseEmployeeSalary(Employee ee, System.Double percent) object[] results = this.invoke("raiseemployeesalary", new object[] ee, percent); return ((Employee)(results[0])); 43
44 /// <remarks/> public System.IAsyncResult BeginRaiseEmployeeSalary(Employee ee, System.Double percent, System.AsyncCallback callback, object asyncstate) return this.begininvoke("raiseemployeesalary", new object[] o ee, percent, callback, asyncstate); /// <remarks/> public Employee EndRaiseEmployeeSalary(System.IAsyncResult asyncresult) object[] results = this.endinvoke(asyncresult); return ((Employee)(results[0])); /// <remarks/> [System.Web.Services.Protocols.SoapDocumentMethodAttribute(" gersalary", RequestNamespace=" ResponseNamespace=" Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] Wrapped)] public Manager RaiseManagerSalary(Manager mm, System.Double percent) object[] results = this.invoke("raisemanagersalary", new object[] mm, percent); return ((Manager)(results[0])); /// <remarks/> public System.IAsyncResult BeginRaiseManagerSalary(Manager mm, System.Double S percent, System.AsyncCallback callback, object asyncstate) return this.begininvoke("raisemanagersalary", new object[] mm, percent, callback, asyncstate); 44
45 public Manager EndRaiseManagerSalary(System.IAsyncResult asyncresult) sult) object[] results = this.endinvoke(asyncresult); return ((Manager)(results[0])); /// <remarks/> [System.Xml.Serialization.XmlTypeAttribute(Namespace=" /tempuri.org/")] public class Date /// <remarks/> public int Year; /// <remarks/> public int Month; /// <remarks/> public int Day; /// <remarks/> [System.Xml.Serialization.XmlTypeAttribute(Namespace=" /tempuri.org/")] [System.Xml.Serialization.XmlIncludeAttribute(typeof(Manager))] typeof(manager))] public class Employee /// <remarks/> public string Name; /// <remarks/> public System.Double Salary; /// <remarks/> public Date DOB; 45
46 / /// <remarks/> [System.Xml.Serialization.XmlTypeAttribut e(namespace=" public class Manager : Employee /// <remarks/> public System.Double Bonus; 46
47 WSDL MakeEmployee web method. <?xml version="1.0" encoding="utf-8"?> - <definitions xmlns:http=" =" xmlns:soap=" =" xmlns:s=" =" xmlns:s0=" =" xmlns:soapenc=" =" xmlns:tm=" =" xmlns:mime=" =" targetnamespace=" =" xmlns=" =" - <types types> - <s:schema elementformdefault=" ="qualified qualified" targetnamespace=" =" - <s:element name=" ="MakeEmployee MakeEmployee"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="name name" type=" ="s:string s:string" /> <s:element minoccurs=" ="1" maxoccurs=" ="1" name=" ="salary salary" type=" ="s:double s:double" /> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="dob dob" type=" ="s0:date s0:date" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> - <s:complextype name=" ="Date Date"> - <s:sequence s:sequence> <s:element minoccurs=" ="1" maxoccurs=" ="1" name=" ="Year Year" type=" ="s:int s:int" /> <s:element minoccurs=" ="1" maxoccurs=" ="1" name=" ="Month Month" type=" ="s:int s:int" /> <s:element minoccurs=" ="1" maxoccurs=" ="1" name=" ="Day Day" type=" ="s:int s:int" /> </s:sequence s:sequence> </s:complextype s:complextype> - Definition of class Date. 47
48 <s:element name=" ="MakeEmployeeResponse MakeEmployeeResponse"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="MakeEmployeeResult MakeEmployeeResult" type=" ="s0:employee s0:employee" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> - <s:complextype name=" ="Employee Employee"> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="Name Name" type=" ="s:string s:string" /> <s:element minoccurs=" ="1" maxoccurs=" ="1" name=" ="Salary Salary" type=" ="s:double s:double" /> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="DOB DOB" type=" ="s0:date s0:date" /> </s:sequence s:sequence> </s:complextype s:complextype> - <s:element name=" ="MakeManager MakeManager"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="name name" type=" ="s:string s:string" /> <s:element minoccurs=" ="1" maxoccurs=" ="1" name=" ="salary salary" type=" ="s:double s:double" /> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="dob dob" type=" ="s0:date s0:date" /> <s:element minoccurs=" ="1" maxoccurs=" ="1" name=" ="bonus bonus" type=" ="s:double s:double" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> - <s:element name=" ="MakeManagerResponse MakeManagerResponse"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="MakeManagerResult MakeManagerResult" type=" ="s0:manager s0:manager" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> MakeManager web method Definition of class Employee. 48
49 - <s:complextype name=" ="Manager Manager"> - <s:complexcontent mixed=" ="false false"> - <s:extension base=" ="s0:employee s0:employee"> - <s:sequence s:sequence> <s:element minoccurs=" ="1" maxoccurs=" ="1" name=" ="Bonus Bonus" type=" ="s:double s:double" /> </s:sequence s:sequence> </s:extension s:extension> </s:complexcontent s:complexcontent> </s:complextype s:complextype> - <s:element name=" ="ToStringEmployee ToStringEmployee"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="e" type=" ="s0:employee s0:employee" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> - <s:element name=" ="ToStringEmployeeResponse ToStringEmployeeResponse"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="ToStringEmployeeResult ToStringEmployeeResult" type=" ="s:string s:string" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> - <s:element name=" ="ToStringManager ToStringManager"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="m" type=" ="s0:manager s0:manager" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> Definition of class Manager as subclass of Employee. 49
50 - <s:element name=" ="ToStringManagerResponse ToStringManagerResponse"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="ToStringManagerResult ToStringManagerResult" type=" ="s:string s:string" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> - <s:element name=" ="ToStringDate ToStringDate"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="dd dd" type=" ="s0:date s0:date" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> - <s:element name=" ="ToStringDateResponse ToStringDateResponse"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="ToStringDateResult ToStringDateResult" type=" ="s:string s:string" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> - <s:element name=" ="MakeDate MakeDate"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="1" maxoccurs=" ="1" name=" ="year year" type=" ="s:int s:int" /> <s:element minoccurs=" ="1" maxoccurs=" ="1" name=" ="month month" type=" ="s:int s:int" /> <s:element minoccurs=" ="1" maxoccurs=" ="1" name=" ="day day" type=" ="s:int s:int" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> 50
51 - <s:element name=" ="MakeDateResponse MakeDateResponse"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="MakeDateResult MakeDateResult" type=" ="s0:date s0:date" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> - <s:element name=" ="RaiseEmployeeSalary RaiseEmployeeSalary"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="ee ee" type=" ="s0:employee s0:employee" /> <s:element minoccurs=" ="1" maxoccurs=" ="1" name=" ="percent percent" type=" ="s:double s:double" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> - <s:element name=" ="RaiseEmployeeSalaryResponse RaiseEmployeeSalaryResponse"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="RaiseEmployeeSalaryResult RaiseEmployeeSalaryResult" type=" ="s0:employee s0:employee" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> - <s:element name=" ="RaiseManagerSalary RaiseManagerSalary"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="mm mm" type=" ="s0:manager s0:manager" /> <s:element minoccurs=" ="1" maxoccurs=" ="1" name=" ="percent percent" type=" ="s:double s:double" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> 51
52 - <s:element name=" ="RaiseManagerSalaryResponse RaiseManagerSalaryResponse"> - <s:complextype s:complextype> - <s:sequence s:sequence> <s:element minoccurs=" ="0" maxoccurs=" ="1" name=" ="RaiseManagerSalaryResult RaiseManagerSalaryResult" type=" ="s0:manager s0:manager" /> </s:sequence s:sequence> </s:complextype s:complextype> </s:element s:element> </s:schema s:schema> </types types> - <message name=" ="MakeEmployeeSoapIn MakeEmployeeSoapIn"> <part name=" ="parameters parameters" element=" ="s0:makeemployee s0:makeemployee" /> </message message> - <message name=" ="MakeEmployeeSoapOut MakeEmployeeSoapOut"> <part name=" ="parameters parameters" element=" ="s0:makeemployeeresponse s0:makeemployeeresponse" /> </message message> - <message name=" ="MakeManagerSoapIn MakeManagerSoapIn"> <part name=" ="parameters parameters" element=" ="s0:makemanager s0:makemanager" /> </message message> - <message name=" ="MakeManagerSoapOut MakeManagerSoapOut"> <part name=" ="parameters parameters" element=" ="s0:makemanagerresponse s0:makemanagerresponse" /> </message message> - <message name=" ="ToStringEmployeeSoapIn ToStringEmployeeSoapIn"> <part name=" ="parameters parameters" element=" ="s0:tostringemployee s0:tostringemployee" /> </message message> - <message name=" ="ToStringEmployeeSoapOut ToStringEmployeeSoapOut"> <part name=" ="parameters parameters" element=" ="s0:tostringemployeeresponse s0:tostringemployeeresponse" /> </message message> - <message name=" ="ToStringManagerSoapIn ToStringManagerSoapIn"> <part name=" ="parameters parameters" element=" ="s0:tostringmanager s0:tostringmanager" /> </message message> 52
53 - <message name=" ="ToStringManagerSoapOut ToStringManagerSoapOut"> <part name=" ="parameters parameters" element=" ="s0:tostringmanagerresponse s0:tostringmanagerresponse" /> </message message> - <message name=" ="ToStringDateSoapIn ToStringDateSoapIn"> <part name=" ="parameters parameters" element=" ="s0:tostringdate s0:tostringdate" /> </message message> - <message name=" ="ToStringDateSoapOut ToStringDateSoapOut"> <part name=" ="parameters parameters" element=" ="s0:tostringdateresponse s0:tostringdateresponse" /> </message message> - <message name=" ="MakeDateSoapIn MakeDateSoapIn"> <part name=" ="parameters parameters" element=" ="s0:makedate s0:makedate" /> </message message> - <message name=" ="MakeDateSoapOut MakeDateSoapOut"> <part name=" ="parameters parameters" element=" ="s0:makedateresponse s0:makedateresponse" /> </message message> - <message name=" ="RaiseEmployeeSalarySoapIn RaiseEmployeeSalarySoapIn"> <part name=" ="parameters parameters" element=" ="s0:raiseemployeesalary s0:raiseemployeesalary" /> </message message> - <message name=" ="RaiseEmployeeSalarySoapOut RaiseEmployeeSalarySoapOut"> <part name=" ="parameters parameters" element=" ="s0:raiseemployeesalaryresponse s0:raiseemployeesalaryresponse" /> </message message> - <message name=" ="RaiseManagerSalarySoapIn RaiseManagerSalarySoapIn"> <part name=" ="parameters parameters" element=" ="s0:raisemanagersalary s0:raisemanagersalary" /> </message message> - <message name=" ="RaiseManagerSalarySoapOut RaiseManagerSalarySoapOut"> <part name=" ="parameters parameters" element=" ="s0:raisemanagersalaryresponse s0:raisemanagersalaryresponse" /> </message message> - <porttype name=" ="Service1Soap Service1Soap"> - <operation name=" ="MakeEmployee MakeEmployee"> <documentation documentation>make make Employee with specified name and salary</ </documentation documentation> <input message=" ="s0:makeemployeesoapin s0:makeemployeesoapin" /> <output message=" ="s0:makeemployeesoapout s0:makeemployeesoapout" /> </operation operation> 53
54 - <operation name=" ="MakeManager MakeManager"> <documentation documentation>make make Manager with specified name, salary, bonus</ </documentation documentation> <input message=" ="s0:makemanagersoapin s0:makemanagersoapin" /> <output message=" ="s0:makemanagersoapout s0:makemanagersoapout" /> </operation operation> - <operation name=" ="ToStringEmployee ToStringEmployee"> <documentation documentation>return a string representation of the specified Employee</ </documentation documentation> <input message=" ="s0:tostringemployeesoapin s0:tostringemployeesoapin" /> <output message=" ="s0:tostringemployeesoapout s0:tostringemployeesoapout" /> </operation operation> - <operation name=" ="ToStringManager ToStringManager"> <documentation documentation>return a string representation of the specified Manager</ </documentation documentation> <input message=" ="s0:tostringmanagersoapin s0:tostringmanagersoapin" /> <output message=" ="s0:tostringmanagersoapout s0:tostringmanagersoapout" /> </operation operation> - <operation name=" ="ToStringDate ToStringDate"> <documentation documentation>return a string rep of the specified Date</ </documentation documentation> <input message=" ="s0:tostringdatesoapin s0:tostringdatesoapin" /> <output message=" ="s0:tostringdatesoapout s0:tostringdatesoapout" /> </operation operation> - <operation name=" ="MakeDate MakeDate"> <documentation documentation>returns a Date with the specified year, month, day</ </documentation documentation> <input message=" ="s0:makedatesoapin s0:makedatesoapin" /> <output message=" ="s0:makedatesoapout s0:makedatesoapout" /> </operation operation> - <operation name=" ="RaiseEmployeeSalary RaiseEmployeeSalary"> <documentation documentation>raise salary of the specified Employee by the specified percentage.</ </documentation documentation> <input message=" ="s0:raiseemployeesalarysoapin s0:raiseemployeesalarysoapin" /> <output message=" ="s0:raiseemployeesalarysoapout s0:raiseemployeesalarysoapout" /> </operation operation> 54
55 - <operation name=" ="RaiseManagerSalary RaiseManagerSalary"> <documentation documentation>raise salary of the specified Manager by the specified percentage.</ </documentation documentation> <input message=" ="s0:raisemanagersalarysoapin s0:raisemanagersalarysoapin" /> <output message=" ="s0:raisemanagersalarysoapout s0:raisemanagersalarysoapout" /> </operation operation> </porttype porttype> - <binding name=" ="Service1Soap Service1Soap" type=" ="s0:service1soap s0:service1soap"> <soap:binding transport=" =" style=" ="document document" /> - <operation name=" ="MakeEmployee MakeEmployee"> <soap:operation soapaction=" =" style=" ="document document" /> - <input input> <soap:body use=" ="literal literal" /> </input input> - <output output> <soap:body use=" ="literal literal" /> </output output> </operation operation> - <operation name=" ="MakeManager MakeManager"> <soap:operation soapaction=" =" style=" ="document document" /> - <input input> <soap:body use=" ="literal literal" /> </input input> - <output output> <soap:body use=" ="literal literal" /> </output output> </operation operation> 55
56 - <operation name=" ="ToStringEmployee ToStringEmployee"> <soap:operation soapaction=" =" style=" ="document document" /> - <input input> <soap:body use=" ="literal literal" /> </input input> - <output output> <soap:body use=" ="literal literal" /> </output output> </operation operation> - <operation name=" ="ToStringManager ToStringManager"> <soap:operation soapaction=" =" style=" ="document document" /> - <input input> <soap:body use=" ="literal literal" /> </input input> - <output output> <soap:body use=" ="literal literal" /> </output output> </operation operation> - <operation name=" ="ToStringDate ToStringDate"> <soap:operation soapaction=" =" style=" ="document document" /> - <input input> <soap:body use=" ="literal literal" /> </input input> - <output output> <soap:body use=" ="literal literal" /> </output output> </operation operation> 56
57 - <operation name=" ="MakeDate MakeDate"> <soap:operation soapaction=" =" style=" ="document document" /> - <input input> <soap:body use=" ="literal literal" /> </input input> - <output output> <soap:body use=" ="literal literal" /> </output output> </operation operation> - <operation name=" ="RaiseEmployeeSalary RaiseEmployeeSalary"> <soap:operation soapaction=" =" style=" ="document document" /> - <input input> <soap:body use=" ="literal literal" /> </input input> - <output output> <soap:body use=" ="literal literal" /> </output output> </operation operation> - <operation name=" ="RaiseManagerSalary RaiseManagerSalary"> <soap:operation soapaction=" =" style=" ="document document" /> - <input input> <soap:body use=" ="literal literal" /> </input input> - <output output> <soap:body use=" ="literal literal" /> </output output> </operation operation> </binding binding> 57
58 / - <service name=" ="Service1 Service1"> - <port name=" ="Service1Soap Service1Soap" binding=" ="s0:service1soap s0:service1soap"> <soap:address location=" =" /> </port port> </service service> </definitions definitions> 58
59 SOAPs there are two soap messages for each exposed method. SOAP Request this is the SOAP message from the consumer to the web service SOAP response this is the SOAP message from the web service to the consumer 59
60 SOAP :: MakeDate :: request (consumer to web service) POST /WebService3ClassSubclass/Service1.asmx HTTP/1.1 Host: localhost Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: " <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <MakeDate xmlns=" <year>int</year> <month>int</month> Consumer calls <day>int</day> MakeDate ( year, month, day) </MakeDate> </soap:body> </soap:envelope> 60
61 SOAP :: MakeDate :: response (web service to consumer) HTTP/ OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <MakeDateResponse xmlns=" <MakeDateResult> <Year>int</Year> <Month>int</Month> <Day>int</Day> </MakeDateResult> </MakeDateResponse> </soap:body> </soap:envelope> Web service responds with a Date object which is sent serialized as Year, Month, Day. 61
62 SOAP :: MakeEmployee :: request POST /WebService3ClassSubclass/Service1.asmx HTTP/1.1 Host: localhost Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: " <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <MakeEmployee xmlns=" <name>string</name> <salary>double</salary> Consumer calls <dob> MakeEmployee ( name, salary, <Year>int</Year> <Month>int</Month> dob). <Day>int</Day> dob is a Date and is </dob> serialized as Year, Month, </MakeEmployee> Day. </soap:body> </soap:envelope> 62
63 SOAP :: MakeEmployee :: response HTTP/ OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <MakeEmployeeResponse xmlns=" <MakeEmployeeResult> <Name>string</Name> <Salary>double</Salary> <DOB> <Year>int</Year> <Month>int</Month> <Day>int</Day> </DOB> </MakeEmployeeResult> </MakeEmployeeResponse> </soap:body> </soap:envelope> Web service responds with an Employee object which is sent serialized as Name, Salary, DOB (which is serialized as Year, Month, Day). 63
64 SOAP :: MakeManager :: request POST /WebService3ClassSubclass/Service1.asmx HTTP/1.1 Host: localhost Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: " <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <MakeManager xmlns=" <name>string</name> <salary>double</salary> <dob> <Year>int</Year> <Month>int</Month> <Day>int</Day> </dob> <bonus>double</bonus> </MakeManager> </soap:body> </soap:envelope> Consumer calls MakeManager(name, salary, dob, bonus). Dob is a Date object and is serialized to Year, Month, Day. 64
65 SOAP :: MakeManager :: response HTTP/ OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <MakeManagerResponse xmlns=" <MakeManagerResult> <Bonus>double</Bonus> </MakeManagerResult> </MakeManagerResponse> </soap:body> </soap:envelope> Notice that the response shows Bonus only. The Employee part of the Manager is also sent, but not shown in the SOAP! 65
66 SOAP :: ToStringEmployee :: request POST /WebService3ClassSubclass/Service1.asmx HTTP/1.1 Host: localhost Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: " <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <ToStringEmployee xmlns=" <e> <Name>string</Name> <Salary>double</Salary> <DOB> <Year>int</Year> <Month>int</Month> <Day>int</Day> </DOB> </e> </ToStringEmployee> </soap:body> </soap:envelope> Consumer calls ToStringEmployee( Name, Salary, DOB). DOB is serialized to Year, Month, Day. 66
67 SOAP :: ToStringEmployee :: response HTTP/ OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <ToStringEmployeeResponse xmlns=" <ToStringEmployeeResult>string</ToStringEmployeeResult> </ToStringEmployeeResponse> </soap:body> </soap:envelope> 67
68 SOAP :: ToStringDate :: request POST /WebService3ClassSubclass/Service1.asmx HTTP/1.1 Host: localhost Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: " <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <ToStringDate xmlns=" <dd> <Year>int</Year> <Month>int</Month> <Day>int</Day> </dd> </ToStringDate> </soap:body> </soap:envelope> Consumer calls ToStringDate( Year, Month, Day). 68
69 SOAP :: ToStringDate :: response HTTP/ OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <ToStringDateResponse xmlns=" <ToStringDateResult>string</ToStringDateResult> </ToStringDateResponse> </soap:body> </soap:envelope> 69
70 SOAP ToStringManager :: request POST /WebService3ClassSubclass/Service1.asmx HTTP/1.1 Host: localhost Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: " <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <ToStringManager xmlns=" <m> <Bonus>double</Bonus> </m> </ToStringManager> </soap:body> </soap:envelope> <m> is of type Manager (see WSDL). This allows the web service to understand the received SOAP. Consumer calls ToStringManager( ManagerObject) ManagerObject is [Employee, Bonus]. Only Bonus is shown in SOAP message! 70
71 SOAP ToStringManager :: response HTTP/ OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <ToStringManagerResponse xmlns=" <ToStringManagerResult>string</ToStringManagerResult> </ToStringManagerResponse> </soap:body> </soap:envelope> 71
72 SOAP :: RaiseManagerSalary :: request POST /WebService3ClassSubclass/Service1.asmx HTTP/1.1 Host: localhost Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: " <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <RaiseManagerSalary xmlns=" <mm> <Bonus>double</Bonus> </mm> <percent>double</percent> </RaiseManagerSalary> </soap:body> </soap:envelope> 72
73 SOAP :: RaiseManagerSalary :: response HTTP/ OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <RaiseManagerSalaryResponse xmlns=" <RaiseManagerSalaryResult> <Bonus>double</Bonus> </RaiseManagerSalaryResult> </RaiseManagerSalaryResponse> </soap:body> </soap:envelope> 73
74 SOAP :: RaiseEmployeeSalary :: request POST /WebService3ClassSubclass/Service1.asmx HTTP/1.1 Host: localhost Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: " <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <RaiseEmployeeSalary xmlns=" <ee> <Name>string</Name> <Salary>double</Salary> <DOB> <Year>int</Year> <Month>int</Month> <Day>int</Day> </DOB> </ee> <percent>double</percent> </RaiseEmployeeSalary> </soap:body> </soap:envelope> 74
75 SOAP :: RaiseEmployeeSalary :: HTTP/ OK Content-Type: text/xml; charset=utf-8 Content-Length: length response <?xml version="1.0" encoding="utf-8"?> <soap:envelope xmlns:xsi=" xmlns:xsd=" xmlns:soap=" <soap:body> <RaiseEmployeeSalaryResponse xmlns=" <RaiseEmployeeSalaryResult> <Name>string</Name> <Salary>double</Salary> <DOB> <Year>int</Year> <Month>int</Month> <Day>int</Day> </DOB> </RaiseEmployeeSalaryResult> </RaiseEmployeeSalaryResponse> </soap:body> </soap:envelope> 75
76 Web Services in.net (8) These slides are meant to be for teaching purposes only and only for the students that are registered in CSE3403 and should not be published as a book or in any form of commercial product, unless written permission is obtained. 76
77 Asynchronous web service method calls When using (consuming) a web service, and call its exposed methods, we can call them either Synchronously (), myws.add( a, b), Asynchronously (). ( a, b), for the Math service Use the BeginAdd() and EndAdd() alternatives that are provided by the glue code. (Reference.cs file). 77
78 The difference Synchronous call [ Add() ] The consumer is waiting (doing nothing) until method Add returns. easy to implement, not efficient usage of resources Asynchronous call [ BeginAdd() EndAdd() ] The consumer does not wait until method Add returns. ( and, therefore, the consumer can engage in other activities, e.g., call other methods in the mean time). The system creates a separate thread and assigns the call of the method Add to that thread. When method Add returns, the consumer is notified and it receives the result. harder to implement, more efficient usage of resources. 78
79 How it is done :: Synchronous Execution thread. int r = myws.add(7, 11); consumer myws.add( 7,11); Web Service <Idle.> Receive result 79
80 How it is done :: Asynchronous consumer myws.beginadd( a, b, new AsyncCallback( DoneAdd), null); Web Service private void DoneAdd(IAsyncResult ar) int r = myws.endadd(ar); Receive result Two separate execution threads! 80
81 Example After pressing the Add button Aftre pressing the Minus button 81
82 Code structure Use Add() for synchronous calls. Use BeginAdd(), EndAdd() pair for Asynchrono us calls. 82
83 The glue code (Reference.cs) [System.Web.Services.Protocols.SoapDocumentMethodAttribute(" p://tempuri.org/add", RequestNamespace=" ResponseNamespace=" Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] Wrapped)] public int Add(int a, int b) object[] results = this.invoke("add", new object[] a, b); return ((int)(results[0])); public System.IAsyncResult BeginAdd (int a, int b, System.AsyncCallback callback, object asyncstate) return this.begininvoke("add", new object[] a, b, callback, asyncstate); /// <remarks/> public int EndAdd( System.IAsyncResult asyncresult) object[] results = this.endinvoke(asyncresult); return ((int)(results[0])); Notice, Add and EndAdd are the only two with the compatible (desired) return type! When use asynchronous calls, EndAdd is the one that actually performs the addition. Notice, the return type of BeginAdd is the required parameter type of EndAdd. 83
84 The code (Form1.cs) using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; namespace WindowsApplication2UseMathAsynch public class Form1 : System.Windows.Forms.Form private System.Windows.Forms.TextBox textbox1; private System.Windows.Forms.Button button1; private System.Windows.Forms.TextBox textbox2; private System.Windows.Forms.TextBox textbox3; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label5; private System.Windows.Forms.Button button2; /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.Container components = null; 84
85 // [STAThread] static void Main() Application.Run(new Form1()); private MathService.MathService myws; private void button1_click(object sender, System.EventArgs e) myws = new MathService.MathService(); int a = Int32.Parse( textbox1.text); int b = Int32.Parse( textbox2.text); myws.beginadd( a, b, new AsyncCallback( DoneAdd), null); private void DoneAdd(IAsyncResult ar ) int result = myws.endadd(ar); textbox3.text = "" + result; label4.text = "Done Add!"; new AsyncCallback() needs as parameter a method that returns void and has IAsyncResult parameter. The programmer defined method DoneAdd is crafted to be so. In fact, this is especially convenient, since DoneAdd() calls EndAdd(), and EndAdd() needs an IAsyncResult type parameter! [ indirect threading ]. 85
86 private void button2_click(object sender, System.EventArgs e) myws = new MathService.MathService(); int a = Int32.Parse( textbox1.text); int b = Int32.Parse( textbox2.text); int result = myws.endminus( textbox3.text = "" + result; / myws.endminus(myws.beginminus( myws.beginminus( a, b, new AsyncCallback( DoneMinus ), null) ); private void DoneMinus(IAsyncResult ar ) label5.text = "Done Minus!"; An alternative way to call EndMinus(). [ direct threading ]. BeginMinus() returns type compatible with the expected parameter type of EndMinus. Method DoneMinus() does not do anything but it is required since new AsyncCallback() needs a method (returning void and with parameter type IAsyncResult) as a parameter. 86
87 UDDI UDDI: Universal Description, Discovery and Integration. A standard (uddi.xml.org) [ previously ] for organizing/cataloging Web Services. UDDI is commonly regarded as a cornerstone of Web services, defining a standard method for publishing and discovering network-based software components in a service-oriented architecture (from the UDDI standard). 87
88 Purpose of UDDI UDDI is a project to speed interoperability and adoption for web services. "As the adoption of Web services by businesses worldwide continues to grow, it's becoming more important to effectively provide reliable and standardsbased discovery of these services. Along with advances in the standards for management and security of Web services, these latest enhancements to UDDI will help enterprises address these challenges and will, therefore, promote broader adoption of Web services and drive development of business solutions that take advantage of interoperability between multiple Web services," (Toby J Weiss, Senior Vice President of etrust Product Management at Computer Associates.) 88
89 89
90 What Problems Are Solved? Broader B2B Smarter Search Easier Aggregation A mid-sized manufacturer needs to create 400 online relationships with customers, each with their own set of standard and protocols A flower shop in Australia wants to be plugged in to every marketplace in the world, but doesn t know how A B2B marketplace wants catalog data for relevant suppliers in its industry, along with connections to shippers, insurers, etc. Describe Services Discover Services Integrate Them Together 90
91 How UDDI Works SW companies, standards bodies, and programmers populate the registry with descriptions of different types of services UDDI Business Registry 4. Marketplaces, search engines, and business apps query the registry to discover services at other companies Businesses populate the registry with descriptions of the services they support 3. Business Registrations Service Type Registrations UBR assigns a programmatically unique identifier to each service and business registration 5. Business uses this data to facilitate easier integration with each other over the Web 91
92 UDDI as part of the big picture 92
Web Services in.net (7)
Web Services in.net (7) These slides are meant to be for teaching purposes only and only for the students that are registered in CSE4413 and should not be published as a book or in any form of commercial
More informationWeb Services in.net (6)
Web Services in.net (6) These slides are meant to be for teaching purposes only and only for the students that are registered in CSE4413 and should not be published as a book or in any form of commercial
More informationWeb Services in.net (2)
Web Services in.net (2) These slides are meant to be for teaching purposes only and only for the students that are registered in CSE4413 and should not be published as a book or in any form of commercial
More informationUser-Defined Controls
C# cont d (C-sharp) (many of these slides are extracted and adapted from Deitel s book and slides, How to Program in C#. They are provided for CSE3403 students only. Not to be published or publicly distributed
More informationClasses in C# namespace classtest { public class myclass { public myclass() { } } }
Classes in C# A class is of similar function to our previously used Active X components. The difference between the two is the components are registered with windows and can be shared by different applications,
More informationSOA SOA SOA SOA SOA SOA SOA SOA SOA SOA SOA SOA SOA SOA
P P CRM - Monolithic - Objects - Component - Interface - . IT. IT loosely-coupled Client : - Reusability - Interoperability - Scalability - Flexibility - Cost Efficiency - Customized SUN BEA IBM - extensible
More informationTutorial 5 Completing the Inventory Application Introducing Programming
1 Tutorial 5 Completing the Inventory Application Introducing Programming Outline 5.1 Test-Driving the Inventory Application 5.2 Introduction to C# Code 5.3 Inserting an Event Handler 5.4 Performing a
More informationProfessional ASP.NET Web Services : Asynchronous Programming
Professional ASP.NET Web Services : Asynchronous Programming To wait or not to wait; that is the question! Whether or not to implement asynchronous processing is one of the fundamental issues that a developer
More informationIn order to create your proxy classes, we have provided a WSDL file. This can be located at the following URL:
Send SMS via SOAP API Introduction You can seamlessly integrate your applications with aql's outbound SMS messaging service via SOAP using our SOAP API. Sending messages via the SOAP gateway WSDL file
More informationPreliminary. Database Publishing Wizard Protocol Specification
[MS-SSDPWP]: Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open Specifications documentation for protocols, file formats, languages,
More informationTutorial 6 Enhancing the Inventory Application Introducing Variables, Memory Concepts and Arithmetic
Tutorial 6 Enhancing the Inventory Application Introducing Variables, Memory Concepts and Arithmetic Outline 6.1 Test-Driving the Enhanced Inventory Application 6.2 Variables 6.3 Handling the TextChanged
More informationNo Trade Secrets. Microsoft does not claim any trade secret rights in this documentation.
[MS-SSDPWP]: Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open Specifications documentation for protocols, file formats, languages,
More informationWeb Services. Brian A. LaMacchia Microsoft
Web Services Brian A. LaMacchia Microsoft Five Questions! What is a Web Service?! Why are Web Services interesting?! Why should I care about them?! What e-commercee business models do Web Services enable?!
More informationThe contents of this document are directly taken from the EPiServer SDK. Please see the SDK for further technical information about EPiServer.
Web Services Product version: 4.50 Document version: 1.0 Document creation date: 04-05-2005 Purpose The contents of this document are directly taken from the EPiServer SDK. Please see the SDK for further
More informationInheriting Windows Forms with Visual C#.NET
Inheriting Windows Forms with Visual C#.NET Overview In order to understand the power of OOP, consider, for example, form inheritance, a new feature of.net that lets you create a base form that becomes
More information[MS-SSDPWP-Diff]: Database Publishing Wizard Protocol. Intellectual Property Rights Notice for Open Specifications Documentation
[MS-SSDPWP-Diff]: Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open Specifications documentation ( this documentation ) for protocols,
More informationCALCULATOR APPLICATION
CALCULATOR APPLICATION Form1.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms;
More informationTutorial 19 - Microwave Oven Application Building Your Own Classes and Objects
1 Tutorial 19 - Microwave Oven Application Building Your Own Classes and Objects Outline 19.1 Test-Driving the Microwave Oven Application 19.2 Designing the Microwave Oven Application 19.3 Adding a New
More informationDevelopment of distributed services - Project III. Jan Magne Tjensvold
Development of distributed services - Project III Jan Magne Tjensvold November 11, 2007 Chapter 1 Project III 1.1 Introduction In this project we were going to make a web service from one of the assignments
More informationThis presentation is a primer on WSDL Bindings. It s part of our series to help prepare you for creating BPEL projects. We recommend you review this
This presentation is a primer on WSDL Bindings. It s part of our series to help prepare you for creating BPEL projects. We recommend you review this presentation before taking an ActiveVOS course or before
More informationIndySoap Architectural Overview Presentation Resources
Contents: IndySoap Architectural Overview Presentation Resources 1. Conceptual model for Application Application communication 2. SOAP definitions 3. XML namespaces 4. Sample WSDL 5. Sample SOAP exchange,
More informationListBox. Class ListBoxTest. Allows users to add and remove items from ListBox Uses event handlers to add to, remove from, and clear list
C# cont d (C-sharp) (many of these slides are extracted and adapted from Deitel s book and slides, How to Program in C#. They are provided for CSE3403 students only. Not to be published or publicly distributed
More informationWeb Services Using C# and ASP.NET
Web Services Using C# and ASP.NET Student Guide Revision 3.0 Object Innovations Course 4150 Web Services Using C# and ASP.NET Rev. 3.0 Student Guide Information in this document is subject to change without
More informationThis is the start of the server code
This is the start of the server code using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.Net; using System.Net.Sockets;
More informationDyalog APL SAWS Reference Guide
The tool of thought for expert programming Dyalog APL SAWS Reference Guide SAWS Version 1.4 Dyalog Limited Minchens Court, Minchens Lane Bramley, Hampshire RG26 5BH United Kingdom tel: +44(0)1256 830030
More informationThe following list is the recommended system requirements for running the code in this book:
What You Need to Use This Book The following list is the recommended system requirements for running the code in this book: Windows 2000 Professional or higher with IIS installed Windows XP Professional
More informationIntroduction to Web Services
20 th July 2004 www.eu-egee.org Introduction to Web Services David Fergusson NeSC EGEE is a project funded by the European Union under contract IST-2003-508833 Objectives Context for Web Services Architecture
More informationExercise sheet 4 Web services
STI Innsbruck, University Innsbruck Dieter Fensel, Anna Fensel and Ioan Toma 15. April 2010 Semantic Web Services Exercise sheet 4 Exercise 1 (WSDL) (4 points) Complete the following WSDL file in a way
More information1. Windows Forms 2. Event-Handling Model 3. Basic Event Handling 4. Control Properties and Layout 5. Labels, TextBoxes and Buttons 6.
C# cont d (C-sharp) (many of these slides are extracted and adapted from Deitel s book and slides, How to Program in C#. They are provided for CSE3403 students only. Not to be published or publicly distributed
More informationCase study group setup at catme.org Please respond before Tuesday next week to have better group setup
Notes Case study group setup at catme.org Please respond before Tuesday next week to have better group setup Discussion To boost discussion, one write-up for the whole group is fine Write down the names
More informationWSDL. Stop a while to read about me!
WSDL Stop a while to read about me! Part of the code shown in the following slides is taken from the book Java by D.A. Chappell and T. Jawell, O Reilly, ISBN 0-596-00269-6 What is WSDL? Description Language
More informationFlag Quiz Application
T U T O R I A L 17 Objectives In this tutorial, you will learn to: Create and initialize arrays. Store information in an array. Refer to individual elements of an array. Sort arrays. Use ComboBoxes to
More informationSecurities Lending Reporting Web Service
Securities Lending Reporting Web Service External Interface Specification Broker Trades Message Specification November 2009 (November 2007) ASX Market Information 2009 ASX Limited ABN 98 008 624 691 Table
More informationPS2 Random Walk Simulator
PS2 Random Walk Simulator Windows Forms Global data using Singletons ArrayList for storing objects Serialization to Files XML Timers Animation This is a fairly extensive Problem Set with several new concepts.
More informationCSC 330 Object-Oriented Programming. Encapsulation
CSC 330 Object-Oriented Programming Encapsulation Implementing Data Encapsulation using Properties Use C# properties to provide access to data safely data members should be declared private, with public
More informationWeb Applications. Web Services problems solved. Web services problems solved. Web services - definition. W3C web services standard
Web Applications 31242/32549 Advanced Internet Programming Advanced Java Programming Presentation-oriented: PAGE based App generates Markup pages (HTML, XHTML etc) Human oriented : user interacts with
More informationSub To Srt Converter. This is the source code of this program. It is made in C# with.net 2.0.
Sub To Srt Converter This is the source code of this program. It is made in C# with.net 2.0. form1.css /* * Name: Sub to srt converter * Programmer: Paunoiu Alexandru Dumitru * Date: 5.11.2007 * Description:
More informationNotes. Any feedback/suggestions? IS 651: Distributed Systems
Notes Grading statistics Midterm1: average 10.60 out of 15 with stdev 2.22 Total: average 15.46 out of 21 with stdev 2.80 A range: [18.26, 23] B range: [12.66, 18.26) C or worse range: [0, 12.66) The curve
More informationECE450H1S Software Engineering II Tutorial I Web Services
Tutorial I Web Services 1. What is a Web Service? 2. An example Web Service 3. OmniEditor: Wrapping a text editor into a WS 4. OmniGraphEditor: supporting a graphic editor References Gustavo Alonso, Fabio
More informationInstructions for writing Web Services using Microsoft.NET:
Instructions for writing Web Services using Microsoft.NET: Pre-requisites: Operating System: Microsoft Windows XP Professional / Microsoft Windows 2000 Professional / Microsoft Windows 2003 Server.NET
More information@WebService OUT params via javax.xml.ws.holder
@WebService OUT params via javax.xml.ws.holder Example webservice-holder can be browsed at https://github.com/apache/tomee/tree/master/examples/webservice-holder With SOAP it is possible to return multiple
More information[MS-SPLCHK]: SpellCheck Web Service Protocol. Intellectual Property Rights Notice for Open Specifications Documentation
[MS-SPLCHK]: Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open Specifications documentation for protocols, file formats, languages,
More informationNotes. IS 651: Distributed Systems 1
Notes Case study grading rubric: http://userpages.umbc.edu/~jianwu/is651/case-study-presentation- Rubric.pdf Each group will grade for other groups presentation No extra assignments besides the ones in
More informationCandidate Resume Data API
Candidate Resume Data API Version 1.03 gradleaders.com Table of Contents 614.791.9000 TABLE OF CONTENTS OVERVIEW... 1 EXAMPLE CODE... 1 WEB SERVICE... 1 Invocation Result... 1 Configuration... 1 Method
More informationnamespace Tst_Form { private: /// <summary> /// Required designer variable. /// </summary> System::ComponentModel::Container ^components;
Exercise 9.3 In Form1.h #pragma once #include "Form2.h" Add to the beginning of Form1.h #include #include For srand() s input parameter namespace Tst_Form using namespace System; using
More informationWSDL Document Structure
WSDL Invoking a Web service requires you to know several pieces of information: 1) What message exchange protocol the Web service is using (like SOAP) 2) How the messages to be exchanged are structured
More informationDeveloping JAX-RPC Web services
Developing JAX-RPC Web services {scrollbar} This tutorial will take you through the steps required in developing, deploying and testing a Web Service in Apache Geronimo. After completing this tutorial
More informationWeb services are a middleware, like CORBA and RMI. What makes web services unique is that the language being used is XML
Web Services Web Services Web services are a middleware, like CORBA and RMI. What makes web services unique is that the language being used is XML This is good for several reasons: Debugging is possible
More informationSOA & Web services. PV207 Business Process Management
SOA & Web services PV207 Business Process Management Spring 2012 Jiří Kolář Last lecture summary Processes What is business process? What is BPM? Why BPM? Roles in BPM Process life-cycle Phases of process
More informationCMR College of Engineering & Technology Department of Computer Science & Engineering
Class:M.Tech(CSE) I Year-II Sem Faculty:K.Yellaswamy Date:03.07.2015 (B1532) WEB SERVICES LAB 1. Write a Program to implement WSDL Service (Hello Service,WSDL File) Using JAX-WS Web Service.we will see
More informationLampiran B. Program pengendali
Lampiran B Program pengendali #pragma once namespace serial using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms;
More informationWhat is Web Service. An example web service. What is a Web Service?
What is Web Service Tutorial I Web Services 1. What is a Web Service? 2. An example Web Service 3. OmniEditor: Wrapping a text editor into a WS 4. OmniGraphEditor: supporting a graphic editor References
More informationImplementation Guide for the ASAP Prescription Monitoring Program Web Service Standard
ASAP Implementation Guide for the ASAP Prescription Monitoring Program Web Service Standard Bidirectional Electronic Connections between Pharmacies, Prescribers, and Prescription Monitoring Programs Version
More informationNORTHPOINTE SUITE WEB SERVICES ARCHITECTURE
NORTHPOINTE SUITE WEB SERVICES ARCHITECTURE Table of Contents LDAP LOGIN 2 APPLICATION LOGIN 4 LIST REFERENCE CODES 9 STORE REFERENCE CODES 14 LIST AGENCIES 18 GET AGENCY ID 23 LIST SECURITY GROUPS 27
More informationBuilding non-windows applications (programs that only output to the command line and contain no GUI components).
C# and.net (1) Acknowledgements and copyrights: these slides are a result of combination of notes and slides with contributions from: Michael Kiffer, Arthur Bernstein, Philip Lewis, Hanspeter Mφssenbφck,
More informationDistributed Object Systems
Overview! Goals object-based approach hide communication details! Advantages more space more CPU redundancy locality Problems! Coherency ensure that same object definition is used! Interoperability serialization
More informationSOAP Primer for INSPIRE Discovery and View Services
SOAP Primer for INSPIRE Discovery and View Services Matteo Villa, Giovanni Di Matteo TXT e-solutions Roberto Lucchi, Michel Millot, Ioannis Kanellopoulos European Commission Joint Research Centre Institute
More informationVSCM PackageHub API Reference Documentation
VSCM PackageHub API Reference Documentation Document Version 1.0 - May 6, 2017 Table of Contents 1. Overview... 3 1.1. Introduction... 3 1.2. Conventions and Features... 3 1.3. Security Token Authentication...
More information02267: Software Development of Web Services
02267: Software Development of Web Services Week 3 Hubert Baumeister huba@dtu.dk Department of Applied Mathematics and Computer Science Technical University of Denmark Fall 2016 1 Recap www.example.com
More informationSOAP and Its Extensions. Matt Van Gundy CS 595G
SOAP and Its Extensions Matt Van Gundy CS 595G 2006.02.07 What is SOAP? Formerly Simple Object Access Protocol Abstract Stateless Messaging Protocol Another XML-based Meta-Standard SOAP Processing Model
More informationGuide: SOAP and WSDL WSDL. A guide to the elements of the SOAP and WSDL specifications and how SOAP and WSDL interact.
Guide: SOAP and WSDL A guide to the elements of the SOAP and WSDL specifications and how SOAP and WSDL interact. WSDL Definitions Type_Declarations Messages Operations Request-Response One-way Solicit-Response
More informationIntroduzione ai Web Services
Introduzione ai Web s Claudio Bettini Web Computing Programming with distributed components on the Web: Heterogeneous Distributed Multi-language 1 Web : Definitions Component for Web Programming Self-contained,
More informationDeveloping Applications for the Java EE 7 Platform 6-2
Developing Applications for the Java EE 7 Platform 6-2 Developing Applications for the Java EE 7 Platform 6-3 Developing Applications for the Java EE 7 Platform 6-4 Developing Applications for the Java
More information@WebService handlers
@WebService handlers with @HandlerChain Example webservice-handlerchain can be browsed at https://github.com/apache/tomee/tree/master/examples/webservicehandlerchain In this example we see a basic JAX-WS
More informationCisco CallManager 4.1(2) AXL Serviceability API Programming Guide
Cisco CallManager 4.1(2) AXL Serviceability API Programming Guide This document describes the implementation of AXL-Serviceability APIs that are based on version 3.3.0.1 or higher. Cisco CallManager Real-Time
More informationMedia Object Server Protocol v Table of Contents
Media Object Server (MOS ) Media Object Server Protocol v3.8.3 Table of Contents 3.2.6 4. Other messages and data structures 4.1. Other messages and data structures 4.1.1. heartbeat - Connection Confidence
More informationID2208 Programming Web Services
ID2208 Programming Web Services Service description WSDL Mihhail Matskin: http://people.kth.se/~misha/id2208/index Spring 2015 Content WSDL Introduction What should service describe Web service description
More informationNo Trade Secrets. Microsoft does not claim any trade secret rights in this documentation.
[MS-RDWR]: Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open Specifications documentation for protocols, file formats, languages,
More informationSOAP, WSDL, HTTP, XML, XSD, DTD, UDDI - what the?
SOAP, WSDL, HTTP, XML, XSD, DTD, UDDI - what the? By Aaron Bartell Copyright Aaron Bartell 2013 by Aaron Bartell aaron@mowyourlawn.com Agenda Why are we at this point in technology? XML Holding data the
More informationName: Course:.NET XML Web Services Title: : Unit 4/5 Subject: Web Services Instructor: Bill Buchanan Alistair Lawson.NET
Name: Course:.NET XML Web Services Title: 70-320: Unit 4/5 Subject: Web Services Instructor: Bill Buchanan Alistair Lawson.NET 70-320 UNIT 4/5 WEB SERVICES 3 4.1 Introduction 3 4.2 SOAP (Simple Object
More information02267: Software Development of Web Services
02267: Software Development of Web Services Week 4 Hubert Baumeister huba@dtu.dk Department of Applied Mathematics and Computer Science Technical University of Denmark Fall 2016 1 Recap SOAP part II: SOAP
More information[MS-RDWR]: Remote Desktop Workspace Runtime Protocol. Intellectual Property Rights Notice for Open Specifications Documentation
[MS-RDWR]: Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open Specifications documentation ( this documentation ) for protocols,
More informationOGSI.NET UVa Grid Computing Group. OGSI.NET Developer Tutorial
OGSI.NET UVa Grid Computing Group OGSI.NET Developer Tutorial Table of Contents Table of Contents...2 Introduction...3 Writing a Simple Service...4 Simple Math Port Type...4 Simple Math Service and Bindings...7
More informationTransport (http) Encoding (XML) Standard Structure (SOAP) Description (WSDL) Discovery (UDDI - platform independent XML)
System Programming and Design Concepts Year 3 Tutorial 08 1. Explain what is meant by a Web service. Web service is a application logic that is accessible using Internet standards. A SOA framework. SOA
More informationIntroduction to the Cisco ANM Web Services API
1 CHAPTER This chapter describes the Cisco ANM Web Services application programming interface (API), which provides a programmable interface for system developers to integrate with customized or third-party
More informationWhy SOAP? Why SOAP? Web Services integration platform
SOAP Why SOAP? Distributed computing is here to stay Computation through communication Resource heterogeneity Application integration Common language for data exchange Why SOAP? Why SOAP? Web Services
More informationDeveloping a Service. Developing a Service using JAX-WS. WSDL First Development. Generating the Starting Point Code
Developing a Service Developing a Service using JAX-WS WSDL First Development Generating the Starting Point Code Running wsdl2java Generated code Implementing the Service Generating the implementation
More informationCase Study Accessing Web Services from J2ME Devices
Case Study Accessing Web Services from J2ME Devices Principal: Students: Dr. M.C.J.D. van Eekelen Ravindra Kali [0436690] Roel Verdult [442259] Radboud University Nijmegen Master of Informatics 2 e semester
More informationSOAP Introduction Tutorial
SOAP Introduction Tutorial Herry Hamidjaja herryh@acm.org 1 Agenda Introduction What is SOAP? Why SOAP? SOAP Protocol Anatomy of SOAP Protocol SOAP description in term of Postal Service Helloworld Example
More informationAPI Developer Notes. A Galileo Web Services Java Connection Class Using Axis. 29 June Version 1.3
API Developer Notes A Galileo Web Services Java Connection Class Using Axis 29 June 2012 Version 1.3 THE INFORMATION CONTAINED IN THIS DOCUMENT IS CONFIDENTIAL AND PROPRIETARY TO TRAVELPORT Copyright Copyright
More informationArtix ESB. Bindings and Transports, Java Runtime. Version 5.5 December 2008
Artix ESB Bindings and Transports, Java Runtime Version 5.5 December 2008 Bindings and Transports, Java Runtime Version 5.5 Publication date 18 Mar 2009 Copyright 2001-2009 Progress Software Corporation
More informationIHS Haystack Web Services Quick Start Guide April 2014
IHS Haystack Web Services Quick Start Guide April 2014 Table of Contents: Overview Methods GetFLISBriefResultsByCAGECodeAndPartNumber GetFLISBriefResultsByPartNumber GetFLISSummaryResultsByMultipleNIINs
More informationIDoc based adapterless communication between SAP NetWeaver Application Server (SAP NetWeaver AS) and Microsoft BizTalk Server
Collaboration Technology Support Center Microsoft Collaboration Brief August 2005 IDoc based adapterless communication between SAP NetWeaver Application Server (SAP NetWeaver AS) and Microsoft BizTalk
More informationThe Microsoft.NET Framework
Microsoft Visual Studio 2005/2008 and the.net Framework The Microsoft.NET Framework The Common Language Runtime Common Language Specification Programming Languages C#, Visual Basic, C++, lots of others
More informationFax Broadcast Web Services
Fax Broadcast Web Services Table of Contents WEB SERVICES PRIMER... 1 WEB SERVICES... 1 WEB METHODS... 1 SOAP ENCAPSULATION... 1 DOCUMENT/LITERAL FORMAT... 1 URL ENCODING... 1 SECURE POSTING... 1 FAX BROADCAST
More informationConvertor Binar -> Zecimal Rosu Alin, Calculatoare, An2 Mod de Functionare: Am creat un program, in Windows Form Application, care converteste un
Convertor Binar -> Zecimal Rosu Alin, Calculatoare, An2 Mod de Functionare: Am creat un program, in Windows Form Application, care converteste un numar binar, in numar zecimal. Acest program are 4 numericupdown-uri
More informationPage 1 of 6 MSDN Home MSDN Magazine April 2003 XML Files: Web Services and DataSets Web Services and DataSets Aaron Skonnard Get the sample code for this article. rogrammers using Visual Basic 6.0 have
More informationSoftware Service Engineering
VSR Distributed and Self-organizing Computer Systems Prof. Gaedke Software Service Engineering Prof. Dr.-Ing. Martin Gaedke Technische Universität Chemnitz Fakultät für Informatik Professur Verteilte und
More informationSupport For assistance, please contact Grapevine: or
External OBS (incorporating Double Opt-in) User Manual Version 1.3 Date 07 October 2011 Support For assistance, please contact Grapevine: +27 21 702-3333 or email info@vine.co.za. Feedback Was this document
More informationUse the Call Web Service action.
How to Use the Call Web Service action. Background The Call Web Service action is for advanced users and allows the workflow to make a call to a SOAP web service method. This can be used to create/edit/delete
More informationNow find the button component in the tool box. [if toolbox isn't present click VIEW on the top and click toolbox]
C# Tutorial - Create a Tic Tac Toe game with Working AI This project will be created in Visual Studio 2010 however you can use any version of Visual Studio to follow along this tutorial. To start open
More informationArtix Bindings and Transports, C++
Artix 5.6.4 Bindings and Transports, C++ Micro Focus The Lawn 22-30 Old Bath Road Newbury, Berkshire RG14 1QN UK http://www.microfocus.com Copyright Micro Focus 2015. All rights reserved. MICRO FOCUS,
More informationWeb Services. GC: Web Services Part 2: Rajeev Wankar
Web Services 1 Web Services Part II 2 Web Services Registered using JAXR, JUDDI, UDDI4J X! 3 Client-Service Implementation Suppose we have found the service and have its WSDL description, i.e. got past
More informationSOAP Encoding. Reference: Articles at
SOAP Encoding Reference: Articles at http://www.ibm.com/developerworks/ SOAP encoding styles SOAP uses XML to marshal data SOAP defines more than one encoding method to convert data from a software object
More informationNo Trade Secrets. Microsoft does not claim any trade secret rights in this documentation.
[MS-OXWOOF]: Intellectual Property Rights Notice for Open Specifications Documentation Technical Documentation. Microsoft publishes Open Specifications documentation for protocols, file formats, languages,
More informationSOAP Encoding, cont.
Data Encoding Knowing that two distributed systems support packaging and processing data with SOAP is not enough to get the two systems to interoperate. You must also define how the payload of the package
More informationStarMail Technical Manual. Efficient Communication with Your Target Group via
StarMail 4.2.0 Technical Manual Efficient Communication with Your Target Group via e-mail StarMail 4.2.0 - Technical Manual - Version 1.0 Copyright 2008 Netstar AB. Netstar AB. Box 3415, 103 68 Stockholm,
More informationQ&A. DEMO Version
UPGRADE: MCSD Microsoft.NET Skills to MCPD Enterprise Application Developer: Part 2 Q&A DEMO Version Copyright (c) 2010 Chinatag LLC. All rights reserved. Important Note Please Read Carefully For demonstration
More informationWeb Services Reliable Messaging TC WS-Reliability
1 2 3 4 Web Services Reliable Messaging TC WS-Reliability Working Draft 0.992, 10 March 2004 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 Document identifier: wd-web services reliable
More informationWeb Services Foundations: SOAP, WSDL and UDDI
Web Services Foundations: SOAP, WSDL and UDDI Helen Paik School of Computer Science and Engineering University of New South Wales Alonso Book Chapter 5-6 Webber Book Chapter 3-4 Mike Book Chapter 4-5 References
More information