XmlBlaster Logo



XmlBlaster Logo

Type NEW
Priority LOW
Topic C++ clients can access xmlBlaster with the native SOCKET protocol

Our C++ client library has a protocol plugin which uses our native xmlBlaster SOCKET protocol to talk to the Java xmlBlaster server.

This plugin avoids the need to download a CORBA library and compile it to get xmlBlaster access from C++ clients. The Xerces XML parser is the only needed additional library, xerces 2.7 is known to run fine.

You can compile the C++ client library to contain the SOCKET and the CORBA plugin coexistent or only one of them. The C client SOCKET library is automatically compiled when requested by the C++ compilation task.


Try (xmlBlaster/demo/c++/bin)

HelloWorld2 -help

for a list of command line arguments.

If you have compiled for example the CORBA and SOCKET plugin you can switch the protocol used on the fly:

HelloWorld2 -protocol IOR

HelloWorld2 -protocol SOCKET

To compile you can use the xmlBlaster/build.xml file. Alle compiler/library/OS combinations listed in the client.cpp and client.c.socket requirements are supported.

Please take a copy from xmlBlaster/build.properties into your home directory (it has precedence there) and adjust the path settings to compile the SOCKET plugin and bind to the XML parser.
Her is an example (CORBA is switched off):

# C++ Unix/Linux example with SOCKET plugin

corba.product = NONE

Compile it with ant:

cd xmlBlaster
build cpp

(build -verbose cpp)

This creates:
   xmlBlaster/lib/libmlBlasterClientC.so  (The C SOCKET implementation)
   xmlBlaster/lib/libmlBlasterClient.so   (The C++ client code)
and some test clients in

The verbose setting is really verbose, you should only use it when you encounter problems during compilation.

On Windows you should add all directories containing dll libraries to your path setting.

On Solaris and Linux the shared library path is burned into the executable so you need to set LD_LIBRARY_PATH only when you move libraries to other locations (try ldd TestGet). On Mac OS-X use DYLD_LIBRARY_PATH and otool -L TestGet.

Property Default / Example Description Implemented
Please see the client.c.socket settings yes

NOTE: Configuration parameters are specified on command line (-someValue 17) or in the xmlBlaster.properties file (someValue=17). See requirement "util.property" for details.
Columns named Impl tells you if the feature is implemented.
Columns named Hot tells you if the configuration is changeable in hot operation.


The plugin has the limitations as described in the above client.c.socket requirement.

See http://www.xmlblaster.org/xmlBlaster/doc/doxygen/c++/namespaces.html
See REQ protocol.socket
See REQ client.c.socket
See REQ client.cpp
See REQ client.cpp.compile

This page is generated from the requirement XML file xmlBlaster/doc/requirements/client.cpp.socket.xml

Back to overview