cancel
Showing results for 
Search instead for 
Did you mean: 

Swift adapter error : Message does not start with character '0x1f'

Former Member
0 Kudos

Hi PI/Swift gurus,

I am facing a basic but major issue. I have Swift 940 for which I am trying to create an inbound interface using PI 7.1. We installed SWIFT components on PI and trying to create an adapter. Problem is Adapter is not processing the files and showing following error:-

09.02.2012 15:09:08.312 Error MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.xi.swift.ParserException: com.sap.xi.swift.ParserException: Message does not start with character '0x1f'

09.02.2012 15:09:08.312 Error File processing failed with com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.xi.swift.ParserException: com.sap.xi.swift.ParserException: Message does not start with character '0x1f'

I am using following modules in adapter as told by SAP:-

localejbs/swift/FINConversionFromSWIFTModule

CallSapAdapter

I am using following key also as told by SAP:-

KeyId = SWIFT

Please let me know if anyone has already faced this kind of problem.

Regards,

Urjit

Accepted Solutions (0)

Answers (3)

Answers (3)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Urijit and Hidayat,

Could you please kindly email me or post here the links to documentaion on the file types you trying to decode?

The documentaion should explain the format of these files. I think you wanna convert them to XML. I will try decoding these files if could please provide a sample and the structural documentation of these files.

Regards

Anupam

Former Member
0 Kudos

Hi Anup,

I have managed to pass prefix checking 0x1f, but then since my sample file is doesn't have signature i got another error.

according to SAP Integration Package for SWIFT i can disable the signature checking but then keep throw me another error

"com.sapcons.xi.swift.CryptServiceExeption: keyid is null".

any idea ?

UseLocalSecurity

This parameter specifies if the HMAC-SHA256 hash value for Local Authentication should be

generated based on the value of the parameter KeyId and be added to the header of SWIFT

XMLv2 file (FIN) or to the *.par file (FileAct).

Possible values: true/ false

Default value: true

KeyId

Symmetric key used for hash value calculation and maintained via the KeyManager

application that is part of the SAP Integration Package for SWIFT. The value must be

identical to the concatenated left part and right part key used in SWIFTAlliance for the

emission and / or reception profile.

You can access the KeyManager application using the link

http://<host>:<port>/webdynpro/dispatcher/sap.com/fscm~swiftwda/KeyManager.

Possible values: as specified in KeyManager application

Default value: SWIFT

IsNotificationRequested

Former Member
0 Kudos

HI Anupam,

I appreciate your help but we don't have XML schema to validate XML files. I think you will require XSD for this.

Hi Hidayat,

Please send me your xml files which you have , let me see what error I am getting. Because I could not go through the first error itself.

Please email me on urjit.texas*gmail*com.

Regards,

Urjit

anupam_ghosh2
Active Contributor
0 Kudos

Hi Urijit and Hidayat,

I understand that you do not have XSD for validation. I feel the problem you are dealing with is new to PI community. If by java code I am able to convert the file into an valid XML structure then I feel problem can be resolved.

As I have no roadmap, only way to proceed with sample file and the file structure information, hence if possible please email me the file sample, structure information, links to any blogs dealing with SWIFT which you are folllowing.

Regards

Anupam

0 Kudos

Hi Hidayat,

the question is how did u skip prefix checking 0x1f,

I've got the error

com.sap.xi.swift.ParserException: Message does not start with character '0x1f' -

continue processing

file starts with-

{1:F01K059260000000000000000}

{2:O9401412310000SKKB0000000000000000000000000000U}

{4:

:20:0000000000000100

:12:400


Former Member
0 Kudos

Hi urjit,

SAP Integration Package for SWIFT only supported XML v2 SAA format. The file should be in below structure.

The application and Alliance Access exchange PDUs that are sequences of bytes with the

following structure:

u2022 Prefix (1 byte): the character 0x1f.

u2022 Length (6 bytes): length (in bytes) of the Signature and DataPDU fields: this length is

base-10 encoded as six ASCII characters, and is left-padded with zeros, if needed.

u2022 Signature (24 bytes): signature computed on the DataPDU using the HMAC-SHA256

algorithm, base-64 encoded (see "Computing the Signature of a DataPDU").

This signature authenticating the originator of the DataPDU (the application or Alliance

Access) and guarantees the integrity of the DataPDU. This action is referred to as local

authentication (LAU). If Alliance Access is configured to not require LAU, then the field must

contain NULL characters.

u2022 DataPDU: XML structure containing the information relevant for processing (message or

report) encoded in UTF-8 format.

I am still working with the solution. we can sharing the information. You need to inform the SWIFT Alliance team to provide you sample in XML v2 SAA format not RJE format.

Best Regards

Hidayat.

Edited by: Ki Hidayat on Feb 16, 2012 2:45 AM

Former Member
0 Kudos

Do you please send me one test/example file

Former Member
0 Kudos

Also what are you using to convert SWIFT files into XML v2 SAA format? Are you using some other adapters?

Former Member
0 Kudos

I am still requested the correct file from the vendor. Same like you i am using SAP Integration Package for SWIFT (file adapter with module).

Former Member
0 Kudos

Hi Hidayat,

Thanks for your response. Atleast I get some response. What architecture are you using. Are you just using SAP SWIFT adapters or you are also using some SeeBurger/iway or conversion agents?

Regards,

Urjit

Former Member
0 Kudos

Files which I tried to use looks like this:-

File 1 :-

}}}$}{4:

:20:0000018783011849

:2

File 2:-

-

:20:0999999399994999

:21:021000021

:25:399994999

:28C:09085/00001

:60F:C090326USD0,00

:61:090326DD698,05NSTONONREF//0844618888TC

:86:010<00<10NONREF<20ORIGCONAME=XXXXXXXXXXXX,ORI<21GID=9000000000,DE

:86:SCDATE=090<22325,ENTRYDESCR=TESTACCTS,EN<23TRYCLASS=CCD,TRACENO=0

:86:21000<24024618409,ENTRYDATE=090326,<25INDIDNO=000022,INDNAME=CASS

:86:<26XXXXXXXXXX<30<31<32CASSXXXXXXXXXX

:61:090326DD521,59NSTONONREF//0844618407TC

:86:010<00<10NONREF<20ORIGCONAME=XXXXXXXXXXXX,ORI<21GID=9000000000,DE

:86:SCDATE=090<22325,ENTRYDESCR=TESTACCTS,EN<23TRYCLASS=CCD,TRACENO=0

:86:21000<24000000000,ENTRYDATE=090326,<25INDIDNO=033333,INDNAME=CZZZ

:86:<263ZZZZZZZZ<30<31<32CZZZZZZZZZZZZ

:61:090326DD62,37NSTONONREF//0444444410TC

:86:010<00<10NONREF<20ORIGCONAME=TESTINFOTEST,ORI<21GID=9000000000,DE

:86:SCDATE=090<22325,ENTRYDESCR=TESTACCTS,EN<23TRYCLASS=CCD,TRACENO=0

:86:21000<24000000000,ENTRYDATE=090326,<25INDIDNO=088888,INDNAME=CZZZ

:86:<263ZZZZZZZZZZZZD<30<31<32CZZZZZZZZZZZZZZZTD

:61:090326DD59,68NSTONONREF//0844618406TC

:86:010<00<10NONREF<20ORIGCONAME=TESTINFOTEST,ORI<21GID=9000000000,DE

:86:SCDATE=090<22325,ENTRYDESCR=TESTACCTS,EN<23TRYCLASS=CCD,TRACENO=0

:86:21000<24000000000,ENTRYDATE=090326,<25INDIDNO=077777,INDNAME=CLSS

:86:<263K7YYYYYYYYTD<30<31<32CLSS3K7YYYYYYYYTD

:61:090326DD45,57NSTONONREF//0844618411TC

:86:010<00<10NONREF<20ORIGCONAME=TESTINFOTEST,ORI<21GID=9000000000,DE

:86:SCDATE=090<22325,ENTRYDESCR=TESTACCTS,EN<23TRYCLASS=CCD,TRACENO=0

:86:21000<24000000000,ENTRYDATE=090326,<25INDIDNO=055555,INDNAME=CLSS

:86:<26DDDDDDDDDDDDDDD<30<31<32CLSSDDDDDDDDDDDDDDD

:62F:C090326USD0,00

:64:C090326USD0,00

:86:AVG MTDC0,00AVG PREV MTDC0,00AVG YTDC0,00NUMBER OF CREDITS=0SUM O

F CREDITS=0,009NUMBER OF DEBITS=5SUM OF DEBITS=44188,99