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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:50:35+00:00 2026-05-11T22:50:35+00:00

I’m completely stuck and need your help… I’ve created a webservice stub with jaxb

  • 0

I’m completely stuck and need your help… I’ve created a webservice stub with jaxb 2.x for a service that sends a binary file (base64 encoded jpg images) within a soap message. Everything worked fine and I was able to receive and display the images, until I tried to export the eclipse RCP app to a product, which caused imediatly LinkageErrors (as usual, javax.xml.namespace.QName and some more).

I was able to solve that problem to ‘rebundle’ axis2 and now everything works fine again – except the parsing of the binary file part within the stub, which now causes an exception (unexpected element).

A closer look revealed, that the reader (OMStAXWrapper), that is used in the axis2-jaxb-generated Stub, now does not read the whole base64 text but only the first 10000 bytes. Then it doesn’t find the correct ending of the element and throws an exception.

As mentioned before – this didn’t happen in the beginning, so I hope it’s just a parameter or an option. Big thanks in advance for every help or hint!

Edit
It wasn’t JAXB, I used JAXWS and wsimport to create the stub for the wsdl file…

  • 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-11T22:50:35+00:00Added an answer on May 11, 2026 at 10:50 pm

    For a bit of background, OMStAXWrapper is part of Axiom, which is Axis2’s custom streaming utility for web services, which Axis2 uses as a replacement for SAAJ. I wouldn’t be hugely surprised if it was buggy, if my prior experience with Axis is anything to go by.

    If you want to send large binaries over SOAP, the best technology for this at the moment seems to be MTOM (see here for how to use it with Axis2). This can better optimize the binary representation, and your problem might go away. However, both client and server must be able to speak MTOM, so it may not be an option for you.

    Alternatively, it should be possible to convince Axis2 to use the standard SAAJ API instead of using Axiom. SAAJ is slower, but should be less buggy.

    My final suggestion is to abandon Axis2 for your client, and use something more lightweight. Spring-WS provides a very nice client API, which is currently my tool of choice for talking to remote web services. It supports Axiom and SAAJ, as well as MTOM, and it sufficiently lightweight that it’s quite easy to find out why something’s gone wrong.

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
In my XML file chapters tag has more chapter tag.i need to display chapters
I am doing a simple coin flipping experiment for class that involves flipping a

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.