160 likes | 314 Views
SOA Development and Deployment . B. Ramamurthy. Topics. We looked at a design of a basic SOA. We essentially designed the layers: enterprise, process, intermediary, basic layers. We also discovered the services in these layers. In this lecture we will look at:
E N D
SOA Development and Deployment B. Ramamurthy
Topics • We looked at a design of a basic SOA. • We essentially designed the layers: enterprise, process, intermediary, basic layers. • We also discovered the services in these layers. • In this lecture we will look at: • Components of a web services software • Framework needed to develop, deploy and consume web services
Develop and deploy SOA • Language and a platform (Java on Windows, Java on Linux, or Java on Solaris) • IDE for development (Netbeans, Eclipse, BEA Weblogic, IBM’s Websphere, Oracle JDevloper) • Application Server/Container for deployment (Apache’s Tomcat, IBM’s Axis, Sun’s JWS, Sun’s Glassfish, Oracle’s IAS) • Build tools (Apache Ant, Unix Make utility) and project management tools (Apache Maven) • Web server for web clients (Microsoft’s IIS, Netscape, Mozilla Firefox) • Testing tools such as JUnit or NUnit testers that are usually packaged with an IDE • And then there are standards WC3’s, WS-I, WS-*
Your Choice • {Linux, Java 5 EE, Glassfish, Ant, Maven, command line} • {Linux, Java 5 EE, Glassfish, Ant, Eclipse} • {Windows, Java 5 EE, Java Web Server (JWS), Ant, Netbeans} • {Windows, .NET C#, Visual Studio .NET, its build tools} • {Open source stack: Linux, Apache, MySQL, PHP: LAMP; no particular IDE}
Client WSDL/ Endpoint impl Stub Proxy WS Runtime (APIs) WS Runtime (APIs) Transport Transport Application Architecture SOAP over HTTP
Develop/Deploy (DD) Cycle (server side) • Devlop/deploy cycle uses wscompile and wsdeploy tools to create “artifacts” • Wscompile is invoked on a service endpoint interface or WSDL to generate artifacts specified by Java-WS specs and a model file. • A model is a Java-WS representation of a web service generated by wscompile, usually in .xml.gz file. • Artifacts generated by wscompile are bundled together to form a war file along with a deployment descriptor (raw WAR file). Raw WAR file contains portable artifacts. • wsdeploy tool takes this raw WAR file as an input, processes it and generates a WAR file (cooked WAR file) which can be deployed in a servlet container, exposing web service and associated WS to a client. Cooked WAR file contains implementation-specific artifacts.
Develop/ Deploy Cycle Service Endpoint Interface wscompile Portable artifacts WSDL Model wsdeploy Deployment Descriptors Cooked WAR Deployed in a container
Invocation Model (client side) or Invoke Cycle wscompile Portable artifacts WSDL Implementation -specific artifacts Client code Client Invoke web service
wscompile • Tool to generate client-side and server-side artifacts (support files) required by Java-WS. • It can run from the shell using wscompile [options] config_file Ex: wscompile –gen –classpath lib/foo.jar;/bar.jar – generated config.xml Ant task for wscompile is somewhat like this: <wscompile gen = true base = “${build}” classpath = “xyz.jar” config = “config.xml’>
cinfig.xml • Configuration file is the primary source of information for wscompile tool. • The xml file has elements for service, wsdl, modelfile etc. • End point definitions for server and port number are also specified.
wsdeploy tool • wsdeploy tool is used to generate a WAR file that can be deployed in a container such as Tomcat, J2EE Glasfish, JBoss. • It takes a raw WAR file that contains a service endpoint interface, a service endpoint implementation, any value types, any service-specific exceptions, a model file, a deployment descriptor and generates an implementation-specific cooked WAR file. • This generates serializers, ties, runtime descriptors, other files needed for runtime deployment. • You will use an ant task to generate the war.
Apache Ant Tool • Ant tool is an XML based build tool. • Ant requires its config files to be specified in XML format. • Config file build.xml has general commands for ant tool. • Ant tool is used for build, deploy, and run java applications. • See these tutorial for more information on ant: Ant Book Chapter: http://www.oreilly.com/catalog/anttdg/chapter/ch01.pdf
Lets Review Basics with Netbeans • Java class • Java Application • Develop and execute Java program with Netbeans IDE • Simple WS and WS client • Lets study the client semantics • Lets understand ports, end points and WSDL
Netbeans documents • www.netbeans.org • http://www.netbeans.org/kb/55/quickstart-webapps.html • http://www.netbeans.org/kb/55/javase-intro.html • Also look at the help available within the IDE.
Summary • We learned how to create a simple web service, develop and deploy it and consume it in different types of clients. • This exercise forms the basis for the composite SOA application you will be building for this course.