All I am using the following code to invoke soap receiver adapter from UDF:
SystemAccessor accessor = null;
DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey varFileName = DynamicConfigurationKey.create("http://sap.com/Custom","FileName");
DynamicConfigurationKey varShipmentNumber = DynamicConfigurationKey.create("http://sap.com/Custom","ShipmentNumber");
DynamicConfigurationKey varCustomerCode = DynamicConfigurationKey.create("http://sap.com/Custom","CustomerCode");
DynamicConfigurationKey varItemNumber = DynamicConfigurationKey.create("http://sap.com/Custom","ItemNumber");
DynamicConfigurationKey varField03 = DynamicConfigurationKey.create("http://sap.com/Custom","Field03");
String FileName = conf.get(varFileName);
String ShipmentNumber = conf.get(varShipmentNumber);
String CustomerCode = conf.get(varCustomerCode);
String ItemNumber = conf.get(varItemNumber);
String Field03 = conf.get(varField03);
try
{
String sysName = (String) System.getProperty("SAPSYSTEMNAME");
if ("DHX".equals(sysName))
{
Channel channel = LookupService.getChannel("","FUSION_DEVBTSERVER_USA","Receive_SOAP_TrackingServiceWS_LogToCentralMonitoring_ISIS");
accessor = LookupService.getSystemAccessor(channel);
}
String SOAPxml ="<?xml version=\"1.0\" encoding=\"utf-8\" ?><ns2:LogToCentralMonitoring xmlns:ns2=\"http://EI.CentralMonitoring\"><ns2:loggingData><MON_EISLDCTLID>03</MON_EISLDCTLID><MON_ProgramID>WM211.03</MON_ProgramID><MON_ProcessID>IP_FEXX_IsisToFusion_Value</MON_ProcessID><MON_MsgStartTimeStamp>"+timeSent+"</MON_MsgStartTimeStamp><MON_MsgEndTimeStamp>"+timeSent+"</MON_MsgEndTimeStamp><MON_MsgStatus>"+msgStatus+"</MON_MsgStatus><MON_MsgStatusDescription>"+constantError+": "+msgDesc+"</MON_MsgStatusDescription><MessageAttribute><Name>MON_FileName</Name><Value>"+FileName+"</Value></MessageAttribute><MessageAttribute><Name>MON_FunctionalID</Name><Value>"+ItemNumber+"</Value></MessageAttribute><MessageAttribute><Name>MON_ShipNum</Name><Value>"+ShipmentNumber+"</Value></MessageAttribute><MessageAttribute><Name>MON_SearchField1</Name><Value>"+Field03+"</Value></MessageAttribute><MessageAttribute><Name>MON_SearchField2</Name><Value>"+CustomerCode+"</Value></MessageAttribute></ns2:loggingData></ns2:LogToCentralMonitoring>";
InputStream is = new ByteArrayInputStream(SOAPxml.getBytes());
XmlPayload payload = LookupService.getXmlPayload(is);
Payload result = accessor.call(payload);
}
finally
{
if(accessor!=null)accessor.close();
}
return (msgDesc);
But intermittently I am getting the following error: SOAP: call failed: java.net.SocketException: Connection reset
But surprisingly other interface using the same channel normally without udf never throws error. The error seems to be happening only for the messages being sent to this CC using UDF.
Any advice.