cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with SFTP Sender Channel

Former Member
0 Kudos

Hi All ,

    I am facing a problem in setting the module configuration parameters  in SFTP sender communication channel . Previously this was a Sender File channel with certain specific content conversion features. Now I need to migrate the same to SFTP channel . This is going to get escalated if not corrected urgently .

  Please look at the first screen shot of the old File adapter settings :

In the new SFTP channel when I am trying to achieve the same I am unable to get the same results .

No matter what permutation combination I do , I am unable to SAVE and activate the xm.recordsetStructure = Details.* in the 3rd or forth row . It is ALWAYS getting saved at the last line . Refer to the 3rd screenshot.

Also when I am activating the channel as in the 3rd screenshot, it is throwing errors due to structure failure.

Regards,

Arnab Mondal.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Eng Swee and All , I need your comments and help in where I am doing the mistake  .

Thanks and Regards,

Arnab Mondal.

engswee
Active Contributor
0 Kudos

Hi Arnab

The conversion of the raw file to XML payload seems fine based on your configuration values.

From the error you are getting, it seems like there is a message mapping error on the target Details node.

I would suggest that you copy the XML payload and test the message mapping in ESR with it. Then you can debug what is the issue with the mapping.

If you can't resolve that, can you provide a screenshot of the mapping for the target node Details.

Another thing you can also try is to get the converted source XML payload from the original FTP channel with FCC. Then compare that XML with the conversion using SFTP, and see what are the differences in the structure.

Rgds

Eng Swee

Former Member
0 Kudos

Hi Eng Swee,

    I have a different opinion . Quoting you :  "The conversion of the raw file to XML payload seems fine based on your configuration values."

  I think this is where it is NOT happening as it should happen . If you look at the module configuration parameters , we selected : xml.recordsetStructure = Details,*, but if you look at the RAW data , you will see it is having "<row>" . If we change the payload to " <Details>", it will be passing perfectly OK . I changed the payload and tested.

If the module configuration was OK , then instead of "row " it should have been converted to "Details" .

    I still cant figure out why it does not convert the structure to  " Details "

Mapping Screenshot :

Thanks ,

Arnab .

engswee
Active Contributor
0 Kudos

Hi Arnab,

Apologies, didn't notice the row part - I was just examining the actual fields being converted.

Yes, if it is converting as row instead of Details, then it would cause the mapping error.

The MTB module is not a 1-1 match with the FCC logic in a File adapter, so there are differing behaviors. But I am not sure if the generation of the row node is a default behavior of the MTB module.

Can you try removing the "ignorerecordsetName" parameter and see if the conversion is still <row> or not?

If all else fails, I would suggest that you change the Data Type (rename Details to row) and update the message mapping accordingly.

Rgds

Eng Swee

engswee
Active Contributor
0 Kudos

Hi Arnab

For SimplePlain2XML conversion, you need to set the following instead of xml.recordsetStructure in order to have the node named correctly.

xml.structureTitle = Details

Rgds

Eng Swee

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Eng Swee Yeoh ,

    Many Many Thanks . The solution has worked . This was taking  a long time for me to figure out . Thanks for your thorough analysis and solution .

xml.structureTitle = Details

Thanks and Regards,

Arnab Mondal.

engswee
Active Contributor
0 Kudos

Hi Arnab

Glad to hear that the solution works now.

Rgds

Eng Swee

engswee
Active Contributor
0 Kudos

Hi Arnab

If you are using SimplePlain2XML conversion, you can refer to the following SAP library link for sample.

SAP Library - SAP Exchange Infrastructure

You do not have to worry that the xml.recordsetStructure goes to the last line after saving. The Swing client automatically sorts the parameter by Name upon saving. It won't affect the actual functionality.

Since you are using SimplePlain2XML conversion, you do not need the parameter xml.keyFieldType, that is only if your structure has multiple line types.

Also, you will need to set the following two parameters so that it mirrors exactly your current FCC setting.

xml.endSeparator = 'nl'

xml.ignoreRecordsetName = true

If you are still getting any errors during configuration or runtime, please provide screenshot of the error so that it can be analysed further.

Rgds

Eng Swee

Former Member
0 Kudos

Hi Eng Swee ,

 

       I tried changing as you have suggested. Still stuck with the same issue .

engswee
Active Contributor
0 Kudos

Hi Arnab

First of all, if you look at the error log, it is describing error during Message Mapping. This means that Plain2XML conversion using MTB at the adapter was successful (though not necessarily with the correct format.) Most likely the incorrect format is causing the error during the message mapping stage.

Can you please get the payload of the message and paste it here? Can you also provide the raw data of the file before conversion?

Also, there are a few typo errors with your configuration. The keys and values need to be exact.

Transform.ContentType = text/xml;charset=utf-8 (You have extra ContentType in front of the value)

xml.endSeparator = 'nl' (You spelled Seperator)

Please make these changes and try again, and if it does not work, please provide the raw data and payload as mentioned above.

Rgds

Eng Swee

Former Member
0 Kudos

Hi Eng Swee,

    I corrected the module configuration and retested . Its still throwing exactly the same error.

As previously asked by you , I am sharing sample data.

Test Data :

XXXXXXXXXXXX    123456 466         20140311210637201403128382PURCHASE   CR 70010000000000001000000004121661

XXXXXXXXXXX     123456 455         20140311210658201403128386PURCHASE   CR 70040000000000000700000004121671

Raw Data :

Content-ID:<soap-72b62414fa9911e3cbfe00001dfdfe36@sap.com>
Content-Disposition:attachment;filename="soap-72b62414fa9911e3cbfe00001dfdfe36@sap.com.xml"
Content-Type:text/xml; charset=utf-8
Content-Description:SOAP
<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'><SOAP:Header><sap:Main xmlns:sap='http://sap.com/xi/XI/Message/30' versionMajor='3' versionMinor='1' SOAP:mustUnderstand='1'><sap:MessageClass>ApplicationMessage</sap:MessageClass><sap:ProcessingMode>asynchronous</sap:ProcessingMode><sap:MessageId>e5cbef20-fa98-11e3-ab2f-00001dfdfe36</sap:MessageId><sap:TimeSent>2014-06-23T05:44:31Z</sap:TimeSent><sap:Sender><sap:Party agency='http://sap.com/xi/XI' scheme='XIParty'></sap:Party><sap:Service>ANZ_EFT_BS</sap:Service></sap:Sender><sap:Receiver><sap:Party agency='http://sap.com/xi/XI' scheme='XIParty'></sap:Party><sap:Service>BSXXXXXX_QAS_ECC6</sap:Service></sap:Receiver><sap:Interface namespace='urn:XXXXXXXX-com-au:misc:fin_anz_daily_eft_txns'>ANZDailyEFTTxt_OUT_Async_MI</sap:Interface></sap:Main><sap:ReliableMessaging xmlns:sap='http://sap.com/xi/XI/Message/30' SOAP:mustUnderstand='1'><sap:QualityOfService>ExactlyOnce</sap:QualityOfService></sap:ReliableMessaging><sap:System xmlns:sap='http://sap.com/xi/XI/Message/30' SOAP:mustUnderstand='1'><sap:Record namespace='http://sap.com/xi/XI/Message/30/general' name='interfaceDeterminationGUID'>b5d96605fa9711e3b04b00001dfdfe36</sap:Record><sap:Record namespace='http://sap.com/xi/XI/Message/30/general' name='senderAgreementGUID'>e2e1b5ec8f2637f68ef3b7866a259a34</sap:Record></sap:System><sap:DynamicConfiguration xmlns:sap='http://sap.com/xi/XI/Message/30' SOAP:mustUnderstand='1'><sap:Record namespace='http://sap.com/xi/XI/Message/30/routing' name='InterfaceDeterminationHash'>19b8afbe533fc90c76441a46d8603e47</sap:Record><sap:Record namespace='http://sap.com/xi/XI/Message/30/general' name='senderAgreementGUID'>e2e1b5ec8f2637f68ef3b7866a259a34</sap:Record></sap:DynamicConfiguration><sap:HopList xmlns:sap='http://sap.com/xi/XI/Message/30' SOAP:mustUnderstand='1'><sap:Hop timeStamp='2014-06-23T05:44:31Z' wasRead='false'><sap:Engine type='AE'>af.pdq.vicdaeq01</sap:Engine><sap:Adapter namespace='http://sap.com/xi/XI/System'>XIRA</sap:Adapter><sap:MessageId>e5cbef20-fa98-11e3-ab2f-00001dfdfe36</sap:MessageId></sap:Hop></sap:HopList></SOAP:Header><SOAP:Body><sap:Manifest xmlns:sap='http://sap.com/xi/XI/Message/30' xmlns:xlink='http://www.w3.org/1999/xlink'><sap:Payload xlink:type='simple' xlink:href='cid:payload-71c726d8fa9911e3c40700001dfdfe36@sap.com'><sap:Name>PXXXX</sap:Name><sap:Description>A file from the SFTP Server</sap:Description><sap:Type>Application</sap:Type></sap:Payload></sap:Manifest></SOAP:Body></SOAP:Envelope>Content-ID:<payload-71c726d8fa9911e3c40700001dfdfe36@sap.com>
Content-Type:ContentType  text/xml;charset=utf-8
Content-Disposition:attachment;filename="PXXXXX.xml"
Content-Description:P140619
<?xml version="1.0" encoding="utf-8"?>
<ns:ANZDailyEFTTxt_MT xmlns:ns="urn:7eleven-com-au:misc:fin_anz_daily_eft_txns">
<row>
  <Terminal_ID>XXXXXXXX</Terminal_ID>
  <Card_Number>XXXXXXXXX</Card_Number>
  <Txn_Date>20140617</Txn_Date>
  <Txn_Time>210628</Txn_Time>
  <Post_Date>20140618</Post_Date>
  <Txn_SeqNum>0681</Txn_SeqNum>
  <Txn_Type>PURCHASE</Txn_Type>
  <Cust_AccType>CR</Cust_AccType>
  <Res_Code>7101</Res_Code>
  <Cashout_Amt>00000000</Cashout_Amt>
  <Total_Amt>00071789</Total_Amt>
  <RRN>000004747261</RRN>
</row>
<row>
  <Terminal_ID>XXXXXXXXX</Terminal_ID>
  <Card_Number>XXXXX XXXX</Card_Number>
  <Txn_Date>20140617</Txn_Date>
  <Txn_Time>210700</Txn_Time>
  <Post_Date>20140618</Post_Date>
  <Txn_SeqNum>0682</Txn_SeqNum>
  <Txn_Type>PURCHASE</Txn_Type>
  <Cust_AccType>CR</Cust_AccType>
  <Res_Code>7050</Res_Code>
  <Cashout_Amt>00000000</Cashout_Amt>
  <Total_Amt>00072109</Total_Amt>
  <RRN>000004747262</RRN>
</row>

</ns:ANZDailyEFTTxt_MT

Thanks and Regards,

Arnab Mondal.