Using LOBs (Large OBjects) with soapUi

This tutorial shows how to add, delete and get BLOBs using SOA Gateway and Adabas.

SOA Gateway uses the MTOM specification to send/receive the XML and binary data to/from the required web service. This involves attaching the required binary file(s) to the SOAP message, and then transforming this into a MIME message to send across the wire.

For the purposes of this tutorial, we will use soapUi to send and receive messages to our web service.

Other web service clients may also be used, such as PHP with the WSO2 Web Services Framework extension

This tutorial assumes the following

  • You have at least soapUi v1.7 installed.

  • You are using a version of Adabas which support LOBs

  • You have set up a LOB file at FNR 90.

  1. Start the Control Center and add a new resource.

    Enter the following information

    • Name: adabas_blobs

    • DataView : Select 'adabas_photoblobs', which is one of the sample definitions delivered with SOA Gateway

    • DatabaseId: 212 ( or the DBID relevant on your system )

    • FileNumber: 90

    Publish your changes to the server.

  2. Start soapUi, and add the WSDL for the adabas_blobs service. If you are unfamiliar with soapUi, please run through this tutorial first

  3. You should now have a screen similar to this

    graphics/blobs1.PNG

    Under add double-click Request 1

  4. Remove the <soapenv:Header> element and all child elements.

    Add the personnel_id of the record you would like the BLOB to be added

    Change the cid:XYZ reference to be something familiar, for example cid:myPhoto

    graphics/blobs2.PNG

  5. Click the Request Attachments tab, and click Add File

    Select the required LOB file and click Open

    graphics/blobs3.PNG

    When asked to Cache Attachment select No

  6. Click the Part column, and select the CID reference you changed earlier, for example myPhoto

    graphics/blobs4.PNG

  7. In the Request Properties change Enable MTOM/Inline to true

    graphics/blobs5.PNG

  8. Click the green arrow to send the request. The server's response will appear in the right pane

    graphics/blobs6.PNG

  9. Now that the record, including the LOB, has been added to your Adabas file, you will want to retrieve it.

    In SOA Gateway LOBs can be retrieved using the get request

    Under get, double-click Request 1. Remove the <soapenv:Header> elements as before.

  10. Add the personnel_id of the record that you wish to retrieve, for example 99880000.

    graphics/blobs7.PNG

  11. Click the green arrow, and this record will be retrieved from Adabas.

    Select the Response Attachments tab, and double-click the attachment.

    It should open in a web-browser, or you can save the attachment to disk by selecting Export selected

    graphics/blobs8.PNG

  12. You may delete the record, including the LOB, by selecting the delete operation and entering the corresponding personnel_id.