Problem using clienthttp

Hi,

I’m using the SAP BC to develop a new package, that needs to send a message to an SAP Messaging System, using HTTP. The problem is: I need to define an “Content-Type=application/xml” element on the “Headers” object, as input to the service.

After sending the message, what is an MIME message (composed by an XML document and some attached TXT files), the output shows me the “Header” object with the “Content-Type=text/plain”.

So, I have an error: the service needs to receive the “Contect-Type” as “application/xml”, but the service seems to be changing it internally, not respecting the input I specified.

I’m using the “client:Http” service with the parameters:
method=POST
loadAs=bytes
The content of the message is passed either as “String” or “mimeStream”.
And, in “Headers”:
Content-Type=application/xml

Don’t really know what to do. I believe I tryed all possible combinations (sending the “application/xml” in MIME headers, etc…) but the behavior is always the same.

Does somebody has already seen this?
Some suggestions?

Hope you can help me.

Regards,

Pedro Pontes

BC Package
DABIntegration_12082003.zip (31.3 k)

This sounds vaguely familiar. Try a lower case T:

Content-type=application/xml

in the header.

HTH,
Fred

content type should be all lower case:

content-type=application/xml

I think that all case possibilities (“Content-Type”, “Content-type”, “content-type”) have been tried. I’ve tried even setting the “content-type” element inside each MIME object and Payload headers.

I think this is a very specific problem.

Is it possible that the problem is hard-coded in SAP BC?
How to workaround that?
Some suggestions?

Thanks again,

Pedro

Your question is not quite clear to me. Are you trying to send a MIME message or an XML message? Are you concerned with the response from SAP or the request you send to SAP?

A mime message is quite different from an XML message (even if the MIME message is made up of XML files). A MIME message has it’s own content type which is not application/xml -something like multipart/related. XML files should have the content-type set to text/xml.