Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

BridgeStub.h File Reference

The main include file for the executables. More...

#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <time.h>
#include "anyconfig/CString.h"
#include "anyconfig/anycfg.h"
#include "log4cpp/Category.hh"
#include "log4cpp/Appender.hh"
#include "log4cpp/FileAppender.hh"
#include "log4cpp/RemoteSyslogAppender.hh"
#include "log4cpp/BasicLayout.hh"

Go to the source code of this file.

Defines

#define BRIDGE_H   1
 include protection. More...


Typedefs

typedef void* IRPLUS_H
 Opaque IRPlus object. More...

typedef void* CORBA_H
 Opaque CORBA ORB object. More...

typedef void* DOM_H
 Opaque DOM_Node object. More...

typedef void* IRP_ITEM_H
 Opaque IRPlus item. More...


Enumerations

enum  FaultCode { sfVersion, sfUnderstand, sfClient, sfServer }
 See the SOAP specification. More...


Functions

ANYCFG_H sbInitialize (int argn, char *argv[])
 Initialize the SoapBridge core code (src/Bridge). More...

void sbTerminate (ANYCFG_H hdl)
 Terminate the SoapBridge core code (src/Bridge). More...

CORBA_H initCorba (int argn, char *argv[])
 Initialize the CORBA system (src/IRPlus). More...

void termCorba (CORBA_H hdl)
 Terminate the CORBA system (src/IRPlus). More...

IRPLUS_H initIRPlus (CORBA_H cbaHdl, ANYCFG_H cfhHdl)
 Initialize the IRPlus module (src/IRPlus). More...

void termIRPlus (IRPLUS_H hdl)
 Terminate the IRPlus module (src/IRPlus). More...

const char* iterIRPlus (IRPLUS_H hdl, IRP_ITEM_H *itm)
 Iterate through the IRPlus methods. More...

DOM_H parseDOM (const unsigned char *pBuf, const unsigned long size)
 Returns the document node for a DOM obtained by parsing the supplied buffer. More...

void releaseDOM (DOM_H hdl)
 Release (destroy) the DOM_Node object obtained from parseDOM(). More...

void GetXML (unsigned char *&buf, unsigned long &siz, DOM_H toWrite, const char *encoding="UTF-8")
 Build XML from a DOM. More...

bool GetSOAP (CString &soap_in, CString &soap_out, IRPLUS_H hdl, const char *interfaceMethod)
 Generate sample (SOAP) XML for a specific method. More...

void EncodeBase64 (const unsigned char *buf, const unsigned long csiz, CString &str, bool isSMTP)
 Encode binary data as a Base 64 string. More...

void DecodeBase64 (unsigned char *ou, unsigned long &nsiz, const char *buf)
 Decode a Base 64 encoded string. More...

double sec_u (void)
 Function that returns C time with milliseconds appended as a double. More...


Variables

log4cpp::Category* soapBridgeLog
log4cpp::Category* corbaBridgeLog
log4cpp::Category* generalLog


Detailed Description

The main include file for the executables.

This header file uses opaque references to all the modules that make up the SoapBridge. This isolates the various external libraries.

Definition in file BridgeStub.h.


Define Documentation

#define BRIDGE_H   1
 

include protection.

Definition at line 29 of file BridgeStub.h.


Typedef Documentation

typedef void * CORBA_H
 

Opaque CORBA ORB object.

Definition at line 48 of file BridgeStub.h.

typedef void * DOM_H
 

Opaque DOM_Node object.

Definition at line 50 of file BridgeStub.h.

typedef void * IRPLUS_H
 

Opaque IRPlus object.

Definition at line 46 of file BridgeStub.h.

typedef void * IRP_ITEM_H
 

Opaque IRPlus item.

Definition at line 52 of file BridgeStub.h.


Enumeration Type Documentation

enum FaultCode
 

See the SOAP specification.

Enumeration values:
sfVersion  
sfUnderstand  
sfClient  
sfServer  

Definition at line 78 of file BridgeStub.h.


Function Documentation

void DecodeBase64 ( unsigned char * ou,
unsigned long & nsiz,
const char * buf )
 

Decode a Base 64 encoded string.

Parameters:
ou   [out] Caller allocated buffer of sufficient size.
nsiz   [out] Length of the data after the decoding.
buf   [in] Zero terminated string to decode.

Definition at line 187 of file bridge.cpp.

void EncodeBase64 ( const unsigned char * buf,
const unsigned long csiz,
CString & str,
bool isSMTP )
 

Encode binary data as a Base 64 string.

Parameters:
buf   The data to encode.
siz   Size of the data to encode.
str   CString that holds the result.
isSMTP   Set to 'false' to encode for SOAP, ie without 76 character line breaks.

Definition at line 134 of file bridge.cpp.

Referenced by CorbaSoap::DynAny2Xml().

bool GetSOAP ( CString & xml_in,
CString & xml_out,
IRPLUS_H hdl,
const char * interfaceMethod )
 

Generate sample (SOAP) XML for a specific method.

Parameters:
xml_in   CString to fill in for the request.
xml_out   CString to fill in for the respons.
hdl   Handle obtained from initIRPlus().
interfaceMethod   Name of the method to build sample (SOAP) XML for.

Definition at line 457 of file ReadIR.cpp.

void GetXML ( unsigned char *& buf,
unsigned long & siz,
DOM_H toWrite,
const char * encoding = "UTF-8" )
 

Build XML from a DOM.

Iterates through the DOM and builds a buffer with the XML.

Parameters:
buf   The allocate buffer with the resulting XML.
siz   The size of the XML in the buffer.
toWrite   DOM to iterate.

Definition at line 461 of file Parser.cpp.

CORBA_H initCorba ( int argn,
char * argv[] )
 

Initialize the CORBA system (src/IRPlus).

Definition at line 28 of file CorbaInit.cpp.

IRPLUS_H initIRPlus ( CORBA_H cbaHdl,
ANYCFG_H cfgHdl )
 

Initialize the IRPlus module (src/IRPlus).

Definition at line 32 of file ReadIR.cpp.

const char * iterIRPlus ( IRPLUS_H hdl,
IRP_ITEM_H * itm )
 

Iterate through the IRPlus methods.

Returns the currently known methods (i.e. SOAP Actions) from the IRPlus.

Parameters:
hdl   Handle obtained from initIRPlus()
itm   Handle to the last item, must be NULL on the first call
Returns:
A string pointer to the next method name or NULL if the end of the list was reached

Definition at line 67 of file ReadIR.cpp.

DOM_H parseDOM ( const unsigned char * pBuf,
const unsigned long size )
 

Returns the document node for a DOM obtained by parsing the supplied buffer.

Definition at line 36 of file Parser.cpp.

void releaseDOM ( DOM_H hdl )
 

Release (destroy) the DOM_Node object obtained from parseDOM().

Definition at line 30 of file Parser.cpp.

ANYCFG_H sbInitialize ( int argn,
char * argv[] )
 

Initialize the SoapBridge core code (src/Bridge).

Definition at line 66 of file bridge.cpp.

Referenced by main().

void sbTerminate ( ANYCFG_H hdl )
 

Terminate the SoapBridge core code (src/Bridge).

Definition at line 118 of file bridge.cpp.

Referenced by main().

double sec_u ( void )
 

Function that returns C time with milliseconds appended as a double.

Returns:
The current C time in millisecond resolution

Definition at line 254 of file bridge.cpp.

void termCorba ( CORBA_H hdl )
 

Terminate the CORBA system (src/IRPlus).

Definition at line 35 of file CorbaInit.cpp.

void termIRPlus ( IRPLUS_H hdl )
 

Terminate the IRPlus module (src/IRPlus).

Definition at line 50 of file ReadIR.cpp.


Variable Documentation

log4cpp::Category* corbaBridgeLog
 

Definition at line 96 of file BridgeStub.h.

log4cpp::Category* generalLog
 

Definition at line 97 of file BridgeStub.h.

log4cpp::Category* soapBridgeLog
 

Definition at line 95 of file BridgeStub.h.


This documentation is part of the "SOAP to CORBA bridge" project
Copyright © 2000 by Lifeline Networks bv.
All rights are reserved.