cancel
Showing results for 
Search instead for 
Did you mean: 

HTTPS Post with a flat file

jmalla
Contributor
0 Kudos

I have a scenario where I am picking up a file from ECC and need to do an HTTPS post to an external web server.

I have created the RFC destination and entered this in the HTTP Destination in the HTTP receiver adapter.  For the Content/type, the default is text/xml.

I want to simply Post the file as is without any conversion.  Do I need to change the Content/type?  The file that I am using is simply a text file with no XML.

Regards,

Jay

Accepted Solutions (0)

Answers (1)

Answers (1)

jmalla
Contributor
0 Kudos

The Java HTTP adapter in PI 7.3 has various options including what we need.  However, we are on PI 7.1 so what do not have that option.

The HTTP adapter does not have too many options.  Another way maybe to use the SOAP adapter and not include the SOAP envelope - but I am not sure if that would help.

markangelo_dihiansan
Active Contributor
0 Kudos

Hello Jay,

Yes this should be possible. But as for the content-type, it would be best to execute a successful request using an external tool and examine the HTTP header. It should tell you the correct content-type to use.

Regards,

Mark

jmalla
Contributor
0 Kudos

Hi Mark,

We are able to post the file to the Vendor.  But the vendor is not accepting the Post:

From the SMICM trace, i see the following:

Content-Disposition: attachment;filename="MainDocument.xml"

Content-Type: application/xml

Content-Description: Main Document

and then the contents of the flatfile.....

But somehow the vendor is not accepting the post - so I changed the Content-Type: to text/plain but it did not make a difference in the HTTP Post.  The Content-Type still showed as application/xml.  The contents that we are posting is just a text file.

Regards,

Jay

markangelo_dihiansan
Active Contributor
0 Kudos

Hello Jay,

The content-type for POST is normally application/x-www-form-urlencoded, can you try it out?

Also, can you ask the third party to provide you with their service description similar to the screenshot below:

Hope this helps,

Mark