How to send SOAP messages with attachments?

I am consuming a web service using an interface automatically generated from a RODL file.
Is there a way to send attachments using the CID URI scheme?

Thanks

Hi,

can you show example of such SOAP request, pls?
you can use support@ for keeping privacy

Sure,
The raw request should be as follows:

--uuid:7b317f0c-6225-4596-84d1-5d53e7a1a28a
Content-Id: <rootpart*7b317f0c-6225-4596-84d1-5d53e7a1a28a@example.jaxws.sun.com>
Content-Type: application/xop+xml;charset=utf-8;type="text/xml"
Content-Transfer-Encoding: binary

<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:HNS="http://tempuri.org/"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:v1="http://service_____________.com/wsdl">
    <SOAP-ENV:Header />
    <SOAP-ENV:Body xmlns:ro="http://www.w3.org/2001/XMLSchema-instance">
        <v1:MessageSubmission>
            <v1:Login>
                ...
                ...
                ...
            </v1:Login>
            <v1:SubmitMessageRequest>
                ...
                ...
                <v1:AttachmentFile>
                    <v1:href>cid:243bc04e-faa1-4de1-9da2-fc0a024d1db5@example.jaxws.sun.com</v1:href>
                </v1:AttachmentFile>
            </v1:SubmitMessageRequest>
        </v1:MessageSubmission>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

--uuid:7b317f0c-6225-4596-84d1-5d53e7a1a28a
Content-Id: <243bc04e-faa1-4de1-9da2-fc0a024d1db5@example.jaxws.sun.com>
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary

    ... data (binary or text) ...
-uuid:7b317f0c-6225-4596-84d1-5d53e7a1a28a--

Here are some references:

https://en.wikipedia.org/wiki/XML-binary_Optimized_Packaging#Usage_in_SOAP_Web_services
https://docs.roguewave.com/hydraexpress/4.6.0/html/rwsfwsdevug/17-2.html
https://docs.microfocus.com/SM/9.60/Codeless/Content/webservicesguide/reference/attachment_operations_using_SOAP_API.htm

Thanks for help!

Hi,

this feature isn’t supported, but you can do it manually:
you can use Channel.OnSendStream event and modify stream that will be sent to server.

for adding attachment you can use class from uROMime.pas unit