Sending and Receiving a SOAP Bound Attachment
A client process sends Text and GIF files as attachments for the In-Band attachments to the server process. The server process receives these attachments, and returns them as its response. The client process captures the sent and received attachments' size.
Prerequisites
Copy the Attachment.txt and tibcologo.gif files from TIBCO_HOME\bw\n.n\samples\binding\soap\http\BoundAttachments to the directory specified for the AttachmentBaseDir property.
Procedure
Result
Sent binary file size : 2878 bytes. Received binary file size : 2878 bytes. Sent text file size : 35 Received text file size : 35
Understanding the Configuration
The ServerProcess implements the getsetAttachments operation. It receives the Client request that has WSDL message parts defined as base64Binary type and has Binary and Text attachments. Service reply mechanism sends back the same attachments to the ClientProcess.
The ClientProcess invokes the ServerProcess with input attachments (Binaryand Text). Consumer (Client) reads the input files and sends them to Producer (Server)process. Attachments received from Server are written to the disk on the Client side.
Finally, the Sent and Received file size information for Binary and Text attachments is written at the location specified in OUTPUT_FILE module property.
These attachments' size matches and also depicts that attachments can be sent or received between the Producer and Consumer where they are defined as part of the WSDL definition.