cancel
Showing results for 
Search instead for 
Did you mean: 

Receiver HTTP-adapter, Content Server, missing payload

Former Member
0 Kudos

Hi Experts!

We have a scenario where we transform a xml-file into html-message, and try to post it to a SAP content server, using the HTTP-adapter on the receiving side. ( file --> HTTP POST)

Our problems are:

1. Using ICM Monitor (SMICM), and setting trace level to 3, we can view the raw HTTP POST message and notice that the HTTP body is empty. (se HTTP message below)

2. We need to set a few "Content Headers" when using HTTP POST to the Content Server. Like X-compId, Content-Type and Content-Length. I've been told to use the "prolog" and "epilog" parameters for this, but again, when I try this, I still can't see them when viewed in ICM Monitor in the raw HTTP POST message.

So the question is, do anyone have any tips to help out?

We've also been searching all over for similar scenarios, and have found very few of them, but where most of them seam to abandon the HTTP-adapter for Java-proxys or Java-Mappings to produce their own raw HTTP POST message. Is it really so that you can't use the HTTP-adapter to POST document on a SAP Content Server?

The HTTP POST message from ICM Monitor:

-


POST /ContentServer/ContentServer.dll?create&pVersion=0046&contRep=Z3&docId=4999D6B33A560070E10080000AFC4294 HTTP/1.0
content-type: multipart/form-data; boundary=ejjeeffe0
content-length: 28
connection: closeaccept: */*
user-agent: SAP Web Application Server (1.0;700)
host: scsscd.digoff.no:1090
accept-encoding: gzip

--ejjeeffe0
--ejjeeffe0--

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

We managed to solve this one ourselves, and here is what was wrong:

1. The reason for empty HTTP body was that we didnt set boundary=ejjeeffe0 in the Content Type in the HTTP-adapter.

2. We didnt see the content headers for the same reason as in 1.

After doing this, we had a lot of problems to POST the dokument onto Content Server, but mainly because of Content-Length=XXXX in the content header. This has to be exactly on the byte, or you will get a HTTP 400 Bad request. The HTTP header Content-Length will be calculated by the HTTP-adapter for you.

We used a Java Mapping to calculate the Content-Length, using byte-array, and also to generate the entire content part of the HTTP-request, with boundaries, header and body. We gave up on the HTTP-adapters "prolog" and "epilog"

Hope this helps!