Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Wiki Markup
The first thing to do now is install the [wsdl-first|http://servicemix.org/sm30ug/1-quick-start.html#1.Quickstart-Deployasampleapplication] service assembly (SA) which contains a few service units (SU's) ([See JBI specification document|https://sdlc6a.sun.com/ECom/EComActionServlet;jsessionid=728961EE41294F2FB2547B82D037F02E]). The end result is a XFire based SOAP service which is pretty simple. The actual code for the service is in the file \[Servicemix_binary_distribution_home\]/examples/wsdl-first/wsdl-first-jsr181-su/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java. Phew\! Take a look at the code, it is pretty simple. It uses an [annotation|http://java.sun.com/j2se/1.5.0/docs/guide/language/annotations.html] which describes the class as a [jsr181|http://dev2dev.bea.com/webservices/jwsm.html] web service. One interesting thing to note about this project is the use of an ant task inside the parent pom.xml. This taks uses XFire's WsGenTask to create Java objects used by the web service, as described in the WSDL file.

Info
iconfalse
titleAbout this example

This example is a good starting place if you are interested in creating a SOAP service in Smix. After reviewing the full code you should have a grasp on creating a simple POJO web service.

Wiki Markup
So let's get this up and running in our Smix container. [Start|http://servicemix.org/sm30ug/1-quick-start.html#1.Quickstart-Starttheserver] Smix, watch the output to make sure things start up correctly. You will need to open up a new console for the next step, since the Smix output is taking up the other. You will be able to watch this output to see what is going on in some of the following steps. Go back to \[Servicemix_binary_distribution_home\]. You need to copy the components needed by the wsdl-first SA from the /components folder to the /install folder. The ones you should copy are:

...

  • Select the tab called 'MBeans'.
  • This gives a tree like structure that you can navigate through.
  • Open the node labeled 'org.apache.servicemix'. Open the 'servicemix' node.
  • Open the node labeled 'Endpoint'. You will see all the installed endpoints in your JBI environment here. There should be only one.
  • You should see a node labeled 'ServiceAssembly', open this node. You now should see one entry for wsdl-first. Click on this entry. The window to your right should now pop up some information about the SA.
  • In the right window click on the tab labeled 'Operations'. You will see four operations: start, stop, shutdown, and getDiscriptior.
  • Click the shutdown button. You will get a pop up window containing XML that tells you how the operation went. I hope that you see SUCCESS in the task-result element.
  • With the SA shutdown try to get the WSDL and use the client.html app to contact the web service. Niether will work.
  • Let us start the SA again, click the start button in the operations window. You again get a pop up with XML.
  • Try again to get the WSDL or hit the web service using the client.html app. Both should now work.

Image Modified

So this is brief but should give you a good idea of how easy it can be to manage your Servicemix instance(s).

...