12.11.2014 Views

web server - Borland Technical Publications

web server - Borland Technical Publications

web server - Borland Technical Publications

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

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

Important<br />

To provide a url for each of the business operations you want to expose to the internet<br />

users:<br />

1 Append the <strong>web</strong> application name to the company root url.<br />

For example:<br />

http://www.bank.com/accounts<br />

where accounts is the <strong>web</strong> application name.<br />

By default, your <strong>web</strong> application is not made available through the <strong>web</strong> <strong>server</strong>. In<br />

order to make it available through Apache, you must add some information to the<br />

<strong>web</strong> application descriptor. For step-by-step instructions on how to do so, go to the<br />

Management Console User's Guide.<br />

2 Append a name that is meaningful to users for the method in the <strong>web</strong> application<br />

that you want to expose.<br />

For example:<br />

http://www.bank.com/accounts/balance<br />

where balance is the meaningful name for the balance() method.<br />

Implementing the ReqProcessor IDL in your CORBA <strong>server</strong><br />

The ReqProcessor IDL allows communication between a <strong>web</strong> <strong>server</strong> and a CORBA<br />

<strong>server</strong> using IIOP. Once you implement the ReqProcessor IDL in your CORBA <strong>server</strong>,<br />

http requests can be passed from your <strong>web</strong> <strong>server</strong> to your CORBA <strong>server</strong>.<br />

In implementing this IDL, you must expect the request url as part of the HttpRequest and<br />

invoke the appropriate CORBA method in response to that url.<br />

IDL Specification for ReqProcessor Interface<br />

*/<br />

module apache {<br />

struct NameValue {<br />

string name;<br />

string value;<br />

};<br />

typedef sequence NVList;<br />

typedef sequence OctetSequence_t;<br />

struct HttpRequest {<br />

string authType; // auth type (BASIC,FORM etc)<br />

string userid; // username associated with request<br />

string appName; // application name (context path)<br />

string httpMethod; // PUT, GET etc,<br />

string httpProtocol; // protocol HTTP/1.0, HTTP/1.1 etc<br />

string uri; // URI associated with request<br />

string args; // query string associated with this request<br />

string postData; // POST (form) data associated with request<br />

boolean isSecure; // whether client specified https or http<br />

string <strong>server</strong>Hostname; // <strong>server</strong> hostname specified with URI<br />

string <strong>server</strong>Addr; // [optionally] <strong>server</strong> IP address<br />

specified with URI<br />

long <strong>server</strong>Port; // <strong>server</strong> port number specified with URI<br />

NVList headers; // headers associated with this request format:<br />

header-name:value<br />

};<br />

68 BES Developer’s Guide

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

Saved successfully!

Ooh no, something went wrong!