lacike/ October 7, 2010/ Software & Development/ 10 comments

Did you try to use Axis to connect to a remote web service? Do you get “SOAPFaultBuilder throws DOMException WRONG_DOCUMENT_ERR” error?

Well, it’s a well known bug that’s been fixed. However, the fix has not been included in any released version (that’s since 2006). You have to download the sources, add one line, change the next one and then build it on your own (the error is received when xml node was added to document node before it’s been imported into the DOM). So far so good.

The issue is that Axis is written in Java 1.4. Java 1.6 (current JDK 1.6) insists on using 1.6 version of abstract classes (e.g. javax.xml.soap.SOAPMessage) even if you specify -source 1.4 switch (if you wonder if the switch is not just ignored then you’re wrong – it isn’t, because you won’t get as many warning as for 1.6 value).

So, you have to use JDK 1.4, but where to get it? You can download it from Sun’s site, but wait – oops, you can’t anymore, because it’s reached the end of service life (ESL).

I found the old JDK 1.4 somewhere on my harddrive and compiled the fixed version for you. If you want it, you can grab it here. Source can be found here. To see the changes check SOAPFaultBuilder.java on lines 304-306.

10 Comments

  1. Hi;

    I have to use all the files in http://www.lacike.sk/wp-content/uploads/2010/10/axis_1.4_fix.zip or using only axis.jar is enough.

    Many thanks;

  2. Hi;

    I have to copy all the files in http://www.lacike.sk/wp-content/uploads/2010/10/axis_1.4_fix.zip or copying only axis.jar file is enough to solve the problem.

    Regards;

  3. Hi,

    axis.jar is enought. I wanted to provide the whole package that worked for me.

  4. Hi,

    Thank you for your correction, I also had the same problem with axis 1.4.
    Is it possible to have your code in order to understand from where comes the problem?

    Best Regards,

  5. Hi Khalid,

    I am afraid I don’t have the source code anymore (it was a quick-fix solution for a friend of mine).

    Find a link in my article to apache issue tracking system describing the bug and look for the comment from adri. It contains the necessary change. The original 1.4 source codes can be easily downloaded directly from apache site.

    https://issues.apache.org/jira/browse/AXIS-2705

  6. Thanks for this patch! I really needed it (well, I need to upgrade to Axis2, but in the meanwhile…)!!

    THANKS SO MUCH, +1 for you!!

  7. You’re welcome šŸ˜‰

  8. KHALID :

    Hi,

    Thank you for your correction, I also had the same problem with axis 1.4.
    Is it possible to have your code in order to understand from where comes the problem?

    Best Regards,

    So I found the source code, check the post.

  9. Still I am getting the following error (if I use your axis.jar),

    Get entry failed. Message: Unknown error in SOAP call: service died unexpectedly
    AxisFault
    faultCode: -1
    faultSubcode:
    faultString: Unknown error in SOAP call: service died unexpectedly
    faultActor:
    faultNode:
    faultDetail:
    {}:Database failure. Please refer to sugarcrm.log for details.

  10. I think the error description you receive is pretty self-explainatory. You have a problem on database level of SugarCRM, not on web-service level. Also the instructions are quite clear – check the log file of your CRM software.

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
*
*