Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4246908
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:02:14+00:00 2026-05-21T04:02:14+00:00

Need to send and receive a SOAP message in the following format from a

  • 0

Need to send and receive a SOAP message in the following format from a third party:

POST /api HTTP/1.1 
Host: mytesthost.com
Content-Type: multipart/related;  
boundary="aMIMEBoundary";  
type="text/xml";  
start="<soap-start>" 
Content-Length: 2014 
SOAPAction: "" 

--aMIMEBoundary 
Content-Type: text/xml; charset=us-ascii 
Content-Transfer-Encoding: 7bit 
Content-ID: <soap-start> 

<?xml version="1.0" encoding="UTF-8"?> 
<soap-env:Envelope xmlns:soap-
env="http://schemas.xmlsoap.org/soap/envelope/"> 
<soap-env:Header>
... 
</soap-env:Header> 
<soap-env:Body> 
...
</soap-env:Body> 
</soap-env:Envelope> 

--aMIMEBoundary 
Content-Type: image/gif 
Content-ID: dancingbaby.gif 
Content-Transfer-Encoding: base64 
Content-Disposition: attachment 

<Binary Data Here> 

--aMIMEBoundary-- 

Is this considered “SOAP with Attachment”? We just started looking into this and found very thin support for sending this type of message using .NET technologies.

Please let me know if you have a starting point for this type of operation. We’ve looked at ServiceStack and PocketSOAP (SOAP Frameworks for .NET).

We’ve also seen DIME and MTOM mentioned. Can this take the place of an SWA (SOAP with Attachment) message?

Please let me know if you need more info. We’re mainly trying to focus on sending binary data as part of a SOAP message and this is our first exposure to it. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T04:02:14+00:00Added an answer on May 21, 2026 at 4:02 am

    Note in ServiceStack you can accept uploaded HTTP Files via the multipart/form-data Content-Type which is the recommend way for optimal interoperability and performance.

    There’s an example of doing this in the GitHub’s Rest Files project.
    Here is the C# client example showing how to upload a file:

    [Test]
    public void Can_WebRequest_POST_upload_file_to_save_new_file_and_create_new_Directory()
    {
        var restClient = CreateRestClient();
    
        var fileToUpload = new FileInfo(FilesRootDir + "TESTUPLOAD.txt");
    
        var response = restClient.PostFile<FilesResponse>("files/UploadedFiles/", 
            fileToUpload, MimeTypes.GetMimeType(fileToUpload.Name));
    
        Assert.That(Directory.Exists(FilesRootDir + "UploadedFiles"));
        Assert.That(File.ReadAllText(FilesRootDir + "UploadedFiles/TESTUPLOAD.txt"),
                Is.EqualTo(TestUploadFileContents));
    }
    

    You can view-source of the Ajax example to see how to do this in JavaScript.

    And here is the web service implementation to process the uploaded files:

    public override object OnPost(Files request)
    {
        var targetDir = GetPath(request);
    
        var isExistingFile = targetDir.Exists
            && (targetDir.Attributes & FileAttributes.Directory) != FileAttributes.Directory;
    
        if (isExistingFile)
            throw new NotSupportedException(
            "POST only supports uploading new files. Use PUT to replace contents of an existing file");
    
        if (!Directory.Exists(targetDir.FullName))
        {
            Directory.CreateDirectory(targetDir.FullName);
        }
    
        foreach (var uploadedFile in base.RequestContext.Files)
        {
            var newFilePath = Path.Combine(targetDir.FullName, uploadedFile.FileName);
            uploadedFile.SaveTo(newFilePath);
        }
    
        return new FilesResponse();
    }
    

    Hope it helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to send and receive get post requests
I have a CUSTOM PLUS II USB printer that I need to send and
I'm setting up a really simple WCF service whos only job is to receive
Hi I created my first web service. It work fine but now I need
I want to upload files from a client location to a server. At present,
I'm trying to send a network packet of data to a hardware device. I
I'm looking for a delphi component or ActiveX which can access to GSM devices
I have a server on which a Jboss 4.2.2 and a Jboss 5.1.0 runs.
I'm developing service which communicates with users via my own protocol (persistent socket connection).
I've been stuck since several days on my bluetooth application. Its role is to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.