web server - Borland Technical Publications

web server - Borland Technical Publications web server - Borland Technical Publications

techpubs.borland.com
from techpubs.borland.com More from this publisher
12.11.2014 Views

Chapter 8 8Apache web server to CORBA Chapter server connectivity Note Important The Apache IIOP connector can be configured to enable your web server to communicate with any standalone CORBA server implementing the ReqProcessor Interface Definition Language (IDL). This means you can easily put a web-based frontend on almost any CORBA server. In order to implement the ReqProcessor IDL, you need to have installed the Borland Enterprise Server AppServer Edition, or have installed the VisiBroker Edition, Web Services pack (VisiExchange) component. For more information, go to the BES Installation Guide. For documentation updates, go to www.borland.com/techpubs/bes. Web-enabling your CORBA server The following steps are required to make your CORBA server accessible over the internet: ■ “Determining the urls for your CORBA methods” on page 67. ■ “Implementing the ReqProcessor IDL in your CORBA server” on page 68. Determining the urls for your CORBA methods In order to make your CORBA server accessible over the internet, you need to: 1 Decide what business operations you want to expose. 2 Provide a url for those business operations (CORBA methods). For example, your banking company's CORBA server is implementing the methods: debit(), credit(), and balance() and you want to expose these business methods to users through the internet. You need to map each of the CORBA server operations to what the user types in a browser. Your bank company web site is http://www.bank.com. Chapter 8: Apache web server to CORBA server connectivity 67

Web-enabling your CORBA server Important To provide a url for each of the business operations you want to expose to the internet users: 1 Append the web application name to the company root url. For example: http://www.bank.com/accounts where accounts is the web application name. By default, your web application is not made available through the web server. In order to make it available through Apache, you must add some information to the web application descriptor. For step-by-step instructions on how to do so, go to the Management Console User's Guide. 2 Append a name that is meaningful to users for the method in the web application that you want to expose. For example: http://www.bank.com/accounts/balance where balance is the meaningful name for the balance() method. Implementing the ReqProcessor IDL in your CORBA server The ReqProcessor IDL allows communication between a web server and a CORBA server using IIOP. Once you implement the ReqProcessor IDL in your CORBA server, http requests can be passed from your web server to your CORBA server. In implementing this IDL, you must expect the request url as part of the HttpRequest and invoke the appropriate CORBA method in response to that url. IDL Specification for ReqProcessor Interface */ module apache { struct NameValue { string name; string value; }; typedef sequence NVList; typedef sequence OctetSequence_t; struct HttpRequest { string authType; // auth type (BASIC,FORM etc) string userid; // username associated with request string appName; // application name (context path) string httpMethod; // PUT, GET etc, string httpProtocol; // protocol HTTP/1.0, HTTP/1.1 etc string uri; // URI associated with request string args; // query string associated with this request string postData; // POST (form) data associated with request boolean isSecure; // whether client specified https or http string serverHostname; // server hostname specified with URI string serverAddr; // [optionally] server IP address specified with URI long serverPort; // server port number specified with URI NVList headers; // headers associated with this request format: header-name:value }; 68 BES Developer’s Guide

Chapter<br />

8<br />

8Apache <strong>web</strong> <strong>server</strong> to CORBA<br />

Chapter<br />

<strong>server</strong> connectivity<br />

Note<br />

Important<br />

The Apache IIOP connector can be configured to enable your <strong>web</strong> <strong>server</strong> to<br />

communicate with any standalone CORBA <strong>server</strong> implementing the ReqProcessor<br />

Interface Definition Language (IDL). This means you can easily put a <strong>web</strong>-based frontend<br />

on almost any CORBA <strong>server</strong>.<br />

In order to implement the ReqProcessor IDL, you need to have installed the <strong>Borland</strong><br />

Enterprise Server AppServer Edition, or have installed the VisiBroker Edition, Web<br />

Services pack (VisiExchange) component. For more information, go to the BES<br />

Installation Guide.<br />

For documentation updates, go to www.borland.com/techpubs/bes.<br />

Web-enabling your CORBA <strong>server</strong><br />

The following steps are required to make your CORBA <strong>server</strong> accessible over the<br />

internet:<br />

■<br />

“Determining the urls for your CORBA methods” on page 67.<br />

■<br />

“Implementing the ReqProcessor IDL in your CORBA <strong>server</strong>” on page 68.<br />

Determining the urls for your CORBA methods<br />

In order to make your CORBA <strong>server</strong> accessible over the internet, you need to:<br />

1 Decide what business operations you want to expose.<br />

2 Provide a url for those business operations (CORBA methods).<br />

For example, your banking company's CORBA <strong>server</strong> is implementing the methods:<br />

debit(), credit(), and balance() and you want to expose these business methods to<br />

users through the internet. You need to map each of the CORBA <strong>server</strong> operations to<br />

what the user types in a browser.<br />

Your bank company <strong>web</strong> site is http://www.bank.com.<br />

Chapter 8: Apache <strong>web</strong> <strong>server</strong> to CORBA <strong>server</strong> connectivity 67

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!