cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Glen Mazza <glen.ma...@verizon.net>
Subject Re: svn commit: r560032 - in /incubator/cxf/trunk: rt/bindings/http/src/test/java/org/apache/cxf/binding/http/bare/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ rt/bindi...
Date Fri, 27 Jul 2007 05:26:34 GMT
Am Donnerstag, den 26.07.2007, 23:42 +0000 schrieb dandiep@apache.org:
> +        } else if (message.getVersion() instanceof Soap12) {
> +            String ct = (String) message.get(Message.CONTENT_TYPE);
> +            
> +            if (ct == null) {
> +                return;
> +            }
> +            
> +            int start = ct.indexOf("action=");
> +            if (start != -1) {
> +                int end;
> +                if (ct.charAt(start + 7) == '\"') {
> +                    start += 8;
> +                    end = ct.indexOf('\"', start);
> +                } else {
> +                    start += 7;
> +                    end = ct.indexOf(';', start);
> +                    if (end == -1) {
> +                        end = ct.length();
> +                    }
> +                }
> +                
> +                getAndSetOperation(message, ct.substring(start, end));
> +            }
> +        }
> +    }
> +
> +    private void getAndSetOperation(SoapMessage message, String action) {
> +        if ("".equals(action)) {
> +            return;
> +        }
> +        

According to the RFC below[1] (2/Registration, Optional Parameters,
"action"), the URI reference to the action parameter "MUST" be non-empty
or apparently (?) it's an error.   Should the code above therefore
return an error if there is an action parameter but no URI value--I
don't know what the present consequences of just returning from
getAndSetOperation() are if action's URI is empty.

Also, while I'm on this topic, the org.apache.cxf.binding.soap.Soap12
class[2] returns a hardcoded "application/soap+xml" for getContentType()
(a carryover from the "text/xml" that class Soap11's version returns.)
Does/Will it matter that Soap12's getContentType() does not return the
possible "action" parameter value as well?

Glen

[1] http://www.ietf.org/rfc/rfc3902.txt
[2, line 137]
http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/Soap12.java?annotate=481043




Mime
View raw message