Skip to Content
0
Sep 28, 2021 at 07:26 AM

Sending cXML with attachments to Ariba Network using Multipart Encoder in SAP integration suite/ CPI

257 Views

Hello experts,

I am working on sending Quote Request cXML with attachments to Ariba Network. We are using SAP CPI for integration and I used multipart encoder to send the message to Ariba Network. I earlier tried with Ariba adapter on CPI but it doesn't work. So I went ahead with generic HTTP receiver adapter.

My I-Flow looks like this -

An my output payload looks like this -

On this, Ariba sends a response -

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "cXML.dtd">

<cXML timestamp="2021-09-27T23:13:37-07:00" payloadID="7">

    <Response>

        <Status code="406" text="Not Acceptable">The document could not be parsed: Content is not allowed in prolog.
            (line 1, column 1) [ANCLS-125039010]</Status>

    </Response>
</cXML>

I did some google and understood that nothing should come before <?xml version..?> after multipart begin. But standard multipart encoder is putting the Content-Type, Content-Transfer-Encoding after multipart boundary begin.

I tried with multipart mixed and multipart related. Also in multipart encoder, I kept following config -

I tried removing checkbox also or removing the include headers option etc.. But it is not working.

I went through Harsha Gaonkar's blog - MIME Multipart encoder to send multiple attachments to Ariba

But it doesn't work for me.

Can someone guide how to tackle this or provide solution?

Regards,

Yayati Ekbote