KB Article #179323

Maps for outbound RosettaNet messages requirement

Problem

-- Want to use DML map for an outbound RosettaNet message

-- Map is executed successfully, but failing on Trading Engine side with error:

2018-01-24 09:27:36,275 - ERROR [Worker13-15] (com.cyclonecommerce.rosettanet.protocol.RosettaNet2_0ProtocolSender.send:78) - Error packaging message
java.lang.IllegalArgumentException: Adding text to an XML document must not be null
    at org.dom4j.DocumentFactory.createText(DocumentFactory.java:174)
    at org.dom4j.tree.AbstractElement.addText(AbstractElement.java:899)
    at org.dom4j.tree.AbstractElement.setText(AbstractElement.java:1120)
    at com.cyclonecommerce.rosettanet.standards.v1_1.ServiceHeader.buildDocument(ServiceHeader.java:186)
    at com.cyclonecommerce.rosettanet.standards.RnifDocument.toXML(RnifDocument.java:77)
    at com.cyclonecommerce.rosettanet.protocol.RosettaNet1_1ProtocolSender.send(RosettaNet1_1ProtocolSender.java:66)
    at com.cyclonecommerce.tradingengine.messaging.config.ProtocolSenderProxy.send(ProtocolSenderProxy.java:39)
    at com.cyclonecommerce.tradingengine.messaging.handler.ProtocolSenderState.executeProtocolSender(ProtocolSenderState.java:100)
    at com.cyclonecommerce.tradingengine.messaging.handler.ProtocolSenderState.handleMessage(ProtocolSenderState.java:44)
    at com.cyclonecommerce.tradingengine.messaging.handler.MessageHandlerJob.run(MessageHandlerJob.java:198)
    at com.cyclonecommerce.tradingengine.cluster.failover.FailoverableJobTask.execute(FailoverableJobTask.java:66)
    at com.cyclonecommerce.util.task.TaskScheduler$WorkerThread.primRun(TaskScheduler.java:394)
    at com.axway.cluster.extensions.thread.EventedThread.run(EventedThread.java:80)

-- Effects RosettaNet 1.1 and 2.0 in B2Bi 2.3.0, and only RosettaNet 1.1 in B2Bi 2.3.1

Resolution

* For RosettaNet 2.0 support had been added to B2Bi 2.3.1 and therefore this workaround is no longer required. But still needed to process RosettaNet 1.1.

* This is not the only reason for the error "Adding text to an XML document must not be null", it is seen for other issues as well.

Reason for these failures is, that the metadata picked up in the MMD and by scanning the payload is lost when the message is sent back from Integrator to Interchange. In order for Interchange to successfully being able further processing, a list of required attributes need to be set manually in the map.

The list of attributes are mostly seen while processing a message in limited mode, and seen on the message attributes tab plus a "MessageTrackingId"

For example, for a "3B2" the following message attributes need to be set in a DML map:

setAttribute( "B2BXGISend_PipCode","3B2" );
setAttribute( "B2BXGISend_PipVersion", "V01.00");
setAttribute( "B2BXGISend_ContentMimeType", "xml/rnif-action");
setAttribute( "B2BXGISend_DocumentClass","rnif-action");
setAttribute( "B2BXGISend_DocumentType","Action");
setAttribute( "B2BXGISend_GlobalUsageCode", "Test");
setAttribute( "B2BXGISend_GlobalBusinessActionCode","Advance Shipment Notification Action");
setAttribute( "B2BXGISend_BusinessActivityIdentifier", "Notify of Advance Shipment");
setAttribute( "B2BXGISend_FromService", "Shipper Service");
setAttribute( "B2BXGISend_ToService", "Receiver Service");
setAttribute( "B2BXGISend_GlobalDocumentFunctionCode", "Request");
setAttribute( "B2BXGISend_FromGlobalPartnerClassificationCode", "Manufacturer");
setAttribute( "B2BXGISend_ToGlobalPartnerClassificationCode", "Distributor");
setAttribute( "B2BXGISend_MessageTrackingId", "1");
setAttribute( "B2BXGISend_FromRole", "Seller");
setAttribute( "B2BXGISend_ToRole", "Receiver")