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

  • SEARCH
  • Home
  • 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 968147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:25:56+00:00 2026-05-16T02:25:56+00:00

We have an MTOM-enabled web service that is published with Grails and the Metro

  • 0

We have an MTOM-enabled web service that is published with Grails and the Metro 1.0.2 plugin:

@MTOM
@WebService(targetNamespace="http://com.domain")
class TestService {

    @WebMethod
    int uploadFile(@XmlMimeType("application/octet-stream")DataHandler data) {

        data.dataSource.inputStream.eachLine {
            println "reading: -> ${it}"
        }
        return 0
    }
}

Following this tutorial, we set up a Java test-client that looks like this

public class Client {

    public static void main(String[] argv) {

        MTOMFeature feat = new MTOMFeature();
        TestService service = new TestServiceService().getTestServicePort(feat);
        Map<String, Object> ctxt = ((BindingProvider)service).getRequestContext();
        ctxt.put(JAXWSProperties.HTTP_CLIENT_STREAMING_CHUNK_SIZE, 8192);
        service.uploadFile(new DataHandler(new FileDataSource("c:/file.xml")));
    }
}

When I run the client, I get the following error message:

Couldn’t create SOAP message due to
exception:
org.jvnet.mimepull.MIMEParsingException:
Missing start boundary

However, when I don’t add the MTOMFeature, and just do
TestService service = new TestServiceService().getTestServicePort(); the files gets uploaded ok. But as I understand it if MTOM is not enabled on both server and client side, the entire file will be kept in memory (and not streamed). So, my questions are

  • Why do we get that error?
  • If I don’t add the MTOMFeature, will the file still be MTOM-transmitted?

I would be very grateful for any help/tips!

  • 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-16T02:25:57+00:00Added an answer on May 16, 2026 at 2:25 am

    After some research and testing, the answers are:

    • The error is because grails adds its own filtering, including services. So, by excluding the services from being filtered like this static excludes = ["/services/*"] in UrlMappings.groovy, it works.
    • No. Without the MTOMFeature the file will just be treated as any other data in the request. That means being stored in the memory, thus causing problems for big files.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Grails and CXF, I have published a small web service that looks like
I have this response from a Java web service: HTTP/1.1 200 OK Date: Mon,
For historical reasons, I have some WSE 3.0 web services that I cannot upgrade
I have a web application sitting out there that is a repository for files.
I have a wcf service set up to accept basic http binding. I want
I have WCF service library with this config: <basicHttpBinding> <binding name=httpLargeMessageStream maxReceivedMessageSize=2147483647 messageEncoding=Mtom transferMode=Streamed
We have service that's working with small to large sets of data (document generation),
I'm integrating with a third party WCF service that is using Mtom as the
I have written a simple service that uploads & downloads XML files. I want
I have build an APi which is a WCF Service. In the web.config for

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.