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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:40:36+00:00 2026-06-08T00:40:36+00:00

I have a soap web service exposed with axis2 (Java) which serializes POJOs, such

  • 0

I have a soap web service exposed with axis2 (Java) which serializes POJOs, such as a Person that has a name and so on, as action responses. Moreover, I have an action which uses a DataHandler that is serialized in order to put a binary attachment in the response using <xop:Include ...></xop:Include>

I have generated the client side code in c++ using wsdl2cpp provided by wso2 wsfcpp. The getPerson(personId) action works fine and the results are as expected. However, the getFile(someId) action is successful although the generated code doesn’t seem to work properly.

The service as enableMTOM=true set in axis2.xml as well as the client. I even added the Options.setEnableMTOM(true) to be sure in the main on the client side.

I believe that the problem is the code that is generated from the wsdl since the envelope of the getFile(someId) response is valid (and I have tested it manually with the axis2c api and I can retrieve the file as expected).

Here is the schema contained in the wsdl (which is generated from axis2 Java) for the response:

<xs:element name="getFileResponse">
   <xs:complexType>
      <xs:sequence>
         <xs:element minOccurs="0" name="return" nillable="true" type="xs:base64Binary"/>
      </xs:sequence>
   </xs:complexType>
</xs:element>

Here is the command line used to generate the client code:

WSDL2CPP -uri MyService.xml -g -d adb -u -f

Here is the response received from the service:

<ns:getFileResponse xmlns:ns="http://services.myplace.com">
   <ns:return>
      <xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:1.3ad8fc0571509f196559ee5312c14d23250854e4c9c8383e@apache.org"></xop:Include>
   </ns:return>
</ns:getFileResponse>

Is there something missing in the wsdl or is that feature (soap with MTOM client code generation) not implemented by wsfcpp?

Thanks in advance!

  • 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-06-08T00:40:37+00:00Added an answer on June 8, 2026 at 12:40 am

    I’ve tried the same thing with gSoap and I had the same problem. I figured that axis2 automatically detect whether the binary is optimized or not. Also, I found that in either case, the return element type exposed by the wsdl is type=”xs:base64Binary”.

    The only work around I found was to patch, by replacing xs:base64Binary by xop:Include, the WSDL using a python (or whatever) script and then generate the code.

    That solved the problem but makes maintainability issues.

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

Sidebar

Related Questions

I have a Java SOAP web service initially designed in Axis 1 which isn't
I have an interface that I've exposed as a regular SOAP web service. One
I have developed a soap based web service. It returns java objects which contains
I Have an internal SOAP Web service that is being called from an external
I have a complex RIA client that communicates with a WCF SOAP web service,
I have an ASP.NET web service running that accepts both HTTP POST and SOAP
Hi I have a soap web service(java, spring, tomcat) In my web.xml file i
I have a soap web service which accepts file attachments, these I process on
I have an iPhone application , which is consuming a Soap web service. When
I have been working on a SOAP Web Service that uses a Caché 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.