Delivering Your Documents over Hypertext Transfer Protocol HTTP

Using the Delivery Manager Java APIs 8-23

8.11 Delivering Documents over AS2

AS2 is one of the standard protocols defined in the Electronic Data Interchange-Internet Integration EDI-INT. AS2 is based on HTTP and other internet standard technologies and is designed to exchange data over the internet in a secure manner. The AS2 specification is defined in RFC4130 available at http:www.ietf.org . The delivery system supports the delivery of documents to AS2 servers. Sample code is as follows: Example 8–19 Sample Code for Delivering Documents over AS2 create delivery manager instance DeliveryManager dm = new DeliveryManager; create a delivery request DeliveryRequest req = dm.createRequestDeliveryManager.TYPE_AS2; set AS2 message properties req.addPropertyDeliveryPropertyDefinitions.AS2_FROM, Me; req.addPropertyDeliveryPropertyDefinitions.AS2_TO, You; req.addPropertyDeliveryPropertyDefinitions.AS2_SUBJECT, My EDI Message; req.addPropertyDeliveryPropertyDefinitions.AS2_CONTENT_TYPE, applicationsEDIFACT; set HTTP properties req.addPropertyDeliveryPropertyDefinitions.AS2_HTTP_HOST, as2hsot; req.addPropertyDeliveryPropertyDefinitions.AS2_HTTP_REMOTE_DIRECTORY, ; req.addPropertyDeliveryPropertyDefinitions.AS2_HTTP_REMOTE_FILENAME, as2; set the document req.setDocumentdocumentmyEDIdoc; submit the request DeliveryResponse res = req.submit; close the request req.close; The following table lists the supported properties. A string value is required for each property unless otherwise noted. HTTP_USE_FULL_URL Optional Set to true to send the full URL for the HTTP request header. Valid values are true or false default. HTTP_USE_CHUNKED_BODY Optional Valid values are true default to use HTTP chunked transfer coding for the message body, or false. HTTP_TIMEOUT Optional Enter a length of time in milliseconds after which to terminate the request if a connection is not made to the HTTP server. The default is 60000 1 minute. HTTP_URL_CHARACTER_ENCODING Encoding of the URL. It will be used if you use non-ASCII characters in the URL. Set the Java-supported encoding string for the value. Table 8–9 Cont. Properties for Delivering Documents over HTTP Property Description 8-24 Developers Guide for Oracle Business Intelligence Publisher Table 8–10 Properties for Delivering Documents over AS2 Property Description AS2_FROM Required. Enter the AS2 message sender. AS2_TO Required. Enter the AS2 message recipient. AS2_SUBJECT Required. Enter the message subject. AS2_MESSAGE_ COMPRESSION Default value is False. Enter True to compress the message. AS2_MESSAGE_ SIGNATURE Default value is False. Enter True to sign the message. AS2_MESSAGE_ ENCRYPTION Default value is False. Enter True to encrypt the message. AS2_CONTENT_TYPE Required. Enter the content type of the document. Valid values are: ■ applicationEDIFACT ■ applicationxml AS2_ENC_ALGO The AS2 encryption algorithm. Set one of the following: ■ AS2_ENC_ALGO_RC2_40 ■ AS2_ENC_ALGO_RC2_64 ■ AS2_ENC_ALGO_RC2_128 ■ AS2_ENC_ALGO_DES ■ AS2_ENC_ALGO_DES_EDE3 Default ■ AS2_ENC_ALGO_AES_128 ■ AS2_ENC_ALGO_AES_192 ■ AS2_ENC_ALGO_AES_256 AS2_DIGEST_ALGO Enter the AS2 digest algorithm for signing the messages. Set either of the following: ■ AS2_DIGEST_ALGO_MD5 Default ■ AS2_DIGEST_ALGO_SHA1 AS2_ASYNC_ADDRESS Enter the asynchronous address to which MDN notifications should be set. AS2_ASYNC_EMAIL_ SERVER_HOST Enter the email server host for asynchronous email MDN. AS2_ASYNC_EMAIL_ SERVER_PORT Enter the email server port for asynchronous email MDN. AS2_ASYNC_EMAIL_ SERVER_USERNAME Enter the email server USERNAME for asynchronous email MDN. AS2_ASYNC_EMAIL_ SERVER_PASSWORD Enter the email server PASSWORD for asynchronous email MDN. AS2_ASYNC_EMAIL_ SERVER_FOLDER_NAME Enter the IMAP folder name for asynchronous email MDN. AS2_SENDER_PKCS12_ FILE Location of the senders PKCS12 publicprivate key file. Using the Delivery Manager Java APIs 8-25

8.11.1 Delivery Receipt

The AS2 server always issues an AS2 delivery receipt for each AS2 request. Set the AS2_DELIVERY_RECEIPT_DIRECTORY property to specify the location to store the AS2_SENDER_PKCS12_ PASSWORD Password for the senders PKCS12 publicprivate key. AS2_RECEIVER_ CERTIFICATES_FILE Location of the receivers certificates file. AS2_DELIVERY_ RECEIPT_DIRECTORY Directory to store the delivery receipts. This directory must be specified if to receive delivery receipts. AS2_HTTP_HOST Required. Enter the server host name. AS2_HTTP_PORT Enter the server HTTP port number. The default is 80. AS2_HTTP_REMOTE_ DIRECTORY Required. Enter the remote directory name. Example: home AS2_HTTP_REMOTE_ FILENAME Required. Enter the remote file name. AS2_HTTP_AUTHTYPE Enter the HTTP authentication type. Valid values are: ■ AS2_HTTP_AUTHTYPE_NONE - no authentication Default ■ AS2_HTTP_AUTHTYPE_BASIC - Use HTTP basic authentication. ■ AS2_HTTP_AUTHTYPE_DIGEST - user HTTP digest authentication. AS2_HTTP_USERNAME Enter the username for HTTP authentication. AS2_HTTP_PASSWORD Enter the password for HTTP authentication. AS2_HTTP_ENCTYPE Set the encryption type. Valid values are: ■ AS2_HTTP_ENCTYPE_NONE - no encryption default ■ AS2_HTTP_ENCTYPE_SSL - use secure socket layer SSL AS2_HTTP_TIMEOUT Enter the time out allowance in milliseconds. Default is 60,000 1 minute AS2_HTTP_PROXY_ HOST Required. Enter the proxy server host name. AS2_HTTP_PROXY_PORT Enter the proxy server port number. Default is 80. AS2_HTTP_PROXY_ AUTHTYPE ■ AS2_HTTP_AUTHTYPE_NONE - no authentication Default ■ AS2_HTTP_AUTHTYPE_BASIC - Use HTTP basic authentication. ■ AS2_HTTP_AUTHTYPE_DIGEST - user HTTP digest authentication. AS2_HTTP_PROXY_ USERNAME Enter the username for proxy authentication. AS2_HTTP_PROXY_ PASSWORD Enter the password for HTTP proxy authentication. Table 8–10 Cont. Properties for Delivering Documents over AS2