cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Receiver Adapter capable of posting.CSV files as output payload?

former_member200386
Active Participant
0 Kudos

Dear Expert,

I am working on File to HTTP adapter(pass through) scenario  where i need to  pick the .csv files from shared directory and post target system using HTTP adapter . As far as i know HTTP adapter simply post files no matter which format it was.  I  can see one parameter Content type in HTTP receiver adapter comm channel configuration by default it was text/xml , if  i mention as CSV will my scenario work? . My client is not ready to go with (SOAP, FILE adapter usage). This is the only option i have go with HTTP adapter.

Parameters from the Communication Channel for Technical Routing

●      Content type (the entry text/XML is expected as default)

Specifies the content format  (payload) that the message should have.

●      (Optional) header fields for the receiver-specific protocol

http://help.sap.com/saphelp_nw04/helpdata/en/43/64dbb0af9f30b4e10000000a11466f/content.htm.

Thanks & Regards,

Pavan

Accepted Solutions (0)

Answers (2)

Answers (2)

markangelo_dihiansan
Active Contributor
0 Kudos

Hello Pavan,

Use an HTTP sniffer, execute a successful request and then share to us the HTTP Header and Body format that is required.

The Plain HTTP Adapter only supports HTTP 1.0 and it needs an HTTP Body to work. Please let us know of your results.

Hope this helps,

Mark

former_member200386
Active Participant
0 Kudos

Hi Mark,

I need to post  this below .csv file s http adapter.My scenario is File to HTTP(Pass through NO Mapping required).

"InvoiceNumber","InvDate","InvoiceAmount","VendorNumber","CheckIdentifier","CheckDate","PaymentAmount","InternalComments","RemittanceNotes"

"TESTCOX002",01-FEB-13,100000.00 ,"1000004871","1012987",25-FEB-13,100000.00 ,,

"TESTCOX003",01-FEB-13,200000.00 ,"1000004871","1012987",25-FEB-13,200000.00 ,,

How do i make request using HTTP sniffer. i downloaded http snipper software from below website.

http://www.cleanersoft.com/sniffer/free_http_sniffer.htm

how do i can configure my receiver HTTP comm channel(target URL, Path preifx..... ) and test my scenario?

can you  please guide me how i can create http header and body based up on my structure. 

Thanks & Regards,

pavan

markangelo_dihiansan
Active Contributor
0 Kudos

Hello Pavan,

I'm using fiddler as my sniffer. First, open your sniffer. Then make a successful request to the website you want. It should be able to capture the HTTP Header(s) and HTTP Body needed. Say for example: Clicking on a thread in SDN after you open Fiddler would give a screenshot like the one below.

Based on that, you would know that it is using HTTP GET as a method. Cookies are used and that entity content type is using JSON.

Show us the HTTP Header of your receiving application so that we can help you more.

Hope this helps,

Mark

former_member200386
Active Participant
0 Kudos

Hi Mark,

Thanks for the prompt response.

My source structure is below

InvoiceNumber","InvDate","InvoiceAmount","VendorNumber","CheckIdentifier","CheckDate","PaymentAmount","InternalComments","RemittanceNotes"

"TESTCOX002",01-FEB-13,100000.00 ,"1000004871","1012987",25-FEB-13,100000.00 ,,

"TESTCOX003",01-FEB-13,200000.00 ,"1000004871","1012987",25-FEB-13,200000.00 ,,

I need to post this .csv file using http form post method  using plain HTTP adapter.

I am not sure thet HTTP adapter is capable of posting .csv format as output , so i want to create a dummy scenario to find HTTP adapter is capable or not . if it success, then i will go with this approach and start my actual scenario.

I am very confused about HTTP receiver part. How can i test the scenario( i don't have any details of receiver appilcation, hence it is a dummy scenario)

I am confused about HTTP header part. can you please help  on this ?

Thanks & Regards,

Pavan

udo_martens
Active Contributor
0 Kudos

Hi Pavan,

you need to ask the owner of the receiver system which content type he expects. Or find it out by trial&error...

/Udo

former_member200386
Active Participant
0 Kudos

Hi Udo,

Thanks for the prompt response. My receiver expects data in .csv format only.  This is my requirement.

I need to pick .csv files from my source directory using File adapter(NFS protocaol)and need post to the .csv files to target using HTML form post for this requirement (No Mapping required).

To achieve this requirement my design plan is to go with.

File --->HTTP adapter.   can i achieve this by changing content type as CSV in my comm channel configuration.

i want create a POC in  my landscape to test the scenario. how can i test the scenario end to end?

I serached in SCN got the code for HTTP client test tool. can i use this tool to test at receiver end also?

Thanks & Regards,

Pavan

udo_martens
Active Contributor
0 Kudos

Hi Pavan,

File --->HTTP adapter.   can i achieve this by changing content type as CSV in my comm channel configuration.

You set the content type as a http header field. Nobody at SDN can know if this will be accepted, only the receiver system owner.

i want create a POC in  my landscape to test the scenario. how can i test the scenario end to end?

You can, for example, sent the the request to PI, he, he. http://host:port/sap/xi/adapter_plain?sender=pavan&interface=poc&namespace=ns&qos=EO

I serached in SCN got the code for HTTP client test tool. can i use this tool to test at receiver end also?

no, of course not

/Udo