Friday, September 30, 2005

CodeCamp: Execution Environment and Business Modelling Langauage

We had organised the DBE CodeCamp yesterday. The focus was the Execution Environment (ExE) and Business Modelling Langauage (BML). We helped the Software Developers to implement the ExE in their laptops and facilitated the discovery and consumption of a DBE 'Date Service' through a local Wifi and wired network. Conversion of an existing WSDL using WSDL2Java was also demonstrated and a service was consumed through this conversion. Eclipse was briefly introduced to the participants.

The concept of Business Modelling was discussed in great detail explaining the current disadvantages in the information content presented through WSDL and the need for complex information to manage B2B transactions. The BML structure, its alignment to Model Driven Architecture (MDA) and the individual packages were described. Three basic industry models - Manufacturer, Retailer and Broker Business Models were presented using a BML template.

Tuesday, September 27, 2005

Meteor-S

The Meteor-S project from University of Georgia is focusing on extending the capabilities of Web Services to address the issues of dynamism and scalability. The research areas such as Peer-2-Peer (P2P), Semantics, Ontologies, Domain Models, etc. have some interesting correlations to the DBE project.

The diagram below presents the working components of Meteor-S




Meteor-S main contacts are : Prof. Amit Sheth, Prof. John Miller
The coordinator of the project is: Kunal Verma
Industry collaboration: IBM TJ Watson
The project is partially contributed by: IBM Eclipse Grant 2004, IBM Faculty Award to Dr. Sheth 2004

Thursday, September 22, 2005

e-Business: The Way Forward


(source: europa.eu.int)

We have been invited (Nagaraj will be speaking) as part of the DBE project to the "e-Business:The Way Forward" conference, organised by the European Commission's Enterprise & Industry DG.

The conferece will be held the 5th and 6th Dec 2005 in Camdbridge, UK.

The full URL of the conference is:

http://europa.eu.int/comm/enterprise/ict/conferences/cambridge.htm

From the website:

WHY YOU SHOULD ATTEND
  • The Conference brings together policy-makers, academics and stakeholders from across the European e-business community.

  • An unrivalled opportunity to interact, discuss ideas and build relationships.

  • A varied programme addressing the critical issues in this dynamic field.

  • A choice of sessions to gain in-depth knowledge of the topics of most interest to you.

  • A chance to help establish priorities for policy actions on e-business related issues at both national and European level.

  • Keynotes by Richard Ellis, Chair, EEDA; Soumitra Dutta, Dean of Executive Education, INSEAD; David White, Director for Innovation Policy, DG Enterprise and Industry, European Commission.

KEY ISSUES TO BE ADDRESSED

  • taking stock of public policy initiatives promoting the take-up of e-business practices by European enterprises, particularly SMEs;

  • the status of e-business uptake by European enterprises, notably at the sectoral level;

  • recent developments in the area of e-skills;

  • progress in removing cross-border legal barriers for electronic business, including B2B markets;

  • ongoing work in the areas of standardisation and the interoperability of e-business solutions;

  • initial experiences of the "digital ecosystem" approach for activating networks of local SMEs;

  • the way forward for e-business policy development.

Monday, September 19, 2005

DBE Node Upgrade



We have upgraded our DBE node (DBE ExE) to version 0.1.5 (from 0.1.4).

The DBE ExE can downloaded at:

http://swallow.sourceforge.net/


See the changelog for this release.
http://swallow.sourceforge.net/distribution/changes-report.html

Wednesday, September 14, 2005

Bioteam


The Bumble Bee blog is very interesting and make reference to a lot of activities being done by the DBE project. For instance, the author makes a reference to the concept of competitive environments created by business networks and the formation of business ecosystems led by key players in the industry. The blog has links to a lot of great content that link the aspects of business with nature. The DBE project uses similar views to explore business complexities. Uses these for understanding key terms such as predation, symbiosis, evolution...and for sense making of these issues in the business world in order to help companies grow.

New Google Blog Search Service

Google has released a new search service for blogs, BlogSearch.

We've tried to search for this blog and it comes right there on the first page!!. While this is not that important, it is nice to see that our blog is indexed as relevant to the "Business Ecosystems" search term.

Also, we can see there also the blogs from our SME Drivers such as Nemein.



Disclaimer: Blogger is own by Google.

Saturday, September 10, 2005

From WebService to DBE Service

Files: UCEDateExampleWithWS.zip

The learning objective of this tutorial is to show how a WebService can be ported quickly to the DBE ExE. To illustrate such a process, we will
use UCEDateExample from the first tutorial, creating a WebService with identical functionality (returning of a java.util.Date object) and then porting it back to the DBE while the actual implementation of the service is a WebService. In this case, the DBE is used as a Service Bus while the the physical service still lives on its original server.

While this tutorial is fairly long, this is due to the inclusion of some basics about the creation of the WebService and installing/configuring the WebService Platform. If you want to skip these steps and use our existing WebService, please jump directly to section "
Generating the Stub from WSDL" after you install Axis.


In a typical scenario, a WebService is consumed via a client, which could be a simple command-line based application (see the architectural diagram below) or a more sophisticated one.



After the tutorial, our architecture could resemble the previous diagram, with the consumption of our WebService via the standard WebService client or as a DBE Service.

The tutorial has the following sections:

  • Requirements
  • Installing Tomcat and Axis
  • Deploying the WebService
  • Testing the WSDL
  • Testing the WebService
  • Generating the Stub from WSDL
  • Porting to the DBE
  • Deployment
  • Consuming the Service
  • Conclusions

Requirements
Besides the requirements indicated in the previous tutorials (JDK, Execution Environment 1.4, etc), you will need:

  • Apache Tomcat (optional but recommended if you want to test this tutorial using your machine). (Tested with version 5.5.9)
  • Apache Axis. (Java version, tested with version 1.2.1)

Installing Tomcat (optional) and Axis

Describing Tomcat or Axis and detailing the installation process are beyond the scope of this document. Please refer to the Jakarta Tomcat or Apache Axis websites for more information.

http://jakarta.apache.org/tomcat/
http://wiki.apache.org/ws/FrontPage/Axis/AxisGeneral

You will need to install Tomcat first and then Axis (Java version). Both are fairly simple to install by just following the provided instructions. Once you have unzipped the Axis distribution, copy the “axis” directory to your webapps directory in Tomcat. The Axis website provides information about what to do and how to test if the installation is correct

Deploying the WebService
Tomcat and Axis makes the implementation/configuration and deployment of WebServices very easy and for the purposes of this tutorial we just need to create a java class defining the interface, its implementation and deploy it manually.

Similar to the previous UCEDateExample, our implementation returns a java.utilDate object when it is invoked.

DateService.java:
import java.util.Date;
public class DateService {
public Date getDate()
{
return new Date();
}
}

To deploy it, you can just rename DateService.java to DateService.jws and copy it onto the axis Directory of your webapps.

In my case, I installed Tomcat under

C:\Program Files\Apache Software Foundation\Tomcat 5.5\

And Axis under
C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis

With this configuration, we can just copy the DataService.jws to ...\webapps\axis
and Tomcat and Axis take care of the rest (compiling the java class, generating WSDL, etc).

Testing the WSDL
You need to make sure that our WebService has been deployed correctly. With my configuration, you can test this by using a web browser and navigating to:

http://dbe.dnsalias.net:8080/axis/DateService.jws


If you installed and configured Tomcat and Axis on your machine, you need to change the host name for your hostname (i.e. localhost)



By default, Tomcat runs on port 8080. If you click on the link “Click to see the WSDL”, you should obtain the WSDL of our WebService.



Testing the WebService

At this stage you require Axis. You will need axis in your classpath in order to test the WebService. The UCEDateExampleWithWS.zip contains an example of how to consume the WebService. You need to unzip the .zip file to a suitable location. In my case, I have unzipped the file to my K:\ drive.

Before you can test the WebService, you will need to tell the scripts where Axis has been installed.

In the .bat file runTestService.bat, change the axispath variable to reflect the path where you have installed Axis. (In this case, I am using the 8.3 short names convention of windows).

set axispath=

in my case, I have this value:
set axispath=k:/vxb/coding/java/axis-1~1

Once you have updated your Axis path, you can simple execute runTestService.bat and observe the output:

The previous image illustrates the ouput of the WebService, simply outputting the date of the machine where the WebService is deployed. The .zip file also contains a .bat script to compile the TestService.java class (compileTestService.bat).

At this stage, our simple WebService is deployed and running correctly.

Generating the Stubs from WSDL
In general Stubs classes are classes that allow you to instantiate local Java (or in another language) objects that act as proxies to remote objects or components, facilitating interoperability and the implementation of distributed systems.

Axis comes with an utility, WSDL2java, that allows the automatic generation of the necessary Java stubs to call our WebService as if it was local. You can find out more information about this tool on the Axis Website
http://ws.apache.org/axis/java/ant/axis-wsdl2java.html

To automatically generate the Stub, the .zip file contains a .bat script called WSDL2Java.bat. Before executing this command, please also update the axis path as done previously with the runTestService.bat

If you open the WSDL2Java.bat file, it contains the following command line:

java org.apache.axis.wsdl.WSDL2Java http://dbe.dnsalias.net:8080/axis/DateService.jws?wsdl -o . –p org.dbe.demos.uce.dateservice.ws

The WSDL2Java utility takes many more arguments. For this tutorial, we have specified:

- http://dbe.dnsalias.net:8080/axis/DateService.jws?wsdl: The location of our service and the full URL of the WSDL.
- -o .: the output will be saved under the current directory
- -p org.dbe.demos.uce.dateservice.ws: A package with that name will be created
- -v: Verbose output
- -t: Generate test cases


After the command is run, a new Java package is created containing the Stub and the necessary classes to consume our WebService. With the –t option, WSDL2Java will also generate some potential test cases contained in the DateServiceServiceTestCase.java file.

To create the previous TestService.java class, I have simply copied and pasted (and slightly modified) the code from the generated test case to the TestService.java class in the main method, and added the generated package in my imports section of the Java class.

DateServiceServiceTestCase.java (Generated Stub)
TestService.java


Also, when copying/pasting the test case to the TestService.java main method, we need to make sure to obtain a Date object rather than a Calendar one. Due to the WSDL specification, WSDL2Java has generated a Calendar object as the return type of your WebService.

In your client class, you need to change the following:

// Test operation
java.util.Calendar value = null;
value = binding.getDate();
// TBD - validate results

To:

// Test operation
java.util.Calendar value = null;
value = binding.getDate();
Date date = value.getTime()
// TBD - validate results


If you have installed Tomcat and Axis on your machine, you have to change the URL of the WSDL2Java command line to the url of the machine where the WebService is running, (such as localhost)

Porting to the DBE
At this stage, the porting to the DBE is very simple. You just need to copy the code from the test case (as it was modified in TestService.java) to your adapter. In this case, you modify the UCEDateServiceImpl.java getDate() method

from:

/**
* Returns the current date. Implementation of the example
* date service.
*
* @return current date
*/
public Date getDate() {
return new Date();
}

to:
/**
* Returns the current date. Implementation of the example
* date service using the webservice.
*
* @return current date
*/
public Date getDate() {
DateServiceSoapBindingStub binding = null;;
try
{
binding = (DateServiceSoapBindingStub)new Da
Locator().getDateService();


}
catch (javax.xml.rpc.ServiceException ex)
{
ex.printStackTrace();
return null;
}

// Time out after a minute


binding.setTimeout(60000);
// Test operation
java.util.Calendar value = null;
try
{
value = binding.getDate();
return value.getTime();
}
catch (java.rmi.RemoteException ex)
{
ex.printStackTrace();
return null;
}
}
As with the TestService.java class, you need to include the generated package with the Stub path in your import statements.

This section illustrates that porting from a standard WebService to a DBE service could be fairly simple. We have just simply copied and modified slightly the code automatically generated by the WSDL2java utility to our Adapter.

Deployment
Our deployment structure is:

UCEDateService

---------------.\UCEDateService\deployment.props

---------------.\UCEDateService\classes\UCEDateService.class

---------------.\UCEDateService\classes\UCEDateServiceImpl.class

----------------.\UCEDateService\lib\MyWebServices.jar

The deployment of our new service requires to pack the Stub classes into one file (MyWebService.jar). We need also to indicate in the deployment.props the classpath of MyWebService.jar

deployment.props:
applicationName=Simple UCEDateService with WS
adapter=UCEDateServiceImpl
proxy=UCEDateService
smid=UCEDateService
classpath=/:/lib/MyWebService.jar

The .bat script makeDeploymentFile.bat creates automatically the deployment structure andpackes it up on the deployThis.dar

To deploy the service, just open the deploy.html file and upload deployThis.dar.

Note: Before deployment it is required also to update the axis.jar in the servENT distribution to the version that you have used to generate the Stubs. From your Axis installation, copy the axis.jar onto the your-servENT\common directory (this assumes that you are doing the deployment on your local machine).

Consuming the Service
To consume the service, you simply follow the instructions of the first tutorial, by executing runClient.bat. In this case your DBE client has not changed and it is not aware that now that the service is being executed as a WebService and not as part of the Adapter.



Conclusions
This tutorial has illustrated how to port a simple WebService to the DBE ExE. With Axis WSD2java we have automated some of the tasks required to port the WebService to the DBE ExE.