NAME
Net::AS2::Message - AS2 incoming message
SYNOPSIS
### Receiving Message and sending MDN
my $message = $as2->decode_messages($headers, $post_body);
if ($message->is_success) {
print $message->content;
}
PUBLIC INTERFACE
Constructors
- Net::AS2::Message->new($message_id, $async_url, $should_mdn_sign, $mic, $content, $mic_alg, $filename)
-
Create a new AS2 message.
- Net::AS2::Message->create_error_message($message_id, $async_url, $should_mdn_sign, $status_text, $plain_text)
-
Create a new AS2 'error' message.
- Net::AS2::Message->create_failure_message($message_id, $async_url, $should_mdn_sign, $status_text, $plain_text)
-
Create a new AS2 'failure' message.
- $msg = Net::AS2::Message->create_from_serialized_state($state)
-
Create an
Net::AS2::Message
from a serialized state data returned from serialized_state
Methods
- $msg->is_success
-
Returns if the message was successfully parsed.
content
andmic
would be available. - $msg->is_error
-
Returns if the message was failed to parse.
error_status_text
anderror_plain_text
would be available. - $msg->is_failure
-
Returns if the message was parsed but failed in further processing, e.g. unsupported algorithm request .
error_status_text
anderror_plain_text
would be available. - $msg->is_mdn_async
-
Returns if the partner wants to have the MDN sent in ASYNC.
async_url
would be available. - $msg->should_mdn_sign
-
Returns if the partner wants to have the MDN signed.
- $msg->message_id
-
Returns the message id of this message. This could be undefined in some failure mode.
- $msg->content
-
Returns the encoded content (binary) of the message. This is only defined when
is_success
is true. - $msg->mic
-
Returns the SHA Digest MIC of the message. This is only defined when
is_success
is true. - $msg->mic_alg
-
Returns the SHA Algorithm used for the message. This is only defined when
is_success
is true. - $msg->filename
-
Returns the content-disposition filename parameter of the message, if any.
This is only defined when
is_success
is true. - $msg->error_status_text
-
Dedicated short error text that should goes into machine readable report in the MDN.
- $msg->error_plain_text
-
Error text that goes into human readable report in the MDN.
- $msg->async_url
-
Returns the url that partner wants us to send MDN to.
- $msg->serialized_state
-
Returns the serialized state of this message.
This is usually used for passing
Net::AS2::Message
to another process for sending ASYNC MDN.
Functions
- notification_options_check ($option)
-
Check if Disposition Notification Options are supported.
Returns a string describing the unsupported option, if any.