[gmime-devel] Using GMime to build SOAP multipart messages
- From: Johan van den Berg <phenom jvdb gmail com>
- To: gmime-devel-list gnome org
- Subject: [gmime-devel] Using GMime to build SOAP multipart messages
- Date: Mon, 14 Jul 2014 13:37:09 +0200
Hi
Hopefully this turns out to be really simple and I'm staring at the obvious but not connecting the dots. :)
I have two problems:
1:
Essentially, its a multipart/related where its first part is a SOAP envelope XML string, followed by attachment parts or even other embedded multiparts.
Building this multipart I think I have figured out. The problem I am running into is that I need to separate the top level multipart message's headers from the rest of its contents, as I need to set these headers as HTTP headers. (I am using libcurl to facilitate the HTTP part of the process).
I COULD go and do this by simply calling g_mime_object_to_string() on the GMimeObject and searching for the start of the boundary (from the Content-Type header), and only copying the rest for use as the body. But I was hoping that there would be a neater way to do this directly.
2:
I already have my attachments as base64 encoded strings when I get to this point in the process. I would like to add them as parts to the multipart directly (with Content-Transfer-Encoding set to base64), without needing to decode and re-encode the data unnecessarily.
Regards
Johan
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]