|
Page Edited :
SM :
1. Quick start
1. Quick start has been edited by Lars Heinemann (Jun 10, 2008). Content:1. Quick startIf you are in a hurry to have Apache ServiceMix up and running right away, this article will provide you with some basic steps for downloading, building (when needed) and running the server in no time. This is clearly not a complete guide so you may want to check the other links in the Apache ServiceMix v3.0 - User's Guide main section for further information. All you need is 5 to 10 minutes and to follow these basic steps. BackgroundApache ServiceMix is a JBI (Java Business Integration, JSR 208) implementation that is completely open source and under the Apache License. ServiceMix v3.0 is the first official release of the JBI container by the Apache Software Foundation. Getting the softwareAt this time you have one option to get the software. The fastest and easiest way is to get the binary directly from the Apache site. Since this article is intended to help you to have Apache ServiceMix up and running in the fastest way only the binary download will be covered at this time. PrerequisitesAlthough this installation path is the fastest one, still you will need to install some software before installing ServiceMix. J2SE 1.5ServiceMix requires a Java 5 environment to run. Refer to http://java.sun.com Download binariesDepending on the platform you plan to install and run Apache ServiceMix you will select the appropriate installation image. Open a Web browser and access the following URL, there you will find the available packages for download (binaries and source code). http://servicemix.apache.org/download.html Select the file compression format compatible with your system (zip, tar.gz) by clicking directly on the link, download it and expand the binary to your hard drive in a new directory; for example in z:\servicemix - from now on this directory will be referenced as <servicemix_home>. Please remember the restrictions concerning illegal characters in Java paths, e.g. !, % etc. The installation of Apache ServiceMix is as simple as uncompressing the .zip or .tar files. The next step is to start the server. Start the serverWith Apache ServiceMix already installed, open a command line console and change directory to <servicemix_home>. To start the server, run the following command in Windows bin\servicemix respectively in Linux: bin/servicemix Once the server is started, you should see the following informations on the command line console: Starting Apache ServiceMix ESB: 3.0-incubating Loading Apache ServiceMix from servicemix.xml on the CLASSPATH INFO - JBIContainer - ServiceMix 3.0-incubatingJBI Container (ServiceMix) is starting INFO - JBIContainer - For help or more informations please see: http://incubator.apache.org/servicemix/ INFO - ComponentMBeanImpl - Initializing component: #SubscriptionManager# INFO - DeploymentService - Restoring service assemblies INFO - JBIContainer - ServiceMix JBI Container (ServiceMix) started At this point, you have Apache ServiceMix up and running and the time spent has been minimal. The following section will propose to deploy one of the sample application. In case you get a Exception in thread "main" java.lang.IllegalArgumentException you may have some illegal characters in the path, e.g. !, % etc., that cause Java not to find the files. Problems starting the Server
Deploy a sample applicationWhile you will learn in the remainder of this guide how to create and package a JBI application, we will just use the pre-built packaging for now.
Open another command line console in the <servicemix_home> directory and run the following commands in Windows copy components\servicemix-shared-*.zip install copy components\servicemix-http-*.zip install copy components\servicemix-jsr181-*.zip install respectively Linux: cp components/servicemix-shared-*.zip install cp components/servicemix-http-*.zip install cp components/servicemix-jsr181-*.zip install These commands will:
You should see the following on the command line console: INFO - AutoDeploymentService - Directory: install: Archive changed: processing servicemix-shared-3.0-incubating-installer.zip ... INFO - AutoDeploymentService - Directory: install: Finished installation of archive: servicemix-shared-3.0-incubating-installer.zip INFO - AutoDeploymentService - Directory: install: Archive changed: processing servicemix-http-3.0-incubating-installer.zip ... INFO - jetty - Logging to [EMAIL PROTECTED] via org.apache.servicemix.http.jetty.JCLLogger INFO - ComponentMBeanImpl - Starting component: servicemix-http INFO - ComponentMBeanImpl - Initializing component: servicemix-http INFO - AutoDeploymentService - Directory: install: Finished installation of archive: servicemix-http-3.0-incubating-installer.zip INFO - AutoDeploymentService - Directory: install: Archive changed: processing servicemix-jsr181-3.0-incubating-installer.zip ... INFO - ComponentMBeanImpl - Starting component: servicemix-jsr181 INFO - ComponentMBeanImpl - Initializing component: servicemix-jsr181 INFO - AutoDeploymentService - Directory: install: Finished installation of archive: servicemix-jsr181-3.0-incubating-installer.zip Now deploy a JBI Service Assembly which exposes a service over HTTP/SOAP
Windows: copy examples\wsdl-first\wsdl-first-sa-*.zip deploy Linux: cp examples/wsdl-first/wsdl-first-sa-*.zip deploy You should see the following on the command line console: INFO - AutoDeploymentService - Directory: deploy: Archive changed: processing wsdl-first-sa-3.0-incubating.zip ... INFO - ServiceAssemblyLifeCycle - Starting service assembly: wsdl-first-sa INFO - ServiceUnitLifeCycle - Initializing service unit: wsdl-first-jsr181-su INFO - ServiceUnitLifeCycle - Initializing service unit: wsdl-first-http-su INFO - ServiceUnitLifeCycle - Starting service unit: wsdl-first-jsr181-su INFO - ServiceUnitLifeCycle - Starting service unit: wsdl-first-http-su INFO - jetty - jetty-6.0.0rc4 INFO - jetty - Started SelectChannelConnector @ localhost:8192 INFO - AutoDeploymentService - Directory: deploy: Finished installation of archive: wsdl-first-sa-3.0-incubating.zip Now, open a web browser to the following location: http://localhost:8192/PersonService/main.wsdl You should see the WSDL of the web service that has just deployed! Now, open a web browser and point it to the following location: [servicemix_home]/examples/wsdl-first/client.html. Then, click on the SEND button to see the web service response.
SummaryThis article showed you how simple it is to have Apache ServiceMix up and running. The overall time for getting the server running should be less than five minutes if you have the prerequisite (Java 1.5) already installed. Additionally, this article also showed you how to deploy and test a simple Web Service in less than five minutes. |
Unsubscribe or edit your notifications preferences
