cancel
Showing results for 
Search instead for 
Did you mean: 

Need help on how to handle zip & text/csv as a resposne payload from Concur RestWebservice

Former Member
0 Kudos

Hi All,

We are getting zip(if there are multiple files) and test/csv(single file) as a response payload from the concur rest API and need your help on how to handle in NWBPM and SAP PO.

Zip response coming in response looks like below -

PKÀ˜F7extract_attendee_detail_p0600908soav_20150424022159.txts� rt©1204Õ50Ñ52©1¨áåPKzà@ÆPKÀ˜F2extract_CES_SAE_v3_p0600908soav_20150424022148.txts� rt©1204Õ50Ñ52©1¨©1ãåPKå늟PKÀ˜Fzà



Text/csv response looks like below -


Extract|2015-24-40|20|0



Need you help on how to handle the zip content response.


Also need help on how to handle when text/csv response comes and when zip response comes.


As per the scenario, there are 4 calls to be made and we are using NWBPM and in the last call the actual respons (text/csv or zip) will come.



Please provide your inputs.


Thanks

Narayanareddy B

Accepted Solutions (0)

Answers (2)

Answers (2)

engswee
Active Contributor
0 Kudos

Let's backtrack a little bit here.

It doesn't sound right that sometimes you are getting a Zip and sometimes a CSV. Please check with your Concur consultant on this. You should either be getting one or the other. If the extract definition is configured to supply multiple types of files, then you should always get a Zip. If it is configured for only one file, then it is always a CSV.

Get your SAP functional consultant(s) involved too because they would need to advise from a business perspective what extract files they want to get from Concur.

Without finalising the file format, there is no point really in trying to fix the error you are getting above because if it's always a CSV, the above issue is no longer relevant.

Sort that out and let us know once you have further updates.

Former Member
0 Kudos

Have you considered a Java mapping and the PayloadZipBean?

Former Member
0 Kudos

Hi Aaron,

Thanks for your reply.

I tried with Payload zip bean and the java mapping as mentioned in the response mapping of OM.

Payload zip bean - Zip  zip.mode  unzip

I am getting the error below in the receiver rest channel -

"Transmitting the message using connection JPR failed, due to: com.sap.aii.af.lib.mp.module.ModuleException: Zip: error occured during processing: java.util.zip.ZipException: invalid stored block lengths"

Java Mapping - used the java mapping in the response of Operation mapping

Here also i am seeing the same error in the channel log as it is synchronous step and the message got cancelled.

"Transmitting the message using connection JPR failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error encountered while executing mapping: com.sap.aii.af.service.mapping.MappingException: Mapping failed in runtimeApplication mapping program com/equalize/xpi/esr/mapping/java/UnzipAndAttach throws a stream transformation exception: Exception: invalid stored block lengths"

The below is the response i am seeing and is it proper zip response payload(any encryption) , kindly advise.

PKâE�F:ws_extract_attendee_detail_p0600908soav_20150424083413.txts� rt©1204Õ50Ñ52©1¨áåPKzà@ÆPKâE�F5ws_extract_CES_SAE_v3_p0600908soav_20150424084014.txtíTß��@~oÒÿ�÷Fº»ìV}ëòCÏz Qljß8ÜöL�`N�ùão8�Ò«�´M�Ü@�awvçûfgÇùâϤå#Ttï0Ø�B�²·olÇ�£[4Ï](L�]«�ÑbÀôÁÒc�0ÀÏdAªÙТ¨Ìû�Êv¡�b¤eJA%��=Þ7Í>PÚ=í2��7ò[�¼¡=q/°¶�*ø)

K|<`BgÉÔºÜWs[§J�&Ñ:Ìá:´�ç«�RÐv�ÚÅAD'\�ÁtR²*DP3gî:B@JëhU�Ò'¬�ùQ\�È\D{·O×±JS\ï�-ò�¸�Þ²êó�{Å¡2®â,MmÉù XAzßüBn&®Sl-§�l¶A�×ú½³ÙFI®0¿©Ú¯¤�oT�iV²RÀJ��­¼«`õ»�í Ûéwa#�àpY�««óq)U°JaøÁA�ûì>Ù­³üHåÒe¾�7��Ð/§£u°Nzã÷ç4×·èãþ�¾}õ0ÙµYÄ�+J��eX\�E±ïsR%®yÜÕðsªáÚ$qÚÎÇ�Û$^%1¸AF*ý¶VÑêxÏZÏ¢U½T~Ñ®ØkW5ç×®õ¿w­5¬zò:oN»�ô���í­ø÷úÛÙ=¬å�[ôÚ�þmczPKhÏ��i PKâE�Fzà@Æ:ws_extract_attendee_detail_p0600908soav_20150424083413.txtPKâE�FhÏ��i 5�ws_extract_CES_SAE_v3_p0600908soav_20150424084014.txtPKËö

Thanks

Narayanareddy B

Former Member
0 Kudos

I think this error indicates an issue with the file encoding.