Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-13882

[GSS](7.1.z) "SAAJ0303: Operation getFaultSubcodes not supported by SOAP 1.1" is logged when SOAPFaultException is thrown

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.1.1.CR1, 7.1.1.GA
    • 7.0.6.GA
    • Web Services
    • None
    • Release Notes
    • Hide

      use "SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE" when QName object is created.

      Show
      use "SOAPConstants.URI_NS_SOAP_1_2_ENVELOPE" when QName object is created.
    • EAP 7.1.1

      When SOAPFaultException is thrown in the application with SOAP 1.1, the following message is logged in server.log though the method "getFaultSubcodes" is not called .

      14:59:37,020 SEVERE [com.sun.xml.messaging.saaj.soap.ver1_1] (default task-2) SAAJ0303: Operation getFaultSubcodes not supported by SOAP 1.1
      

      This comes from here:

      cxf-3.1.10/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WebFaultOutInterceptor.java
       88     public void handleMessage(Message message) throws Fault {
       89         Fault f = (Fault)message.getContent(Exception.class);
       90         if (f == null) {
       91             return;
       92         }
       93         try { 
       94             Throwable thr = f.getCause();
       95             SOAPFaultException sf = null;
       96             if (thr instanceof SOAPFaultException) {
       97                 sf = (SOAPFaultException)thr;
       98             } else if (thr.getCause() instanceof SOAPFaultException) {
       99                 sf = (SOAPFaultException)thr.getCause();              
      100             }
      101             if (sf != null) {
      102                 if (f instanceof SoapFault) {
      103                     for (Iterator<QName> it = CastUtils.cast(sf.getFault().getFaultSubcodes()); it.hasNext();) { // <-- here
      104                         ((SoapFault) f).addSubCode(it.next());
      105                     }
      106                 } 
      107                 if (sf.getFault().getFaultReasonLocales().hasNext()) {
      108                     Locale lang = (Locale) sf.getFault()
      109                            .getFaultReasonLocales().next();
      110                     String convertedLang = lang.getLanguage();
      111                     String country = lang.getCountry();
      112                     if (country.length() > 0) {
      113                         convertedLang = convertedLang + '-' + country;
      114                     }
      115                     f.setLang(convertedLang);
      116                 } 
      117                 message.setContent(Exception.class, f);
      118             } 
      119         } catch (Exception e) {
      120           // do nothing;   // <- UnsupportedOperationException is swallowed here.
      121         }
      122         Throwable cause = f.getCause();
      123         WebFault fault = null;
      124         if (cause != null) {
      125             fault = getWebFaultAnnotation(cause.getClass());      
      126         }
       :
      
      saaj-impl-1.3.16.SP1/src/java/com/sun/xml/messaging/saaj/soap/ver1_1/Fault1_1Impl.java
      227     public Iterator getFaultSubcodes() {
      228         log.log(
      229             Level.SEVERE,
      230             "SAAJ0303.ver1_1.msg.op.unsupported.in.SOAP1.1",
      231             "getFaultSubcodes");
      232         throw new UnsupportedOperationException("Not supported in SOAP 1.1");
      233     }
      ~~~
      

      Both SOAP1.1 and 1.2 this "getFaultSubcodes()" is called and SOAP 1.1 does not have an attribute "faultsubcoded" then, the message is logged in server.log.

      I believe this "getFaultSubcodes()" should be called in case of only SOAP1.2 usage.

              istudens@redhat.com Ivo Studensky
              rhn-support-bmaxwell Brad Maxwell
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: