[jbossws-issues] [JBoss JIRA] Updated: (JBWS-2649) SOAPMessage implementation bug

Marcos Prado (JIRA) jira-events at lists.jboss.org
Fri May 15 04:04:47 EDT 2009


     [ https://jira.jboss.org/jira/browse/JBWS-2649?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marcos Prado updated JBWS-2649:
-------------------------------

    Description: 
Relating to JBWS-1439 issue, I've found the root of the problem:

When you get the exception mentioned:

java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
        at javax.xml.soap.SOAPMessage.setProperty(SOAPMessage.java:424)
        at org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:83)
        at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:161)

I found that the jbossws-native-saaj.jar library has an OVERWRITTEN class javax.xml.soap.SOAPMessage which has overrided the method setProperty():

            public void setProperty(String property, Object value)  throws SOAPException
            {
                  properties.put(property, value);
            }

This class is an ABSTRACT class and the specification clearly indicates: setProperty must be overridden by ALL SUBCLASSES of SOAPMessage.
All the javax.xml.soap stuff has been included in the runtime library (rt.jar) in jre 1.6 so, Jboss gives priority to this class and the original one has the next code (as an abstract class) instead of the jbossws-native-saaj.jar one:

    public void setProperty(String s, Object obj)
        throws SOAPException
    {
        throw new UnsupportedOperationException("setProperty must be overridden by all subclasses of SOAPMessage");
    }

There is an implementation of SOAPMessage in /client/jbossws-native-core.jar, called org.jboss.ws.core.soap.SOAPMessageImpl which extends the SOAPMessage abstract class but, in this case, the rt.jar is the one that has been loaded in the classpath.
This implementation just calls the setProperty() method from his parent... but the parent code is throwing the UnsupporteOperationException!!!

As the specification indicates, the method setProperty that has been overwritten in the jbossws-native-saaj.jar, SOAPMessage class must be in the implementation (subclass), not in the abstract class.

  was:
Relating to JBWS-1439 issue, I've found the root of the problem:

When you get the exception mentioned:

java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
        at javax.xml.soap.SOAPMessage.setProperty(SOAPMessage.java:424)
        at org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:83)
        at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:161)

I found that the jbossws-native-saaj.jar library has an OVERWRITTEN class javax.xml.soap.SOAPMessage which has overwritten (and not overrided) the method setProperty():

            public void setProperty(String property, Object value)  throws SOAPException
            {
                  properties.put(property, value);
            }

This class is an ABSTRACT class and the specification clearly indicates: setProperty must be overridden by ALL SUBCLASSES of SOAPMessage.
All the javax.xml.soap stuff has been included in the runtime library (rt.jar) in jre 1.6 so, Jboss gives priority to this class and the original one has the next code (as an abstract class) instead of the jbossws-native-saaj.jar one:

    public void setProperty(String s, Object obj)
        throws SOAPException
    {
        throw new UnsupportedOperationException("setProperty must be overridden by all subclasses of SOAPMessage");
    }

There is an implementation of SOAPMessage in /client/jbossws-native-core.jar, called org.jboss.ws.core.soap.SOAPMessageImpl which extends the SOAPMessage abstract class but, in this case, the rt.jar is the one that has been loaded in the classpath.
This implementation just calls the setProperty() method from his parent... but the parent code is throwing the UnsupporteOperationException!!!

As the specification indicates, the method setProperty that has been overwritten in the jbossws-native-saaj.jar, SOAPMessage class must be in the implementation (subclass), not in the abstract class.



> SOAPMessage implementation bug
> ------------------------------
>
>                 Key: JBWS-2649
>                 URL: https://jira.jboss.org/jira/browse/JBWS-2649
>             Project: JBoss Web Services
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: jbossws-native
>    Affects Versions: jbossws-native-3.0.5
>         Environment: JBoss 5.0.1.GA compiled with JDK1.6+Java 6+Windows XP SP2
>            Reporter: Marcos Prado
>            Priority: Blocker
>
> Relating to JBWS-1439 issue, I've found the root of the problem:
> When you get the exception mentioned:
> java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
>         at javax.xml.soap.SOAPMessage.setProperty(SOAPMessage.java:424)
>         at org.jboss.ws.core.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:83)
>         at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:161)
> I found that the jbossws-native-saaj.jar library has an OVERWRITTEN class javax.xml.soap.SOAPMessage which has overrided the method setProperty():
>             public void setProperty(String property, Object value)  throws SOAPException
>             {
>                   properties.put(property, value);
>             }
> This class is an ABSTRACT class and the specification clearly indicates: setProperty must be overridden by ALL SUBCLASSES of SOAPMessage.
> All the javax.xml.soap stuff has been included in the runtime library (rt.jar) in jre 1.6 so, Jboss gives priority to this class and the original one has the next code (as an abstract class) instead of the jbossws-native-saaj.jar one:
>     public void setProperty(String s, Object obj)
>         throws SOAPException
>     {
>         throw new UnsupportedOperationException("setProperty must be overridden by all subclasses of SOAPMessage");
>     }
> There is an implementation of SOAPMessage in /client/jbossws-native-core.jar, called org.jboss.ws.core.soap.SOAPMessageImpl which extends the SOAPMessage abstract class but, in this case, the rt.jar is the one that has been loaded in the classpath.
> This implementation just calls the setProperty() method from his parent... but the parent code is throwing the UnsupporteOperationException!!!
> As the specification indicates, the method setProperty that has been overwritten in the jbossws-native-saaj.jar, SOAPMessage class must be in the implementation (subclass), not in the abstract class.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbossws-issues mailing list