cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Adapter Settings (Receiver Channel)

Former Member
0 Kudos

Hi Everyone,

I need some help with setting up HTTP Receiver Channel.

What I am trying to do is download some files from a URL. e.g www.xyz.com/download.asp.

So I have set up a RFC destination to Remote server then we through a dummy message from the HTTP client to trigger the channel. It is all good and working. However the issue part is username/password has to be sent as application/x-www-form-urlencoded or multipart/form using POST method.

So it has to go something like this username=abc&password=123

And this is the part where I am stuck. I have read a bit about it and sap documentation suggests using prolog and epilog but I don't seem to find any example of it anywhere. If someone has done anything similar can they please help. Can't find any source relevant.

regards

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Again

Guys I will be highly thankful. If anyone can please help. Stuck on this issue for quite a few days now.

regards

former_member187339
Active Contributor
0 Kudos

Hi,

Can you tell us what parameters are you using in HTTP receiver adapter. have you tried using content type as application/x-www-form-urlencoded and choosing url address along. also select login to non-sap system..

Are you getting any error?? Actually the info provided by you is not clear to me. So will be better if you provide some more details

Regards

Suraj

Former Member
0 Kudos

Hi Suraj

Stepwise what I have done so far.

1. Created RFC - connection to external server using SM59 (Installed certificates in STRUST given HTTPS connection)

2. Created a channel (Receiver) HTTP

3. Given RFC as destination

4. Content type used is application/x-www-form-urlencoded

So everything is working fine. I have checked with the people on the server side they can see my traffic coming and SSL is happening too.

After this the next step is username/password authentication which I am meant to send as part of the HTTP message as HTML form "name/value" pairs.

And this is the part I am not finding any way to do. I hope this is clear now.

Mate any help on this will be awesome.

regards

former_member187339
Active Contributor
0 Kudos

Hi,

Yes I understood your steps and the problem (actually after posting reply i had some doubts in my mind too, so went on a SDN forum hunt)

After doing a bit of research work my finding are:

1. IT is difficult to use http adapter with this content type as the credentials given in http adapter is not used when you have application/x-www-form-urlencoded. The thread which helped me to understand was this

2. There in the thread stefan is proposing java proxy for doing this type of connectivity so next search tool for me was google. Doing a bit of search i found this SUN link http://developers.sun.com/mobility/midp/ttips/HTTPPost/

3. So as a solution for you I would propose to use a receiver java proxy and write the code as mentioned in SUN.

Hope this may be of some help to you

Regards

Suraj

Former Member
0 Kudos

Yes,

I understand that. However two issues with that:

1) I am not familiar with Java proxies is there a good luck for that for PI?

2) How do i link the proxy with HTTP call and pass these values on?

regards

But beside the above I think it is a very common requirement and there should have been an easier way to do this?

regards

former_member187339
Active Contributor
0 Kudos

Hi,

>>1) I am not familiar with Java proxies is there a good luck for that for PI?

There are two articles (PDF ) from sudhir, which will giev you a good start. and also multiple inbound java proxy blogs are available in sdn..

>>2) How do i link the proxy with HTTP call and pass these values on?

PI will call java proxy there you will make HTTP call to the url whcih you have (you can use the code from SUN)

>>But beside the above I think it is a very common requirement and there should have been an easier way to do this?

Hmm, lets see whether you get any better suggestion.. But in mean time you can give a try for java proxy

Regards

Suraj

Former Member
0 Kudos

Hi Everyone,

Like I said it is a common expectation to be able to send data in body in HTTP for certain reasons as I needed for authentication. Have resolved the issue and given I couldn't find a solution on SDN I suppose probably best will be do a blog on how to download/upload files using HTTP. Should do it over next week days.

many thanks for all the help.

regards