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 958405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:51:38+00:00 2026-05-16T00:51:38+00:00

Using Grails and CXF, I have published a small web service that looks like

  • 0

Using Grails and CXF, I have published a small web service that looks like this

class TestService {

    static expose=['cxf']

    int pushData(int id, DataHandler data) {

        //receives data for a specific ID,
        return 1
    }
}

The thing is that I now would like to enable MTOM for the transfer of the DataHandler-data. Normally with Groovy and CXF (or JAX-WS) I’d publish TestService as an Endpoint

Endpoint ep = Endpoint.publish("http://localhost:9000/test", new TestService())
SOAPBinding binding = (SOAPBinding)ep.getBinding();
binding.setMTOMEnabled(true);

And all’s done.

Now that I use Grails to do my publishing I can’t figure out how to get the Endpoint. Does anyone know how this could be accomplished?

  • 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-16T00:51:39+00:00Added an answer on May 16, 2026 at 12:51 am

    Let’s assume that the service interface looks like this

    @MTOM
    @WebService(targetNamespace="http://soap.services.website.com/", 
            endpointInterface="com.armorize.web.services.ServiceInterface")
    public interface ServiceInterface
    
      int uploadData(@XmlMimeType("application/octet-stream") DataHandler code) ;
    

    The attributes of the endpoint can be specified in the cxf-servlet.xml . With an implementing service called ServiceImpl, you need to add the following specifications

      <jaxws:endpoint id="endpointID"
            implementor="com.website.web.services.ServiceImpl" address="/test">
    
            <jaxws:properties>
                <entry key="mtom-enabled" value="true" />
                <entry key="mtom-threshold" value="0" />
            </jaxws:properties>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Grails 2.0.0 I am created service, that creates instances of Player class and
We are using grails-groovy with Hibernate, I have a SQL query like this in
I'm using Grails 1.2.1. I have this method in my controller … class SocialMediaCacheProxyController
I have a Grails 2.0.0 project that was created using grails create-app . In
I have been using Grails for the past few months and I really like
I'm using Grails and I have a local-plugin (that I wrote) that I'm using
I'm using Grails 1.2.1. I have a class in my src/groovy file in which
I'm using Grails 1.3.7. I have some code that uses the built-in base64Encode function
We are using Grails [Spring+Hibernate] and have one service method with @Transactional(readOnly=true). During development
Using Grails i'm trying a dynamic finder like this one Policy.findAllByResourceAndUser(resource,user) But When i

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.