跳到主要内容

配置

参数

名称类型描述
加密算法String举例:3des
签名算法String举例:sha1
MDN必须签名boolean举例:是
端口号int举例:8080
我方编号String举例:sender
对方编号String举例:receiver
对方服务器地址String举例:http://gateway.xxxx.com/as2
异步MDN地址String举例:/as2mdn
邮件地址String举例:http://gateway.yyyy.com/as2mdn
证书库路径String举例:/home/gateway/certs.p12
证书库密码String
消息类型String举例:application/EDI-X12

操作

发送数据

AS2:send-message

参数:

名称类型描述
Connector configurationObject参见配置部分
DataString要发送的消息内容

返回内容:

当对方同步返回MDN时:

通过属性mdn(小写)读取mdn关键信息,消息内容为mdn完整内容。其中关键信息包括:

信息含义
disposition消息处理结果,例如:automatic-action/MDN-sent-automatically; processed
originalMessageId原始消息的ID,例如:<epg-22062021105436+0800-3759@yiduijie_cloudedi>
receivedContentMIC消息摘要
reportingUAAS2代理名称
description消息描述内容

当对方未返回MDN时:

返回发送消息内容

EDIFACT转JSON

AS2:edifact-to-json

参数:

名称类型描述
Connector configurationObject参见配置部分
DataString要转换的消息内容

输出:

类型:String

JSON转EDIFACT

AS2:json-to-edifact

参数:

名称类型描述
Connector configurationObject参见配置部分
DataString要转换的消息内容

输出:

类型:String

JSON转X12

AS2:json-to-x12

参数:

名称类型描述
Connector configurationObject参见配置部分
DataString要转换的消息内容

输出:

类型:String

X12转JSON

AS2:x12-to-json

参数:

名称类型描述
Connector configurationObject参见配置部分
DataString要转换的消息内容

输出:

类型:String

接收

AS2接收

AS2:receiver

参数:

名称类型描述
Connector configurationObject参见配置部分

输出:

类型:String

当接收到对方的消息请求时:

1.返回内容为请求内容本身

2.如果同步发送了MDN给对方,通过属性backmdn(小写)读取关键信息,其中关键信息包括:

信息含义
disposition消息处理结果,例如:automatic-action/MDN-sent-automatically; processed
originalMessageId原始消息的ID,例如:<epg-22062021105436+0800-3759@yiduijie_cloudedi>
receivedContentMIC消息摘要
reportingUAAS2代理名称
description消息描述内容

当接收到的消息为MDN时:

通过属性mdn读取mdn内容,格式见上表