Thursday, November 5, 2009

Better Open Source Enterprise C++ Web Services-webinar

I will be doing a webinar on WSF/C++ on 10th November. If you are looking to incorporate native web services stack in your web services solution, this webinar will be of great value for you to evaluate WSF/C++ and get to know the capabilities and get started and what's more its free. This webinar will be a technical oriented one with covering lots of details on how you can use WSF/C++ framework.

wsf-c  -banner-ot

Registration for webinar is now open. Looking forward to seeing lots of you turn-up for the webinar. :)

Friday, October 30, 2009

WSF/C++ Code generation Tool

WSF/C++ comes with the build in code generation tool which allows you to generate Client Stubs and Service Skeletons in C++ by pointing to a WSDL.

If you downloaded the windows binary zip file, you will get the code generation tool binary jar files. If you download the source distribution, you will have to build the tool before using it.

1. Building from the source.  On Linux.

In the outermost directory of the source distribution, the build script for building the codegen tool is available. It is named build_codegen.sh.

First you need to build and install wsf/cpp to a preferred location. .you would need to download and install maven2. Then specify the directory where you have build and installed the wsf/cpp.

Example,

I have installed the wsfcpp to the location /home/nandika/wsfcpp.  directory.

$ sh build_codegen.sh /home/nandika/wsfcpp.

This would build and copy the jar files and codegen scripts to the directory /home/nandika/wsfcpp/bin/codegen/ directory.

2. Building from the source, on Windows

On windows, again, you need to have installed mavan2. First edit the configure.in file and run the build.bat file located in the outermost directory of the source distribution in order to build and make the binary dist.

Next run the build_codegen.bat file to build the code generation tool jar files from the source.  Next run the copy_codegen.bat file to copy the code generation tool and its scripts to the bin directory of the binary distribution. It will be located in the directory bin\tools\codegen directory.

3. Codegen tool Options

Code Generation tools provides you will multiple options. 

Some of the most common options are

1. –uri –> Specify the uri to the wsdl

2. –d    -> Data binding option ( This can be either adb or none )

3. –u   -> Unpack classes option

4. –0   -> Specify the output directory

5. –uw –> Unwrapped mode ( allows you to generate simple parameters for operations instead of data binding classes )

6 –ss    -> Generate Service Code

7. –sd  -> Generate Service deployment descriptors and build files ( services.xml and build.sh )

An example code generation command.

wsdl2cpp.sh –uri calculator.wsdl –d adb –u –uw –o calculator

This command instruct the codegen script to use the calculator.wsdl file located in the same directory and generate client side code ( default ) with adb data binding and use the unwrapped mode. It will output the generated source code to the calculator directory.

Sunday, October 18, 2009

WSO2 WSF/C++ 2.1.0 Released

We are pleased to announce the release of WSO2 Web Services Framework for C++ 2.1.0 release.  With this 2.1 release comes some very useful usability enhancements in addition to many improvements to the framework.

Now the code generator tool is able to generate visual studio project files for the generated code. In addition, we have released an eclipse plug-in wizard alone with this release, which provides a comprehensive GUI interface to the code generator tool. This will allow the users who are working within eclipse IDE to generate code without having to leave the IDE.

We have done some work to improve the performance of the WSF/C framework within this period of time. In addition, the many shortcomings  in the code generation tool has been addressed from the previous release.New samples were added. Also some platform specific issues have been addressed in this release which allowed WSF/C++ to be complied in both MacOS as well as Solaris without having to do any changes.

You can download the 2.1 release from here.  Also download the Eclipse Codegen Wizard Plugin if your prefer to work in eclipse.

Here is the complete release note.

WSO2 Web Services Framework for C++ (WSO2 WSF/C++) 2.1.0 Released

=================================================================

WSO2 WSF/C++ team is pleased to announce the release of WSO2 WSF/C++ 2.1.0.

You can download this release from: http://wso2.org/downloads/wsf/cpp

WSO2 Web Services Framework for C++ (WSO2 WSF/C++) is a standards compliant, enterprise

grade, open source, C++ library for providing and consuming Web services in C++, based on the popular,

WSO2 WSF/C library.

Project home page:

http://wso2.org/projects/wsf/cpp

-------------

Key Features

=============

1. Client API to consume Web services

      * ServiceClient class with one-way and two-way service invocation support

        for SOAP 1.1, and SOAP 1.2.

      * Options class to facilitate configuring the client for both SOAP and REST options.

2. Service API to provide Web Services

      * ServiceSkeleton class to extend from to implement services.

2. Attachments with MTOM

      * Binary optimized

      * Non-optimized (Base64 binary)

      * Attachment Caching Support

3. WS-Addressing

      * Version 1.0

      * Submission

4. WSPolicy

5. WS-Security

      * Username Token

      * Timestamp Token

      *  Signing

      *  Encryption

      * WS-SecurityPolicy based configuration 

      * Reply detection

      * WS-Trust

      * WS-Secure Conversation  

6. Code generation Tool

      * By providing a wsdl and options, generate client stubs and service skeletons

        in C++ using the code generation tool.

      * A Code generation Eclipse plugin is also available with this release. The code generation tool

has been integrated into an eclipse plugin wizard which allows a user to conveniently

utilise the code generation tool while working within eclipse.

7. SSL enabled transport layer

8. WS-Reliable Messaging

9. Has all the capabilities available from WSF/C library.

--------------------------------

Major Changes Since Last Release

================================

1. Eclipse plugin for code generation tool added.

2. Visual Studio project file generation is added to the code generation tool.

3. Documentation Improved.

4. Many bugs fixed in the code generation tool.

5. Many memory leak fixes.

6. More samples have been added.

7. The Service API has been enhanced to allow users to extend from the generated skeleton classes.

-------------------

Known Issues

-------------------

There could be memory leaks in some scenarios.

-------------------

Reporting Problems

===================

Issues can be reported using the public JIRA available at:

https://wso2.org/jira/browse/WSFCPP

-----------

Contact Us

===========

Mailing Lists

-------------

Please subscribe to our user or developer mailing lists. For details on how

to subscribe please visit: http://wso2.org/mail

Discussion Forums

-----------------

Questions could be raised using the WSF/C++ forum.

http://wso2.org/forum/352

Training

========

WSO2 Inc. offers a variety of professional Training Programs which includes training on WSF/C++.

For additional information please refer to http://wso2.com/training/

Support

========

WSO2 Inc. offers a variety of development and production support programs, ranging from Web-based

support up through normal business hours, to premium 24x7 phone support.

For additional support information please refer to http://wso2.com/services/support/

We welcome your early feedback on this implementation.

Thank you for your interest in WSO2 WSF/C++.

-- WSO2 WSF/C++ Team --

Monday, October 12, 2009

SOA Workshop

us-soa-workshop-banner

Here is an opportunity to get hands on experience on implementing SOA. You can find more details here. http://ww2.wso2.org/~nandika/soa-workshop.pdf. and of course visit http://wso2.com to register.

Tuesday, September 22, 2009

Netbeans project for WSF/C++

If you are working on WSF/C++ or on your own project using WSF/C++ then it is very easy to develop on Netbeans 6.5 C++ plugin which is a very good ide for C++ development.

Following are the main features that attracted me towards Netbeans/C++ ide.

1. Very good navigation features.
2. Easy to get started
3. No-nonsense user interface with it's intuitive features
4. Feature rich editor(Still nowhere to compare with vi. But generally very good compared to similar ide's)
5. Obtain variable, method list for instances including inherited variable/methods

One of the main caveat I see so far is I could not still find a way to select a file and compile only that file. But considering the many other useful features that come with Netbeans 6.5 C++ ide I could easily ignore it. Besides I still prefer to build and debug using my favourite command line tools vi, gdb and valgrind.

First you need to install Netbeans/C++. If you are on Ubuntu then just do
apt-get install netbeans
Then after starting the ide go to main menu's tools->plugins dialog box and select Available Plugins tab. From there select C/C++ plugin and install it.
Now when you create a new project a C/C++ project option appear.

There are many options that you can use to create a new project. What I did was to create a Netbeans project from existing source. I created the project with an existing Makefile. That means prior to create the project I have already created the makefiles for WSF/C++ project using it's build scripts. I gave source path as the root of my WSF/C++ source tree.

Once I created the project I could build the WSF/C++ with no trouble. It should be noted that you need to give all your include paths for header files while creating the project or afterwords using the dialog box in file->Project properties.


You may need to select following include folders

wsf/cpp/include
wsf/cpp/wsf_c/axis2c/include
wsf/cpp/wsf_c/axis2c/neethi/include
wsf/cpp/wsf_c/axis2c/axiom/include
wsf/cpp/wsf_c/axis2c/guththila/include
wsf/cpp/wsf_c/axis2c/util/include
wsf/cpp/wsf_c/rampart/include
wsf/cpp/wsf_c/sandesha2c/include
wsf/cpp/wsf_c/savanc/include

Now if you need to create your own project which use WSF/C++, create your project as the main project. Then from the project properties dialog box select the Required Projects menu and add WSF/C++ project we created at the beginning.

Wednesday, September 9, 2009

WSF/C++ ported to Solaris and Mac OS

With little effort I could successfully build and run WSF/C++ on a Solaris x86 box. The changes include some include file ordering and a AC_CHECK_LIB macro for socket library in some configuration files. Also make sure to configure with the --with-openssl option with the correct path to my openssl library.
However note that I did not try it with Apache and XMPP transports yet.

Also I heard that Nandika also managed to run WSF/C++ on a Mac box with even little changes.

These changes are availabe with the latest svn copy of WSF/C++.

Tuesday, September 1, 2009

Getting Started with Axiom/CPP

WSF/CPP comes with its own XML processing model which is Axiom. If you are already familiar with either Axiom/Java or Axiom/C it would not be difficult to grasp how to use Axiom/CPP.

Lets have a look at an small example. Say we want to construct an XML as follows.

<WSO2 xmlns:ns1="http://wso2.org">

<projects>

<WSF>

<WSFCPP>http://wso2.org/projects/wsf/cpp</WSFCPP>

<WSFPHP>http://wso2.org/projects/wsf/php</WSFPHP>

</WSF>

</projects>.

</WSO2>

Lets construct this xml using Axiom/CPP.

First call the Environment::initialize() method to initialize WSF/CPP.

Now create OMElement in the corresponding order. You can pass the parent element to the constructor of the child element. The code is self explanatory.

int main()

{

Environment::initialize("test.log",AXIS2_LOG_LEVEL_TRACE);

OMElement *wso2 = new OMElement(NULL,"WSO2", new OMNamespace("http://wso2.org","ns1"));
OMElement *projects = new OMElement(wso2, "projects");;
OMElement *wsf = new OMElement(projects,"WSF");
OMElement *wsfcpp = new OMElement(wsf, "WSFCPP");
wsfcpp->setText("
http://wso2.org/projects/wsf/cpp");
OMElement *wsfphp = new OMElement(wsf, "WSFPHP");
wsfphp->setText("
http://wso2.org/projects/wsf/php");

cout<<wso2;
delete wso2;

return 0;

}

Sunday, August 16, 2009

WSF/C++ on Solaris

If somebody is interested in porting WSF/C++ to Solaris here is an excellent guilde for building C/C++ software for Solaris.

http://developers.sun.com/solaris/articles/build_sw_on_solaris.html

Also following solved one of my problems when porting a C++ application to Solaris.

http://whocares.de/solaris-10-fixup-for-libstdcla-is-not-a-valid-libtool-archive/

Currently I'm busy with some other stuff. If nobody is interested on porting WSF/C++ on Solaris I'll start after finishin my current stuff.

Wednesday, August 12, 2009

WSF/C++ Nightly Build

WSF/C++ Nightly build is up and running now. This will enable users to quickly obtained the current code in the svn without having to wait for a release. There were some issues that needed to be addressed urgently in the 2.0.0 release. One of the Stub.cpp file was missing in the distribution. This file is required if you are going to code generate clients using the WSDL2CPP tool. Now with this nightly build, one can get the latest updates.

You can get the nighties from the http://wso2.org/downloads/wsf/cpp

Sunday, August 9, 2009

Introduction to WSF/C++

WSF/C++ is a product which aims to provide the C/C++ developer community with a fully pledged open source web services stack which has support for WS* in addition to basic web services capabilities. Released under the apache2 licence, it has all the ingredients necessary just for your requirements in application integration, web service enabling your applications. You can read more of WSF/C++ here. and download the source binary releases from the download site.