190 likes | 303 Views
Presentation 10 SOAP on the Microsoft Platform (.NET). Outline. You have already been introduced to SOAP, WSDL & UDDI on the JAVA platform using AXIS Now we will take a look at the MS . NET platforms SOAP capabilities
E N D
Outline • You have already been introduced to SOAP, WSDL & UDDI on the JAVA platform using AXIS • Now we will take a look at the MS . NET platforms SOAP capabilities • Luckily – SOAP & WSDL are well standardized – so we do not need to look at these again • Instead we will: • Show the counterpart of the AXIS project in .NET - IIS • Show the alternatives to JAVA development – using the tools from Microsoft Visual Studio .NET
Apache Tomcat vs. Microsoft Internet Information Server • Apache Tomcat with AXIS & J2SE Java SDK • Works on: • Windows, UNIX, LINUX • Open source Can be compiled to any platform (with some work) • Server listening for events: • HTTP on port 8080 (optional) • Executes Servlets/JSP • AXIS is an embedded project within the Tomcat environment but works with most J2EE compliant AS • Microsoft Internet Information Server with the .NET Framework SDK (ASP.NET) • Works on: • Only Windows • Server listening for events: • HTTP on port 80 (optional) • Executes Web resources – ASP.NET, Web services, Web forms (resulting in client side HTML ) • Tightly integrated with the Visual Studio .NET – for easy deployment & debugging Common code base – but only MS! Web Server MS Internet Information Server & the .NET Framework SDK (ASP.NET) (vs. Apache Tomcat, with AXIS & J2SE SDK) SOAP Client Java, C++, C#, Delphi, VB Application Web Forms C++ unman. SOAP over HTTP Web Service Managed code
Web service enabling Windows • You need to: • Install .NET Framework SDK • Download from Microsoft (130 MB) • Install Internet Information Server • Enabled via the Control Panel • Visual Studio .NET • Already installed (7 or 7.1) • More detailed instructions will follow for the LAB exercise
Not a Windows ASP.NET course • You will NOT be required to be an expert on .NET • You will be required to be knowledgeable about it • ASP.NET is a framework for Web enabling Windows code • Traditional HTML & DHTML – and Web services • Complete architecture
Ressources for learning more • Feel free to learn more about ASP.NET: • Getting started with the .NET framework • http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcongettingstartedwithnetframework.asp • Link can be found at the course site • Books on the subject • Beginning .NET Web Services using C# by Joseph Bustos and Karli Watsom (WROK forlag) • More will be listed on the course site
Making the HelloWorld application • Using Notepad ! • Using Microsoft Visual Studio .NET • First: • Install .NET Framework • Install IIS • Then: • Produce code • Manually for Notepad • Wizard for Visual Studio • Deploy in the IIS folder • \inetpub\wwwroot\ • As an .asmx file • Test the Webservice • Using the build in functionality • Write the Client – and all is well
Developing the Client application • Support for using Web services in an Visual Studio application • Stubs are automatically compiled by Visual Studio
Visual Studio produces a Proxy DLL Performed by Visual Studio tool: a DLL is generated (Web Service Proxy Generator), and a header file and a WSDL support document is made available
Heterogeneous system C# to Java // Hello World.Java public class HelloWorld { public HelloWorld() { } public String getHelloWorldMessage(String name) { return "Hello World to "+name; } } private void button1_Click(object sender, System.EventArgs e) { localhost.HelloWorldService hello = new localhost.HelloWorldService(); textBox1.Text = hello.getHelloWorldMessage("Stefan"); } Proxy DLL stub generated by VS Proxy DLL skeleton generated by AXIS
Try it with C++ • WARNING: In VS7 there seems to be a bug! • Need to manually paste the WSDL file and compile the proxy stub DLL • This works fine in C# • No problem in VS7.1