14.01.2013 Views

IBM Informix Developer's Handbook - IBM Redbooks

IBM Informix Developer's Handbook - IBM Redbooks

IBM Informix Developer's Handbook - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

11.2.3 Rails adapters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369<br />

11.3 Database operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373<br />

11.4 Using the Rails Adapter with Ruby <strong>Informix</strong> . . . . . . . . . . . . . . . . . . . . . 384<br />

11.4.1 Creating database objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384<br />

11.4.2 Creating the Rails application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385<br />

11.4.3 Modifying the database configuration file . . . . . . . . . . . . . . . . . . . 386<br />

11.4.4 Creating the Rails model and controllers . . . . . . . . . . . . . . . . . . . 387<br />

11.4.5 Starting the Rails web server . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389<br />

11.4.6 Demonstrating website application . . . . . . . . . . . . . . . . . . . . . . . . 389<br />

11.5 Using the Rails Adapter with <strong>IBM</strong>_DB. . . . . . . . . . . . . . . . . . . . . . . . . . 391<br />

11.5.1 Creating the Rails application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392<br />

11.5.2 Modifying the database configuration file . . . . . . . . . . . . . . . . . . . 392<br />

11.5.3 Creating model, control, and view. . . . . . . . . . . . . . . . . . . . . . . . . 393<br />

11.5.4 Migrating the model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 394<br />

11.5.5 Starting the Rails web server . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396<br />

11.5.6 Checking the application from website . . . . . . . . . . . . . . . . . . . . . 396<br />

Chapter 12. <strong>Informix</strong> 4GL Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . 399<br />

12.1 Basic concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400<br />

12.1.1 <strong>IBM</strong> <strong>Informix</strong> 4GL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400<br />

12.1.2 Service-oriented architecture and Web Services . . . . . . . . . . . . . 400<br />

12.1.3 Web Services development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400<br />

12.1.4 <strong>Informix</strong> 4GL and Web Services . . . . . . . . . . . . . . . . . . . . . . . . . . 401<br />

12.1.5 Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401<br />

12.2 Setup and configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402<br />

12.2.1 Prerequisites and supported platforms . . . . . . . . . . . . . . . . . . . . . 402<br />

12.2.2 Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403<br />

12.3 <strong>Informix</strong> 4GL Web Services tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404<br />

12.3.1 The w4glc Web Services compiler . . . . . . . . . . . . . . . . . . . . . . . . 404<br />

12.3.2 The w4gl utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406<br />

12.3.3 Web Services Description Language Parser (wsdl_parser) . . . . . 407<br />

12.3.4 I4GL Web Services process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409<br />

12.4 Developing a web service with I4GL . . . . . . . . . . . . . . . . . . . . . . . . . . . 409<br />

12.4.1 Example I4GL function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410<br />

12.4.2 Host and application details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411<br />

12.4.3 Definition of the web service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 412<br />

12.4.4 Generate the configuration file . . . . . . . . . . . . . . . . . . . . . . . . . . . 416<br />

12.4.5 Deployment of the web service . . . . . . . . . . . . . . . . . . . . . . . . . . . 420<br />

12.4.6 Packaging of the web service . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421<br />

12.4.7 Starting the Axis2 application server. . . . . . . . . . . . . . . . . . . . . . . 422<br />

12.4.8 Consuming the I4GL web service . . . . . . . . . . . . . . . . . . . . . . . . . 422<br />

12.5 Consuming a web service with I4GL . . . . . . . . . . . . . . . . . . . . . . . . . . . 425<br />

12.5.1 Web service to consume. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425<br />

Contents vii

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

Saved successfully!

Ooh no, something went wrong!